Imported Upstream version 1.57.0
[platform/upstream/boost.git] / libs / intrusive / test / common_functors.hpp
index 0cc9d96..7433d38 100644 (file)
@@ -1,6 +1,6 @@
 /////////////////////////////////////////////////////////////////////////////
 //
-// (C) Copyright Ion Gaztanaga  2006-2012
+// (C) Copyright Ion Gaztanaga  2006-2013
 //
 // Distributed under the Boost Software License, Version 1.0.
 //    (See accompanying file LICENSE_1_0.txt or copy at
@@ -13,8 +13,9 @@
 #ifndef BOOST_INTRUSIVE_TEST_COMMON_FUNCTORS_HPP
 #define BOOST_INTRUSIVE_TEST_COMMON_FUNCTORS_HPP
 
-#include<boost/intrusive/detail/utilities.hpp>
+#include<boost/intrusive/detail/iiterator.hpp>
 #include<boost/intrusive/detail/mpl.hpp>
+#include<boost/static_assert.hpp>
 
 namespace boost      {
 namespace intrusive  {
@@ -27,8 +28,8 @@ class delete_disposer
    template <class Pointer>
       void operator()(Pointer p)
    {
-      typedef typename std::iterator_traits<Pointer>::value_type value_type;
-      BOOST_INTRUSIVE_INVARIANT_ASSERT(( detail::is_same<T, value_type>::value ));
+      typedef typename boost::intrusive::iterator_traits<Pointer>::value_type value_type;
+      BOOST_STATIC_ASSERT(( detail::is_same<T, value_type>::value ));
       delete boost::intrusive::detail::to_raw_pointer(p);
    }
 };
@@ -49,6 +50,14 @@ class new_default_factory
    {  return new T();  }
 };
 
+class empty_disposer
+{
+   public:
+   template<class T>
+   void operator()(const T &)
+   {}
+};
+
 }  //namespace test       {
 }  //namespace intrusive  {
 }  //namespace boost      {