Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: // Chris@101: // (C) Copyright Ion Gaztanaga 2005-2014. Distributed under the Boost Chris@16: // Software License, Version 1.0. (See accompanying file Chris@16: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/container for documentation. Chris@16: // Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: #ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP Chris@16: #define BOOST_CONTAINER_CONTAINER_FWD_HPP Chris@16: Chris@101: #ifndef BOOST_CONFIG_HPP Chris@101: # include Chris@101: #endif Chris@101: Chris@101: #if defined(BOOST_HAS_PRAGMA_ONCE) Chris@16: # pragma once Chris@16: #endif Chris@16: Chris@101: //! \file Chris@101: //! This header file forward declares the following containers: Chris@101: //! - boost::container::vector Chris@101: //! - boost::container::stable_vector Chris@101: //! - boost::container::static_vector Chris@101: //! - boost::container::slist Chris@101: //! - boost::container::list Chris@101: //! - boost::container::set Chris@101: //! - boost::container::multiset Chris@101: //! - boost::container::map Chris@101: //! - boost::container::multimap Chris@101: //! - boost::container::flat_set Chris@101: //! - boost::container::flat_multiset Chris@101: //! - boost::container::flat_map Chris@101: //! - boost::container::flat_multimap Chris@101: //! - boost::container::basic_string Chris@101: //! - boost::container::string Chris@101: //! - boost::container::wstring Chris@101: //! Chris@101: //! It forward declares the following allocators: Chris@101: //! - boost::container::allocator Chris@101: //! - boost::container::node_allocator Chris@101: //! - boost::container::adaptive_pool Chris@101: //! Chris@101: //! And finally it defines the following types Chris@16: Chris@101: #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED Chris@101: Chris@101: //Std forward declarations Chris@101: #ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP Chris@101: #include Chris@101: #endif Chris@16: Chris@16: namespace boost{ Chris@16: namespace intrusive{ Chris@16: //Create namespace to avoid compilation errors Chris@16: }} Chris@16: Chris@16: namespace boost{ namespace container{ namespace container_detail{ Chris@101: namespace bi = boost::intrusive; Chris@16: }}} Chris@16: Chris@101: #include Chris@16: Chris@101: #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED Chris@16: Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: // Containers Chris@16: ////////////////////////////////////////////////////////////////////////////// Chris@16: Chris@16: namespace boost { Chris@16: namespace container { Chris@16: Chris@101: //! Enumeration used to configure ordered associative containers Chris@101: //! with a concrete tree implementation. Chris@101: enum tree_type_enum Chris@101: { Chris@101: red_black_tree, Chris@101: avl_tree, Chris@101: scapegoat_tree, Chris@101: splay_tree Chris@101: }; Chris@101: Chris@101: #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED Chris@101: Chris@101: template Chris@101: class new_allocator; Chris@101: Chris@16: template > Chris@16: class vector; Chris@16: Chris@16: template > Chris@16: class stable_vector; Chris@16: Chris@101: template Chris@101: class static_vector; Chris@101: Chris@101: template < class T, std::size_t N Chris@101: , class Allocator= new_allocator > Chris@101: class small_vector; Chris@101: Chris@16: template > Chris@16: class deque; Chris@16: Chris@16: template > Chris@16: class list; Chris@16: Chris@16: template > Chris@16: class slist; Chris@16: Chris@101: template Chris@101: struct tree_opt; Chris@101: Chris@101: typedef tree_opt tree_assoc_defaults; Chris@101: Chris@16: template Chris@101: ,class Allocator = new_allocator Chris@101: ,class Options = tree_assoc_defaults > Chris@16: class set; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator Chris@101: ,class Options = tree_assoc_defaults > Chris@16: class multiset; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator > Chris@101: ,class Options = tree_assoc_defaults > Chris@16: class map; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator > Chris@101: ,class Options = tree_assoc_defaults > Chris@16: class multimap; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator > Chris@16: class flat_set; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator > Chris@16: class flat_multiset; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator > > Chris@16: class flat_map; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator > > Chris@16: class flat_multimap; Chris@16: Chris@16: template Chris@101: ,class Allocator = new_allocator > Chris@16: class basic_string; Chris@16: Chris@101: typedef basic_string Chris@101: Chris@101: ,new_allocator > Chris@101: string; Chris@101: Chris@101: typedef basic_string Chris@101: Chris@101: ,new_allocator > Chris@101: wstring; Chris@101: Chris@101: static const std::size_t ADP_nodes_per_block = 256u; Chris@101: static const std::size_t ADP_max_free_blocks = 2u; Chris@101: static const std::size_t ADP_overhead_percent = 1u; Chris@101: static const std::size_t ADP_only_alignment = 0u; Chris@101: Chris@101: template < class T Chris@101: , std::size_t NodesPerBlock = ADP_nodes_per_block Chris@101: , std::size_t MaxFreeBlocks = ADP_max_free_blocks Chris@101: , std::size_t OverheadPercent = ADP_overhead_percent Chris@101: , unsigned Version = 2 Chris@101: > Chris@101: class adaptive_pool; Chris@101: Chris@101: template < class T Chris@101: , unsigned Version = 2 Chris@101: , unsigned int AllocationDisableMask = 0> Chris@101: class allocator; Chris@101: Chris@101: static const std::size_t NodeAlloc_nodes_per_block = 256u; Chris@101: Chris@101: template Chris@101: < class T Chris@101: , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block Chris@101: , std::size_t Version = 2> Chris@101: class node_allocator; Chris@101: Chris@101: #else Chris@101: Chris@101: //! Default options for tree-based associative containers Chris@101: //! - tree_type Chris@101: //! - optimize_size Chris@101: typedef implementation_defined tree_assoc_defaults; Chris@101: Chris@101: #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED Chris@101: Chris@16: //! Type used to tag that the input range is Chris@16: //! guaranteed to be ordered Chris@16: struct ordered_range_t Chris@16: {}; Chris@16: Chris@16: //! Value used to tag that the input range is Chris@16: //! guaranteed to be ordered Chris@16: static const ordered_range_t ordered_range = ordered_range_t(); Chris@16: Chris@16: //! Type used to tag that the input range is Chris@16: //! guaranteed to be ordered and unique Chris@16: struct ordered_unique_range_t Chris@16: : public ordered_range_t Chris@16: {}; Chris@16: Chris@16: //! Value used to tag that the input range is Chris@16: //! guaranteed to be ordered and unique Chris@16: static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); Chris@16: Chris@101: //! Type used to tag that the inserted values Chris@101: //! should be default initialized Chris@16: struct default_init_t Chris@16: {}; Chris@16: Chris@101: //! Value used to tag that the inserted values Chris@101: //! should be default initialized Chris@16: static const default_init_t default_init = default_init_t(); Chris@101: #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED Chris@16: Chris@101: //! Type used to tag that the inserted values Chris@101: //! should be value initialized Chris@101: struct value_init_t Chris@101: {}; Chris@101: Chris@101: //! Value used to tag that the inserted values Chris@101: //! should be value initialized Chris@101: static const value_init_t value_init = value_init_t(); Chris@101: Chris@101: namespace container_detail_really_deep_namespace { Chris@16: Chris@16: //Otherwise, gcc issues a warning of previously defined Chris@16: //anonymous_instance and unique_instance Chris@16: struct dummy Chris@16: { Chris@16: dummy() Chris@16: { Chris@16: (void)ordered_range; Chris@16: (void)ordered_unique_range; Chris@16: (void)default_init; Chris@16: } Chris@16: }; Chris@16: Chris@16: } //detail_really_deep_namespace { Chris@16: Chris@101: Chris@101: #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED Chris@16: Chris@16: }} //namespace boost { namespace container { Chris@16: Chris@16: #endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP