From 08c1e93fa36a49f49325a07fe91ff92c964c2b6c Mon Sep 17 00:00:00 2001 From: Chanho Park Date: Thu, 11 Dec 2014 18:55:56 +0900 Subject: Imported Upstream version 1.57.0 --- boost/container/options.hpp | 76 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 boost/container/options.hpp (limited to 'boost/container/options.hpp') diff --git a/boost/container/options.hpp b/boost/container/options.hpp new file mode 100644 index 0000000000..c36ad30143 --- /dev/null +++ b/boost/container/options.hpp @@ -0,0 +1,76 @@ +///////////////////////////////////////////////////////////////////////////// +// +// (C) Copyright Ion Gaztanaga 2013-2013 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/container for documentation. +// +///////////////////////////////////////////////////////////////////////////// + +#ifndef BOOST_CONTAINER_OPTIONS_HPP +#define BOOST_CONTAINER_OPTIONS_HPP + +#if defined(_MSC_VER) +# pragma once +#endif + +#include +#include +#include + +namespace boost { +namespace container { + +#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + +template +struct tree_opt +{ + static const boost::container::tree_type_enum tree_type = TreeType; + static const bool optimize_size = OptimizeSize; +}; + +#endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED) + +//!This option setter specifies the underlying tree type +//!(red-black, AVL, Scapegoat or Splay) for ordered associative containers +BOOST_INTRUSIVE_OPTION_CONSTANT(tree_type, tree_type_enum, TreeType, tree_type) + +//!This option setter specifies if node size is optimized +//!storing rebalancing data masked into pointers for ordered associative containers +BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size) + +//! Helper metafunction to combine options into a single type to be used +//! by \c boost::container::set, \c boost::container::multiset +//! \c boost::container::map and \c boost::container::multimap. +//! Supported options are: \c boost::container::optimize_size and \c boost::container::tree_type +#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES) +template +#else +template +#endif +struct tree_assoc_options +{ + /// @cond + typedef typename ::boost::intrusive::pack_options + < tree_assoc_defaults, + #if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES) + O1, O2, O3, O4 + #else + Options... + #endif + >::type packed_options; + typedef tree_opt implementation_defined; + /// @endcond + typedef implementation_defined type; +}; + +} //namespace container { +} //namespace boost { + +#include + +#endif //#ifndef BOOST_CONTAINER_OPTIONS_HPP -- cgit v1.2.3