]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/type_traits/test/is_function_test.cpp
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / boost / libs / type_traits / test / is_function_test.cpp
index 67cdca7f112af2a8386a520733eec0ecfb34f064..d694eca77ef44b0fd0105e8eef3ecc1f9fafd986 100644 (file)
@@ -4,13 +4,13 @@
 //  Boost Software License, Version 1.0. (See accompanying file 
 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#include "test.hpp"
-#include "check_integral_constant.hpp"
 #ifdef TEST_STD
 #  include <type_traits>
 #else
 #  include <boost/type_traits/is_function.hpp>
 #endif
+#include "test.hpp"
+#include "check_integral_constant.hpp"
 
 TT_TEST_BEGIN(is_function)
 
@@ -19,12 +19,25 @@ typedef void foo1_t(int);
 typedef void foo2_t(int&, double);
 typedef void foo3_t(int&, bool, int, int);
 typedef void foo4_t(int, bool, int*, int[], int, int, int, int, int);
+#if __cpp_noexcept_function_type
+typedef int foo5_t(void)noexcept;
+typedef int foo6_t(double)noexcept(false);
+typedef int foo7_t(int, double)noexcept(true);
+#endif
+typedef double foo8_t(double...);
+
 
 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo0_t>::value, true);
 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo1_t>::value, true);
 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo2_t>::value, true);
 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo3_t>::value, true);
 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo4_t>::value, true);
+#if __cpp_noexcept_function_type
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo5_t>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo6_t>::value, true);
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo7_t>::value, true);
+#endif
+BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<foo8_t>::value, true);
 
 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<void>::value, false);
 BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_function<int>::value, false);