1 /////////////////////////////////////////////////////////////////////////////
3 // (C) Copyright Ion Gaztanaga 2006-2013
5 // Distributed under the Boost Software License, Version 1.0.
6 // (See accompanying file LICENSE_1_0.txt or copy at
7 // http://www.boost.org/LICENSE_1_0.txt)
9 // See http://www.boost.org/libs/intrusive for documentation.
11 /////////////////////////////////////////////////////////////////////////////
13 #ifndef BOOST_INTRUSIVE_LINK_MODE_HPP
14 #define BOOST_INTRUSIVE_LINK_MODE_HPP
16 #if defined(BOOST_HAS_PRAGMA_ONCE)
23 //!This enumeration defines the type of value_traits that can be defined
24 //!for Boost.Intrusive containers
26 //!If this linking policy is specified in a value_traits class
27 //!as the link_mode, containers
28 //!configured with such value_traits won't set the hooks
29 //!of the erased values to a default state. Containers also won't
30 //!check that the hooks of the new values are default initialized.
33 //!If this linking policy is specified in a value_traits class
34 //!as the link_mode, containers
35 //!configured with such value_traits will set the hooks
36 //!of the erased values to a default state. Containers also will
37 //!check that the hooks of the new values are default initialized.
40 //!Same as "safe_link" but the user type is an auto-unlink
41 //!type, so the containers with constant-time size features won't be
42 //!compatible with value_traits configured with this policy.
43 //!Containers also know that the a value can be silently erased from
44 //!the container without using any function provided by the containers.
48 #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
50 template <link_mode_type link_mode>
51 struct is_safe_autounlink
53 static const bool value =
54 (int)link_mode == (int)auto_unlink ||
55 (int)link_mode == (int)safe_link;
58 #endif //BOOST_INTRUSIVE_DOXYGEN_INVOKED
60 } //namespace intrusive
63 #endif //BOOST_INTRUSIVE_LINK_MODE_HPP