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/container_fwd.hpp | 223 +++++++++++++++++++++++++++----------- 1 file changed, 160 insertions(+), 63 deletions(-) (limited to 'boost/container/container_fwd.hpp') diff --git a/boost/container/container_fwd.hpp b/boost/container/container_fwd.hpp index c52b04a1c9..20ac77861d 100644 --- a/boost/container/container_fwd.hpp +++ b/boost/container/container_fwd.hpp @@ -1,6 +1,6 @@ ////////////////////////////////////////////////////////////////////////////// // -// (C) Copyright Ion Gaztanaga 2005-2012. Distributed under the Boost +// (C) Copyright Ion Gaztanaga 2005-2014. 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) // @@ -11,15 +11,42 @@ #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP #define BOOST_CONTAINER_CONTAINER_FWD_HPP -#if (defined _MSC_VER) && (_MSC_VER >= 1200) +#if defined(_MSC_VER) # pragma once #endif -////////////////////////////////////////////////////////////////////////////// -// Standard predeclarations -////////////////////////////////////////////////////////////////////////////// - -/// @cond +//! \file +//! This header file forward declares the following containers: +//! - boost::container::vector +//! - boost::container::stable_vector +//! - boost::container::static_vector +//! - boost::container::slist +//! - boost::container::list +//! - boost::container::set +//! - boost::container::multiset +//! - boost::container::map +//! - boost::container::multimap +//! - boost::container::flat_set +//! - boost::container::flat_multiset +//! - boost::container::flat_map +//! - boost::container::flat_multimap +//! - boost::container::basic_string +//! - boost::container::string +//! - boost::container::wstring +//! +//! It forward declares the following allocators: +//! - boost::container::allocator +//! - boost::container::node_allocator +//! - boost::container::adaptive_pool +//! +//! And finally it defines the following types + +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +//Std forward declarations +#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP + #include +#endif namespace boost{ namespace intrusive{ @@ -27,18 +54,12 @@ namespace intrusive{ }} namespace boost{ namespace container{ namespace container_detail{ - -namespace bi = boost::intrusive; - + namespace bi = boost::intrusive; }}} -#include -#include -#include -#include -#include +#include -/// @endcond +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED ////////////////////////////////////////////////////////////////////////////// // Containers @@ -47,111 +68,185 @@ namespace bi = boost::intrusive; namespace boost { namespace container { -//vector class +//! Enumeration used to configure ordered associative containers +//! with a concrete tree implementation. +enum tree_type_enum +{ + red_black_tree, + avl_tree, + scapegoat_tree, + splay_tree +}; + +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + template > + ,class Allocator = std::allocator > class vector; -//vector class template > + ,class Allocator = std::allocator > class stable_vector; -//vector class +template +class static_vector; + template > + ,class Allocator = std::allocator > class deque; -//list class template > + ,class Allocator = std::allocator > class list; -//slist class template > + ,class Allocator = std::allocator > class slist; -//set class -template - ,class A = std::allocator > +template +struct tree_opt; + +typedef tree_opt tree_assoc_defaults; + +template + ,class Allocator = std::allocator + ,class Options = tree_assoc_defaults > class set; -//multiset class -template - ,class A = std::allocator > +template + ,class Allocator = std::allocator + ,class Options = tree_assoc_defaults > class multiset; -//map class template - ,class A = std::allocator > > + ,class Compare = std::less + ,class Allocator = std::allocator > + ,class Options = tree_assoc_defaults > class map; -//multimap class template - ,class A = std::allocator > > + ,class Compare = std::less + ,class Allocator = std::allocator > + ,class Options = tree_assoc_defaults > class multimap; -//flat_set class -template - ,class A = std::allocator > +template + ,class Allocator = std::allocator > class flat_set; -//flat_multiset class -template - ,class A = std::allocator > +template + ,class Allocator = std::allocator > class flat_multiset; -//flat_map class template - ,class A = std::allocator > > + ,class Compare = std::less + ,class Allocator = std::allocator > > class flat_map; -//flat_multimap class template - ,class A = std::allocator > > + ,class Compare = std::less + ,class Allocator = std::allocator > > class flat_multimap; -//basic_string class template - ,class A = std::allocator > + ,class Allocator = std::allocator > class basic_string; +typedef basic_string + + ,std::allocator > +string; + +typedef basic_string + + ,std::allocator > +wstring; + +static const std::size_t ADP_nodes_per_block = 256u; +static const std::size_t ADP_max_free_blocks = 2u; +static const std::size_t ADP_overhead_percent = 1u; +static const std::size_t ADP_only_alignment = 0u; + +template < class T + , std::size_t NodesPerBlock = ADP_nodes_per_block + , std::size_t MaxFreeBlocks = ADP_max_free_blocks + , std::size_t OverheadPercent = ADP_overhead_percent + , unsigned Version = 2 + > +class adaptive_pool; + +template < class T + , unsigned Version = 2 + , unsigned int AllocationDisableMask = 0> +class allocator; + +static const std::size_t NodeAlloc_nodes_per_block = 256u; + +template + < class T + , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block + , std::size_t Version = 2> +class node_allocator; + +#else + +//! Default options for tree-based associative containers +//! - tree_type +//! - optimize_size +typedef implementation_defined tree_assoc_defaults; + +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + //! Type used to tag that the input range is //! guaranteed to be ordered struct ordered_range_t {}; +//! Value used to tag that the input range is +//! guaranteed to be ordered +static const ordered_range_t ordered_range = ordered_range_t(); + //! Type used to tag that the input range is //! guaranteed to be ordered and unique struct ordered_unique_range_t : public ordered_range_t {}; -//! Value used to tag that the input range is -//! guaranteed to be ordered -static const ordered_range_t ordered_range = ordered_range_t(); - //! Value used to tag that the input range is //! guaranteed to be ordered and unique static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); -/// @cond +//! Type used to tag that the inserted values +//! should be default initialized +struct default_init_t +{}; -namespace detail_really_deep_namespace { +//! Value used to tag that the inserted values +//! should be default initialized +static const default_init_t default_init = default_init_t(); +#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED + +//! Type used to tag that the inserted values +//! should be value initialized +struct value_init_t +{}; + +//! Value used to tag that the inserted values +//! should be value initialized +static const value_init_t value_init = value_init_t(); + +namespace container_detail_really_deep_namespace { //Otherwise, gcc issues a warning of previously defined //anonymous_instance and unique_instance @@ -161,12 +256,14 @@ struct dummy { (void)ordered_range; (void)ordered_unique_range; + (void)default_init; } }; } //detail_really_deep_namespace { -/// @endcond + +#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED }} //namespace boost { namespace container { -- cgit v1.2.3