]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/type_traits/test/has_post_increment_test.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / type_traits / test / has_post_increment_test.cpp
index c15c6d34f750496c7cb5b6e94df8036fc947bc11..28157b770dff649eccc7918a9ae5cf37987bc776 100644 (file)
@@ -219,6 +219,23 @@ void specific() {
    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int & >::value), 0);
    BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< int* const &, int const & >::value), 0);
 
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+   // There are some things that pass that wouldn't otherwise do so:
+   auto f = []() {};
+   auto f2 = [](double)->int { return 2; };
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f)>::value), 0);
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2)>::value), 0);
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), bool>::value), 0);
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), bool>::value), 0);
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f), void>::value), 0);
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME<decltype(f2), void>::value), 0);
+
+#ifndef BOOST_NO_CXX11_SCOPED_ENUMS
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum >::value), 0);
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, scoped_enum >::value), 0);
+   BOOST_CHECK_INTEGRAL_CONSTANT((::boost::BOOST_TT_TRAIT_NAME< scoped_enum, void >::value), 0);
+#endif
+#endif
 }
 
 TT_TEST_BEGIN(BOOST_TT_TRAIT_NAME)