]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/container/test/flat_set_test.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / container / test / flat_set_test.cpp
index 7927b99a4a3be3568641dcb77cc9816966ee9151..1326d176cc86c87ee0714b4fc448f94b070d6d50 100644 (file)
@@ -8,8 +8,6 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 
-#include <boost/container/detail/config_begin.hpp>
-
 #include <iostream>
 #include <set>
 #include <utility>
@@ -864,70 +862,55 @@ int main()
       {
          typedef boost::container::flat_set<int> cont;
          typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, void> tree;
-         if (boost::has_trivial_destructor_after_move<cont>::value !=
-             boost::has_trivial_destructor_after_move<tree>::value) {
-            std::cerr << "has_trivial_destructor_after_move(flat_set, default) test failed" << std::endl;
-            return 1;
-         }
+         BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
+                                   boost::has_trivial_destructor_after_move<tree>::value
+                                 , "has_trivial_destructor_after_move(flat_set, default) test failed");
       }
       // flat_set, vector
       {
          typedef boost::container::vector<int> alloc_or_cont_t;
          typedef boost::container::flat_set<int, std::less<int>, alloc_or_cont_t> cont;
          typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
-         if (boost::has_trivial_destructor_after_move<cont>::value !=
-             boost::has_trivial_destructor_after_move<tree>::value) {
-            std::cerr << "has_trivial_destructor_after_move(flat_set, vector) test failed" << std::endl;
-            return 1;
-         }
+         BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
+                                   boost::has_trivial_destructor_after_move<tree>::value
+                                 , "has_trivial_destructor_after_move(flat_set, vector) test failed");
       }
       // flat_set, std::vector
       {
          typedef std::vector<int> alloc_or_cont_t;
          typedef boost::container::flat_set<int, std::less<int>, alloc_or_cont_t> cont;
          typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
-         if (boost::has_trivial_destructor_after_move<cont>::value !=
-             boost::has_trivial_destructor_after_move<tree>::value) {
-            std::cerr << "has_trivial_destructor_after_move(flat_set, std::vector) test failed" << std::endl;
-            return 1;
-         }
+         BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
+                                   boost::has_trivial_destructor_after_move<tree>::value
+                                 , "has_trivial_destructor_after_move(flat_set, std::vector) test failed");
       }
       // flat_multiset, default
       {
          typedef boost::container::flat_multiset<int> cont;
          typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, void> tree;
-         if (boost::has_trivial_destructor_after_move<cont>::value !=
-             boost::has_trivial_destructor_after_move<tree>::value) {
-            std::cerr << "has_trivial_destructor_after_move(flat_multiset, default) test failed" << std::endl;
-            return 1;
-         }
+         BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
+                                   boost::has_trivial_destructor_after_move<tree>::value
+                                 , "has_trivial_destructor_after_move(flat_multiset, default) test failed");
       }
       // flat_multiset, vector
       {
          typedef boost::container::vector<int> alloc_or_cont_t;
          typedef boost::container::flat_multiset<int, std::less<int>, alloc_or_cont_t> cont;
          typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
-         if (boost::has_trivial_destructor_after_move<cont>::value !=
-             boost::has_trivial_destructor_after_move<tree>::value) {
-            std::cerr << "has_trivial_destructor_after_move(flat_multiset, vector) test failed" << std::endl;
-            return 1;
-         }
+         BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
+                                   boost::has_trivial_destructor_after_move<tree>::value
+                                 , "has_trivial_destructor_after_move(flat_multiset, vector) test failed");
       }
       // flat_multiset, std::vector
       {
          typedef std::vector<int> alloc_or_cont_t;
          typedef boost::container::flat_multiset<int, std::less<int>, alloc_or_cont_t> cont;
          typedef boost::container::dtl::flat_tree<int, key_of_value_t, std::less<int>, alloc_or_cont_t> tree;
-         if (boost::has_trivial_destructor_after_move<cont>::value !=
-             boost::has_trivial_destructor_after_move<tree>::value) {
-            std::cerr << "has_trivial_destructor_after_move(flat_multiset, std::vector) test failed" << std::endl;
-            return 1;
-         }
+         BOOST_STATIC_ASSERT_MSG ( boost::has_trivial_destructor_after_move<cont>::value ==
+                                   boost::has_trivial_destructor_after_move<tree>::value
+                                 , "has_trivial_destructor_after_move(flat_multiset, std::vector) test failed");
       }
    }
 
    return 0;
 }
-
-#include <boost/container/detail/config_end.hpp>
-