summaryrefslogtreecommitdiff
path: root/boost/intrusive/link_mode.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/intrusive/link_mode.hpp')
-rw-r--r--boost/intrusive/link_mode.hpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/boost/intrusive/link_mode.hpp b/boost/intrusive/link_mode.hpp
index c04f77526e..c7245d9c1f 100644
--- a/boost/intrusive/link_mode.hpp
+++ b/boost/intrusive/link_mode.hpp
@@ -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
@@ -10,8 +10,12 @@
//
/////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP
-#define BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP
+#ifndef BOOST_INTRUSIVE_LINK_MODE_HPP
+#define BOOST_INTRUSIVE_LINK_MODE_HPP
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
namespace boost {
namespace intrusive {
@@ -40,7 +44,20 @@ enum link_mode_type{
//!the container without using any function provided by the containers.
auto_unlink
};
+
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+template <link_mode_type link_mode>
+struct is_safe_autounlink
+{
+ static const bool value =
+ (int)link_mode == (int)auto_unlink ||
+ (int)link_mode == (int)safe_link;
+};
+
+#endif //BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
} //namespace intrusive
} //namespace boost
-#endif //BOOST_INTRUSIVE_VALUE_LINK_TYPE_HPP
+#endif //BOOST_INTRUSIVE_LINK_MODE_HPP