[libcxx] r271502 - Add not_fn test for throwing operator!

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 01:37:04 PDT 2016


Author: ericwf
Date: Thu Jun  2 03:37:00 2016
New Revision: 271502

URL: http://llvm.org/viewvc/llvm-project?rev=271502&view=rev
Log:
Add not_fn test for throwing operator!

Modified:
    libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp

Modified: libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp?rev=271502&r1=271501&r2=271502&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp Thu Jun  2 03:37:00 2016
@@ -519,6 +519,14 @@ void call_operator_noexcept_test()
         static_assert(noexcept(cret()), "call should be noexcept");
     }
     {
+        using T = NoExceptCallable<NoExceptEvilBool>;
+        T value(true);
+        auto ret = std::not_fn(value);
+        static_assert(noexcept(ret()), "call should not be noexcept");
+        auto const& cret = ret;
+        static_assert(noexcept(cret()), "call should not be noexcept");
+    }
+    {
         using T = NoExceptCallable<EvilBool>;
         T value(true);
         auto ret = std::not_fn(value);




More information about the cfe-commits mailing list