]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/container/test/deque_test.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / container / test / deque_test.cpp
index 22b87f49ba4e9f663446eca1a7b8455f773c352f..a90ef515aa6fb06acdf3d599ab76367b02c45b52 100644 (file)
@@ -7,8 +7,6 @@
 // See http://www.boost.org/libs/container for documentation.
 //
 //////////////////////////////////////////////////////////////////////////////
-
-#include <boost/container/detail/config_begin.hpp>
 #include <memory>
 #include <deque>
 #include <iostream>
@@ -100,6 +98,10 @@ class recursive_deque
 {
 public:
 
+   recursive_deque (const recursive_deque &x)
+      : deque_(x.deque_)
+   {}
+
    recursive_deque & operator=(const recursive_deque &x)
    {  this->deque_ = x.deque_;   return *this; }
 
@@ -420,27 +422,21 @@ int main ()
       typedef boost::container::deque<int> cont;
       typedef cont::allocator_type allocator_type;
       typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
-      if (boost::has_trivial_destructor_after_move<cont>::value !=
-          boost::has_trivial_destructor_after_move<allocator_type>::value &&
-          boost::has_trivial_destructor_after_move<pointer>::value) {
-         std::cerr << "has_trivial_destructor_after_move(default allocator) test failed" << std::endl;
-         return 1;
-      }
+      BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
+                                boost::has_trivial_destructor_after_move<allocator_type>::value &&
+                                boost::has_trivial_destructor_after_move<pointer>::value)
+                             , "has_trivial_destructor_after_move(std::allocator) test failed");
    }
    // std::allocator
    {
       typedef boost::container::deque<int, std::allocator<int> > cont;
       typedef cont::allocator_type allocator_type;
       typedef boost::container::allocator_traits<allocator_type>::pointer pointer;
-      if (boost::has_trivial_destructor_after_move<cont>::value !=
-          boost::has_trivial_destructor_after_move<allocator_type>::value &&
-          boost::has_trivial_destructor_after_move<pointer>::value) {
-         std::cerr << "has_trivial_destructor_after_move(std::allocator) test failed" << std::endl;
-         return 1;
-      }
+      BOOST_STATIC_ASSERT_MSG(!(boost::has_trivial_destructor_after_move<cont>::value !=
+                               boost::has_trivial_destructor_after_move<allocator_type>::value &&
+                               boost::has_trivial_destructor_after_move<pointer>::value)
+                             , "has_trivial_destructor_after_move(std::allocator) test failed");
    }
 
    return 0;
 }
-
-#include <boost/container/detail/config_end.hpp>