File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,7 @@ namespace Catch {
2121 struct ConstexprSection {
2222 template <typename Callable>
2323 ConstexprSection ( Callable callable ) {
24- static_assert (
25- [&] // error: CONSTEXPR_SECTION failure. Check the compiler
26- // output to find the cause. You can make the section a
27- // SECTION to investigate at runtime.
28- {
29- callable ();
30- return true ;
31- }(),
32- " compile time section error" );
24+ static_assert ( ( callable (), true ), " CONSTEXPR_SECTION failure" );
3325 addFakeAssertion ();
3426 callable ();
3527 }
@@ -51,8 +43,7 @@ namespace Catch {
5143#else
5244# define INTERNAL_CATCH_CONSTEXPR_SECTION ( ... ) \
5345 static_assert ( false , " C++17 is required for CONSTEXPR_SECTION" ); \
54- if ( false ) { \
55- } else
46+ if ( false )
5647#endif
5748
5849#endif // CATCH_CONSTEXPR_SECTION_HPP_INCLUDED
You can’t perform that action at this time.
0 commit comments