File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 1515#define nsel_CONFIG_CONFIRMS_COMPILATION_ERRORS 0
1616#endif
1717
18+ #define nsel_HAVE_MAYBE_UNUSED nsel_CPP17_000
19+
20+ #if nsel_HAVE_MAYBE_UNUSED
21+ # define nsel_MAYBE_UNUSED [[maybe_unused]]
22+ #else
23+ # define nsel_MAYBE_UNUSED /* [[maybe_unused]]*/
24+ #endif
25+
1826// Suppress:
1927// - unused parameter, for cases without assertions such as [.std...]
2028#if defined(__clang__)
@@ -607,7 +615,7 @@ CASE( "make_unexpected_from_current_exception(): Allows to create an unexpected_
607615CASE ( " unexpected: C++17 and later provide unexpected_type as unexpected" )
608616{
609617#if nsel_CPP17_OR_GREATER || nsel_COMPILER_MSVC_VERSION > 141
610- [[maybe_unused]] nonstd::unexpected<int > u{7 };
618+ nsel_MAYBE_UNUSED nonstd::unexpected<int > u{7 };
611619#else
612620 EXPECT ( !!" unexpected is not available (no C++17)." );
613621#endif
@@ -2281,7 +2289,7 @@ CASE( "invoke" )
22812289
22822290struct nullopt_t {};
22832291
2284- [[maybe_unused]] const nullopt_t nullopt {};
2292+ nsel_MAYBE_UNUSED const nullopt_t nullopt {};
22852293
22862294// / optional expressed in expected
22872295
You can’t perform that action at this time.
0 commit comments