In the v.8.7.0 release, if deprecation warnings are enabled, for C++14 and above, we get a compilation error because [[deprecated]] is put in the wrong place:
In file included from ...ApprovalTests.cpp/examples/doctest_existing_main/DeprecatedCombinationApprovalsTests.cpp:7:
...ApprovalTests.cpp/ApprovalTests/../ApprovalTests/CombinationApprovals.h:85:16:
error: an attribute list cannot appear here
static APPROVAL_TESTS_DEPRECATED_USE_OPTIONS void
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...ApprovalTests.cpp/ApprovalTests/../ApprovalTests/utilities/Macros.h:35:5:
note: expanded from macro 'APPROVAL_TESTS_DEPRECATED_USE_OPTIONS'
APPROVAL_TESTS_DEPRECATED( \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...ApprovalTests.cpp/ApprovalTests/../ApprovalTests/utilities/Macros.h:22:41:
note: expanded from macro 'APPROVAL_TESTS_DEPRECATED'
#define APPROVAL_TESTS_DEPRECATED(text) [[deprecated(text)]]
^~~~~~~~~~~~~~~~~~~~
Steps to reproduce:
Edit examples/doctest_existing_main/DeprecationDefines.h and change APPROVAL_TESTS_SHOW_DEPRECATION_WARNINGS to 1
Edit examples/doctest_existing_main/CMakeLists.txt and change CMAKE_CXX_STANDARD to 14
In the v.8.7.0 release, if deprecation warnings are enabled, for C++14 and above, we get a compilation error because
[[deprecated]]
is put in the wrong place:Steps to reproduce:
examples/doctest_existing_main/DeprecationDefines.h
and changeAPPROVAL_TESTS_SHOW_DEPRECATION_WARNINGS
to 1examples/doctest_existing_main/CMakeLists.txt
and changeCMAKE_CXX_STANDARD
to 14doctest_existing_main
The above compilation failure will then happen.