Move boost/intrusive to senf/boost_intrusive
[senf.git] / senf / boost_intrusive / detail / pointer_to_other.hpp
diff --git a/senf/boost_intrusive/detail/pointer_to_other.hpp b/senf/boost_intrusive/detail/pointer_to_other.hpp
new file mode 100644 (file)
index 0000000..576e768
--- /dev/null
@@ -0,0 +1,65 @@
+/////////////////////////////////////////////////////////////////////////////\r
+//\r
+// (C) Copyright Ion GaztaƱaga 2006. Distributed under the Boost\r
+// Software License, Version 1.0. (See accompanying file\r
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
+//\r
+// See http://www.boost.org/libs/intrusive for documentation.\r
+//\r
+/////////////////////////////////////////////////////////////////////////////\r
+\r
+#ifndef BOOST_INTRUSIVE_POINTER_TO_OTHER_HPP\r
+#define BOOST_INTRUSIVE_POINTER_TO_OTHER_HPP\r
+\r
+#include "config_begin.hpp"\r
+#include <boost/version.hpp>\r
+\r
+#if (BOOST_VERSION < 103400)
+
+#ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED\r
+#define BOOST_POINTER_TO_OTHER_HPP_INCLUDED\r
+
+namespace boost {\r
+\r
+template<class T, class U>\r
+   struct pointer_to_other;\r
+\r
+template<class T, class U, template <class> class Sp>\r
+   struct pointer_to_other< Sp<T>, U >\r
+{\r
+   typedef Sp<U> type;\r
+};\r
+\r
+template<class T, class T2, class U,\r
+        template <class, class> class Sp>\r
+   struct pointer_to_other< Sp<T, T2>, U >\r
+{\r
+   typedef Sp<U, T2> type;\r
+};\r
+\r
+template<class T, class T2, class T3, class U,\r
+        template <class, class, class> class Sp>\r
+struct pointer_to_other< Sp<T, T2, T3>, U >\r
+{\r
+   typedef Sp<U, T2, T3> type;\r
+};\r
+\r
+template<class T, class U>\r
+struct pointer_to_other< T*, U > \r
+{\r
+   typedef U* type;\r
+};\r
+\r
+} // namespace boost\r
+\r
+#endif\r
+\r
+#else\r
+\r
+#include <boost/pointer_to_other.hpp>\r
+\r
+#endif   //#ifndef BOOST_POINTER_TO_OTHER_HPP_INCLUDED\r
+\r
+#include "config_end.hpp"\r
+\r
+#endif   //#ifndef BOOST_INTRUSIVE_POINTER_TO_OTHER_HPP\r