diff options
Diffstat (limited to 'test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp')
| -rw-r--r-- | test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp index 47a3e1cc5969..2b19211be9bf 100644 --- a/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp +++ b/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp @@ -414,7 +414,14 @@ void throws_in_constructor_test() throw 42; } ThrowsOnCopy() = default; - bool operator()() const { assert(false); } + bool operator()() const { + assert(false); +#if defined(_LIBCPP_MSVC) + __assume(0); +#else + __builtin_unreachable(); +#endif + } }; { ThrowsOnCopy cp; |
