Chris@102: ///////////////////////////////////////////////////////////////////////////// Chris@102: // Chris@102: // (C) Copyright Ion Gaztanaga 2013-2013 Chris@102: // Chris@102: // Distributed under the Boost Software License, Version 1.0. Chris@102: // (See accompanying file LICENSE_1_0.txt or copy at Chris@102: // http://www.boost.org/LICENSE_1_0.txt) Chris@102: // Chris@102: // See http://www.boost.org/libs/container for documentation. Chris@102: // Chris@102: ///////////////////////////////////////////////////////////////////////////// Chris@102: Chris@102: #ifndef BOOST_CONTAINER_OPTIONS_HPP Chris@102: #define BOOST_CONTAINER_OPTIONS_HPP Chris@102: Chris@102: #ifndef BOOST_CONFIG_HPP Chris@102: # include Chris@102: #endif Chris@102: Chris@102: #if defined(BOOST_HAS_PRAGMA_ONCE) Chris@102: # pragma once Chris@102: #endif Chris@102: Chris@102: #include Chris@102: #include Chris@102: #include Chris@102: Chris@102: namespace boost { Chris@102: namespace container { Chris@102: Chris@102: #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) Chris@102: Chris@102: template Chris@102: struct tree_opt Chris@102: { Chris@102: static const boost::container::tree_type_enum tree_type = TreeType; Chris@102: static const bool optimize_size = OptimizeSize; Chris@102: }; Chris@102: Chris@102: #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED) Chris@102: Chris@102: //!This option setter specifies the underlying tree type Chris@102: //!(red-black, AVL, Scapegoat or Splay) for ordered associative containers Chris@102: BOOST_INTRUSIVE_OPTION_CONSTANT(tree_type, tree_type_enum, TreeType, tree_type) Chris@102: Chris@102: //!This option setter specifies if node size is optimized Chris@102: //!storing rebalancing data masked into pointers for ordered associative containers Chris@102: BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size) Chris@102: Chris@102: //! Helper metafunction to combine options into a single type to be used Chris@102: //! by \c boost::container::set, \c boost::container::multiset Chris@102: //! \c boost::container::map and \c boost::container::multimap. Chris@102: //! Supported options are: \c boost::container::optimize_size and \c boost::container::tree_type Chris@102: #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES) Chris@102: template Chris@102: #else Chris@102: template Chris@102: #endif Chris@102: struct tree_assoc_options Chris@102: { Chris@102: /// @cond Chris@102: typedef typename ::boost::intrusive::pack_options Chris@102: < tree_assoc_defaults, Chris@102: #if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES) Chris@102: O1, O2, O3, O4 Chris@102: #else Chris@102: Options... Chris@102: #endif Chris@102: >::type packed_options; Chris@102: typedef tree_opt implementation_defined; Chris@102: /// @endcond Chris@102: typedef implementation_defined type; Chris@102: }; Chris@102: Chris@102: } //namespace container { Chris@102: } //namespace boost { Chris@102: Chris@102: #include Chris@102: Chris@102: #endif //#ifndef BOOST_CONTAINER_OPTIONS_HPP