|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85024 - in sandbox/tree_node: boost boost/algorithm boost/algorithm/sorting boost/tree_node/algorithm boost/tree_node/container boost/typeof/boost/tree_node/container libs/algorithm libs/algorithm/doc libs/algorithm/doc/html libs/algorithm/doc/html/boost libs/algorithm/doc/html/boost/algorithm libs/algorithm/doc/src libs/algorithm/doc/src/cartesian_sort libs/algorithm/test libs/tree_node/doc libs/tree_node/doc/html libs/tree_node/doc/html/tree_node libs/tree_node/doc/html/tree_node/concepts libs/tree_node/doc/html/tree_node/reference libs/tree_node/test
From: sponage_at_[hidden]
Date: 2013-07-13 14:05:43
Author: expaler
Date: 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013)
New Revision: 85024
URL: http://svn.boost.org/trac/boost/changeset/85024
Log:
Boost.TreeNode: updated to version 0.6.
Added:
sandbox/tree_node/boost/algorithm/
sandbox/tree_node/boost/algorithm/sorting/
sandbox/tree_node/boost/algorithm/sorting/cartesian_sort.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/binode_map.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/binode_map_fwd.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/binode_set.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/binode_set_fwd.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/deque.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/deque_fwd.hpp (contents, props changed)
sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_map.hpp (contents, props changed)
sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_set.hpp (contents, props changed)
sandbox/tree_node/boost/typeof/boost/tree_node/container/deque.hpp (contents, props changed)
sandbox/tree_node/libs/algorithm/
sandbox/tree_node/libs/algorithm/doc/
sandbox/tree_node/libs/algorithm/doc/html/
sandbox/tree_node/libs/algorithm/doc/html/boost/
sandbox/tree_node/libs/algorithm/doc/html/boost/algorithm/
sandbox/tree_node/libs/algorithm/doc/html/boost/algorithm/cartesian_sort.html (contents, props changed)
sandbox/tree_node/libs/algorithm/doc/src/
sandbox/tree_node/libs/algorithm/doc/src/cartesian_sort/
sandbox/tree_node/libs/algorithm/doc/src/cartesian_sort/Jamroot (contents, props changed)
sandbox/tree_node/libs/algorithm/doc/src/cartesian_sort/doc.qbk (contents, props changed)
sandbox/tree_node/libs/algorithm/test/
sandbox/tree_node/libs/algorithm/test/cartesian_sort.cpp (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/deque.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_deque.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/test/deque.cpp (contents, props changed)
Replaced:
sandbox/tree_node/boost/tree_node.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/binode_associative.hpp (contents, props changed)
sandbox/tree_node/boost/tree_node/container/binode_associative_fwd.hpp (contents, props changed)
sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_associative.hpp (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_assoc_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_base_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_base_type_generator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_binary_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_copyable_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_descendant_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_full_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_indexable_container.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_indexable_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_movable_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_nary_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_node_type_generator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_non_assoc_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_rvrsible_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concept_tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/concepts.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/index.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/changelog.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/associative_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/base_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/base_type_generator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/binary_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/copyable_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/full_tree_node_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/indexable_container.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/indexable_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/movable_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/nary_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/node_type_generator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/non_assoc_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/reversible_tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_desc_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/tree_node_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/accumulation_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/advance_binary.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/assoc_cont_derived_body.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/assoc_node_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/associative_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/associative_node_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/associative_node_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/at_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/avl_balancer.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_descendant.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_descendant_at_index.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_index_of.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_lower_bound.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_node_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_node_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_node_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binary_upper_bound.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binode_assoc_container.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binode_map.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binode_multimap.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binode_multiset.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binode_set.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/breadth_first_desc_iter.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/breadth_first_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/can_use_fusion.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/can_use_fusion_with_typeof.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/compare_selector.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/container_derived_body.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/copyable_and_movable.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/count_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/data_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/depth_first_desc_iter.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/depth_first_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/dereference_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/emplace_ctor_fwd_decl.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/emplace_ctor_inline_def.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/emplace_ctor_inline_hdr.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/emplace_ctor_w_alloc_f_dcl.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/emplace_ctor_w_alloc_i_def.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/emplace_ctor_w_alloc_i_hdr.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/get_keys.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/get_properties.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/has_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/height_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/in_order_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/nary_node.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/nary_node_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/nary_node_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/nary_node_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/null_balancer.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/position_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/post_order_desc_iter.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/post_order_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/pre_order_desc_iter.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/pre_order_iterator.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/red_black_balancer.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/red_black_flag_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/traversal_state.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/tree_node_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/value_at_key.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_accumulation.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_accumulation_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_accumulation_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_accumulation_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_count.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_count_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_count_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_count_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_height.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_height_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_height_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_height_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_position.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_position_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_position_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_position_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_rb_flag.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_rb_flag_base.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_rb_flag_base_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/with_rb_flag_gen.html (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_accumulation_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_advance_binary.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_assoc_cont_derived_body.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_assoc_node_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_associative_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_associative_node_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_associative_node_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_at_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_avl_balancer.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_bin_descendant_at_index.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_descendant.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_index_of.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_lower_bound.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_node_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_node_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_node_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binary_upper_bound.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binode_assoc_container.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binode_map.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binode_multimap.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binode_multiset.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_binode_set.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_breadth_first_desc_iter.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_breadth_first_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_can_use_fusion.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_can_use_fusion_w_typeof.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_compare_selector.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_container_derived_body.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_copyable_and_movable.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_count_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_data_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_depth_first_desc_iter.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_depth_first_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_dereference_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_empl_ctor_w_allc_f_decl.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_empl_ctor_w_allc_il_def.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_empl_ctor_w_allc_il_hdr.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_emplace_ctor_fwd_decl.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_emplace_ctor_inline_def.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_emplace_ctor_inline_hdr.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_get_keys.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_get_properties.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_has_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_height_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_in_order_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_nary_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_nary_node_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_nary_node_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_nary_node_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_null_balancer.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_position_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_post_order_desc_iter.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_post_order_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_pre_order_desc_iter.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_pre_order_iterator.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_red_black_balancer.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_red_black_flag_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_traversal_state.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_tree_node_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_value_at_key.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_accum_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_accumulation.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_accumulation_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_accumulation_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_count.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_count_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_count_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_count_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_height.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_height_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_height_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_height_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_position.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_position_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_position_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_position_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_rb_flag.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_rb_flag_base.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_rb_flag_base_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/ref_with_rb_flag_gen.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/reference.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/doc/tree_node.qbk (contents, props changed)
sandbox/tree_node/libs/tree_node/test/associative_node.cpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/avl_tree.hpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/binary_node.cpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/binode_map.cpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/binode_set.cpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/container_functions.hpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/inverted_index.cpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/iterator_functions.hpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/nary_node.cpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/red_black_tree.hpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/sequence.hpp (contents, props changed)
sandbox/tree_node/libs/tree_node/test/type_definitions.hpp (contents, props changed)
Deleted:
sandbox/tree_node/boost/tree_node/algorithm/cartesian_sort.hpp
sandbox/tree_node/boost/tree_node/container/binode.hpp
sandbox/tree_node/boost/tree_node/container/binode_fwd.hpp
sandbox/tree_node/boost/typeof/boost/tree_node/container/binode.hpp
sandbox/tree_node/libs/tree_node/doc/changelog.qbk
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/binode_container.html
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/cartesian_sort.html
sandbox/tree_node/libs/tree_node/doc/html/tree_node/reference/cartesian_sort_range.html
sandbox/tree_node/libs/tree_node/doc/ref_binode_container.qbk
sandbox/tree_node/libs/tree_node/doc/ref_cartesian_sort.qbk
sandbox/tree_node/libs/tree_node/doc/ref_cartesian_sort_range.qbk
sandbox/tree_node/libs/tree_node/test/binode_container.cpp
sandbox/tree_node/libs/tree_node/test/cartesian_sort.cpp
Added: sandbox/tree_node/boost/algorithm/sorting/cartesian_sort.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/algorithm/sorting/cartesian_sort.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,309 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_HPP
+#define BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_HPP
+
+#include <iterator>
+#include <functional>
+#include <algorithm>
+#include <boost/mpl/bool.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/range.hpp>
+#include <boost/bind.hpp>
+#include <boost/utility/equivalence_function.hpp>
+#include <boost/container_gen/selectors.hpp>
+#include <boost/tree_node/binary_node.hpp>
+#include <boost/tree_node/key/data.hpp>
+#include <boost/tree_node/intrinsic/at_key.hpp>
+#include <boost/tree_node/iterator/in_order.hpp>
+#include <boost/tree_node/selector/compare.hpp>
+#include <boost/assert.hpp>
+
+#if defined BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_USE_BREADTH_FIRST
+#include <boost/tree_node/iterator/breadth_first.hpp>
+#else
+#include <boost/tree_node/iterator/breadth_first_descendant.hpp>
+#endif
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/container/allocator_traits.hpp>
+#endif
+
+#if !defined BOOST_NO_SFINAE
+#include <boost/utility/enable_if.hpp>
+#include <boost/detail/metafunction/is_input_iterator.hpp>
+
+namespace boost { namespace algorithm {
+
+ template <typename Range, typename Compare>
+ void
+ cartesian_sort(
+ Range& range
+ , Compare compare
+ , typename ::boost::disable_if<
+ ::boost::detail::metafunction::is_input_iterator<Range>
+ , ::boost::mpl::true_
+ >::type = ::boost::mpl::true_()
+ );
+
+ template <typename Iterator>
+ void
+ cartesian_sort(
+ Iterator itr_begin
+ , Iterator itr_end
+ , typename ::boost::enable_if<
+ ::boost::detail::metafunction::is_input_iterator<Iterator>
+ , ::boost::mpl::true_
+ >::type = ::boost::mpl::true_()
+ );
+}} // namespace boost::algorithm
+#endif
+
+//[reference__cartesian_sort
+namespace boost { namespace algorithm {
+
+ template <typename Range>
+ Range& cartesian_sort(Range& r);
+
+//<-
+#if 0
+//->
+ template <typename Range, typename Compare>
+ Range& cartesian_sort(Range& r, Compare compare);
+//<-
+#endif
+//->
+
+//<-
+#if defined BOOST_NO_SFINAE
+//->
+ template <typename Iterator>
+ void cartesian_sort(Iterator itr_begin, Iterator itr_end);
+//<-
+#endif
+//->
+
+ template <typename Iterator, typename Compare>
+ void
+ cartesian_sort(
+ Iterator itr_begin
+ , Iterator itr_end
+ , Compare compare
+ );
+}} // namespace boost::algorithm
+//]
+
+namespace boost { namespace algorithm {
+
+ //[impl__cartesian_sort__build_tree
+ template <typename Iterator, typename Compare>
+ void
+ cartesian_sort(
+ Iterator itr_begin
+ , Iterator itr_end
+ , Compare compare
+ )
+ {
+ if (itr_begin == itr_end) return;
+
+ typedef typename ::boost::iterator_value<Iterator>::type Value;
+ typedef ::boost::tree_node::binary_node<Value> Node;
+ typedef typename Node::traits::allocator Alloc;
+
+ Alloc allocator;
+//<-
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename Node::pointer root_ptr = allocator.allocate(1);
+
+ allocator.construct(root_ptr, *itr_begin);
+#else
+//->
+ typename Node::pointer root_ptr = ::boost::container::allocator_traits<
+ Alloc
+ >::allocate(allocator, 1);
+
+ ::boost::container::allocator_traits<
+ Alloc
+ >::construct(allocator, root_ptr, *itr_begin);
+//<-
+#endif
+//->
+
+ typename Node::pointer right_ptr = root_ptr;
+ typename Node::pointer ancestor_ptr;
+
+ for (Iterator itr = itr_begin; ++itr != itr_end;)
+ {
+ if (compare(*itr, get(*root_ptr, ::boost::tree_node::data_key())))
+ {
+ right_ptr = root_ptr = root_ptr->emplace_parent_of_left(*itr);
+ }
+ else if (
+ !compare(*itr, get(*right_ptr, ::boost::tree_node::data_key()))
+ )
+ {
+ right_ptr = &*right_ptr->emplace_right(*itr);
+ }
+ else
+ {
+ for (
+ ancestor_ptr = right_ptr;
+ ancestor_ptr->get_parent_ptr() && compare(
+ *itr
+ , get(
+ *ancestor_ptr->get_parent_ptr()
+ , ::boost::tree_node::data_key()
+ )
+ );
+ ancestor_ptr = ancestor_ptr->get_parent_ptr()
+ )
+ {
+ }
+
+ BOOST_ASSERT(!!ancestor_ptr->get_parent_ptr());
+ right_ptr = ancestor_ptr->emplace_parent_of_left(*itr);
+ }
+ }
+ //]
+
+ //[impl__cartesian_sort__check_in_order_symmetry_with_input_range
+ BOOST_ASSERT(
+ ::std::equal(
+ itr_begin
+ , itr_end
+ , ::boost::make_transform_iterator(
+ make_in_order_iterator(*root_ptr)
+ , ::boost::tree_node::at_key< ::boost::tree_node::data_key>()
+ )
+ , ::boost::make_equivalence_function(compare)
+ )
+ );
+ //]
+
+#if defined BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_USE_BREADTH_FIRST
+ //[impl__cartesian_sort__breadth_first_iterate_with_priority
+ for (
+ ::boost::tree_node::breadth_first_iterator<
+ Node const
+ , ::boost::std_heap_selector< ::boost::tree_node::compareS>
+ > tree_itr(
+ *root_ptr
+ , ::boost::bind(compare, ::boost::arg<2>(), ::boost::arg<1>())
+ );
+ tree_itr;
+ ++tree_itr
+ )
+ {
+ BOOST_ASSERT(itr_begin != itr_end);
+ *itr_begin = get(*tree_itr, ::boost::tree_node::data_key());
+ ++itr_begin;
+ }
+ //]
+#else // !defined BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_USE_BREADTH_FIRST
+ //[impl__cartesian_sort__breadth_first_descendant_iterate_with_priority
+ *itr_begin = get(*root_ptr, ::boost::tree_node::data_key());
+ ++itr_begin;
+
+ for (
+ ::boost::tree_node::breadth_first_descendant_iterator<
+ Node const
+ , ::boost::std_heap_selector< ::boost::tree_node::compareS>
+ > tree_itr(
+ *root_ptr
+ , ::boost::bind(compare, ::boost::arg<2>(), ::boost::arg<1>())
+ );
+ tree_itr;
+ ++tree_itr
+ )
+ {
+ BOOST_ASSERT(itr_begin != itr_end);
+ *itr_begin = get(*tree_itr, ::boost::tree_node::data_key());
+ ++itr_begin;
+ }
+ //]
+#endif // BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_USE_BREADTH_FIRST
+
+ //[impl__cartesian_sort__cleanup
+ BOOST_ASSERT(itr_begin == itr_end);
+//<-
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ allocator.destroy(root_ptr);
+ allocator.deallocate(root_ptr, 1);
+#else
+//->
+ ::boost::container::allocator_traits<
+ Alloc
+ >::destroy(allocator, root_ptr);
+ ::boost::container::allocator_traits<
+ Alloc
+ >::deallocate(allocator, root_ptr, 1);
+//<-
+#endif
+//->
+ }
+ //]
+
+#if defined BOOST_NO_SFINAE
+ template <typename Iterator>
+ inline void cartesian_sort(Iterator itr_begin, Iterator itr_end)
+#else
+ template <typename Iterator>
+ inline void
+ cartesian_sort(
+ Iterator itr_begin
+ , Iterator itr_end
+ , typename ::boost::enable_if<
+ ::boost::detail::metafunction::is_input_iterator<Iterator>
+ , ::boost::mpl::true_
+ >::type
+ )
+#endif
+ {
+ cartesian_sort(
+ itr_begin
+ , itr_end
+ , ::std::less<typename ::boost::iterator_value<Iterator>::type>()
+ );
+ }
+
+ template <typename Range, typename Compare>
+#if defined BOOST_NO_SFINAE
+ inline Range& cartesian_sort_range(Range& r, Compare compare)
+#else
+ inline Range&
+ cartesian_sort(
+ Range& r
+ , Compare compare
+ , typename ::boost::disable_if<
+ ::boost::detail::metafunction::is_input_iterator<Range>
+ , ::boost::mpl::true_
+ >::type
+ )
+#endif
+ {
+ cartesian_sort(::boost::begin(r), ::boost::end(r), compare);
+ return r;
+ }
+
+ template <typename Range>
+ inline Range& cartesian_sort(Range& r)
+ {
+ cartesian_sort(
+ ::boost::begin(r)
+ , ::boost::end(r)
+ , ::std::less<
+ typename ::boost::iterator_value<
+ typename ::boost::range_iterator<Range>::type
+ >::type
+ >()
+ );
+ return r;
+ }
+}} // namespace boost::algorithm
+
+#endif // BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_HPP
+
Added: sandbox/tree_node/boost/tree_node.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,63 @@
+// Copyright (C) 2011-2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_HPP_INCLUDED
+#define BOOST_TREE_NODE_HPP_INCLUDED
+
+#include <boost/typeof/boost/tree_node/key/data.hpp>
+#include <boost/typeof/boost/tree_node/key/count.hpp>
+#include <boost/typeof/boost/tree_node/key/height.hpp>
+#include <boost/typeof/boost/tree_node/key/position.hpp>
+#include <boost/typeof/boost/tree_node/key/red_black_flag.hpp>
+#include <boost/tree_node/intrinsic/has_key.hpp>
+#include <boost/tree_node/intrinsic/get_keys.hpp>
+#include <boost/tree_node/intrinsic/at_key.hpp>
+#include <boost/tree_node/intrinsic/value_at_key.hpp>
+#include <boost/tree_node/algorithm/advance_binary.hpp>
+#include <boost/tree_node/algorithm/binary_index_of.hpp>
+#include <boost/tree_node/algorithm/binary_descendant.hpp>
+#include <boost/tree_node/algorithm/binary_descendant_at_index.hpp>
+#include <boost/tree_node/algorithm/binary_lower_bound.hpp>
+#include <boost/tree_node/algorithm/binary_upper_bound.hpp>
+#include <boost/tree_node/algorithm/cartesian_sort.hpp>
+#include <boost/typeof/boost/tree_node/selector/compare.hpp>
+#include <boost/typeof/boost/tree_node/traversal_state.hpp>
+#include <boost/tree_node/iterator/dereference.hpp>
+#include <boost/typeof/boost/tree_node/iterator/breadth_first.hpp>
+#include <boost/typeof/boost/tree_node/iterator/breadth_first_descendant.hpp>
+#include <boost/typeof/boost/tree_node/iterator/pre_order.hpp>
+#include <boost/typeof/boost/tree_node/iterator/pre_order_descendant.hpp>
+#include <boost/typeof/boost/tree_node/iterator/post_order.hpp>
+#include <boost/typeof/boost/tree_node/iterator/post_order_descendant.hpp>
+#include <boost/typeof/boost/tree_node/iterator/in_order.hpp>
+#include <boost/typeof/boost/tree_node/iterator/depth_first.hpp>
+#include <boost/typeof/boost/tree_node/iterator/depth_first_descendant.hpp>
+#include <boost/tree_node/base.hpp>
+#include <boost/tree_node/preprocessor.hpp>
+#include <boost/tree_node/traits/binary_node.hpp>
+#include <boost/typeof/boost/tree_node/binary_node.hpp>
+#include <boost/typeof/boost/tree_node/nary_node.hpp>
+#include <boost/typeof/boost/tree_node/associative_node.hpp>
+#include <boost/typeof/boost/tree_node/with_count.hpp>
+#include <boost/typeof/boost/tree_node/with_height.hpp>
+#include <boost/typeof/boost/tree_node/with_position.hpp>
+#include <boost/tree_node/traits/red_black_node.hpp>
+#include <boost/typeof/boost/tree_node/with_red_black_flag.hpp>
+#include <boost/typeof/boost/tree_node/balancer/null.hpp>
+#include <boost/typeof/boost/tree_node/balancer/red_black.hpp>
+#include <boost/typeof/boost/tree_node/balancer/adelson_velskii_landis.hpp>
+#include <boost/typeof/boost/tree_node/container/deque.hpp>
+#include <boost/typeof/boost/tree_node/container/binode_associative.hpp>
+#include <boost/typeof/boost/tree_node/container/binode_set.hpp>
+#include <boost/typeof/boost/tree_node/container/binode_map.hpp>
+
+#if defined BOOST_TREE_NODE_CAN_USE_FUSION
+#include <boost/typeof/boost/tree_node/key/accumulation.hpp>
+#include <boost/tree_node/intrinsic/get_properties.hpp>
+#include <boost/typeof/boost/tree_node/with_accumulation.hpp>
+#endif
+
+#endif // BOOST_TREE_NODE_HPP_INCLUDED
+
Deleted: sandbox/tree_node/boost/tree_node/algorithm/cartesian_sort.hpp
==============================================================================
--- sandbox/tree_node/boost/tree_node/algorithm/cartesian_sort.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85023)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,239 +0,0 @@
-// Copyright (C) 2013 Cromwell D. Enage
-// 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)
-
-#ifndef BOOST_TREE_NODE_ALGORITHM_CARTESIAN_SORT_HPP
-#define BOOST_TREE_NODE_ALGORITHM_CARTESIAN_SORT_HPP
-
-#include <iterator>
-#include <functional>
-#include <algorithm>
-#include <boost/iterator/iterator_traits.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/range.hpp>
-#include <boost/bind.hpp>
-#include <boost/utility/equivalence_function.hpp>
-#include <boost/container_gen/selectors.hpp>
-#include <boost/tree_node/binary_node.hpp>
-#include <boost/tree_node/key/data.hpp>
-#include <boost/tree_node/intrinsic/at_key.hpp>
-#include <boost/tree_node/iterator/in_order.hpp>
-#include <boost/tree_node/selector/compare.hpp>
-#include <boost/assert.hpp>
-
-#if defined BOOST_TREE_NODE_ALGORITHM_CARTESIAN_SORT_USE_BREADTH_FIRST
-#include <boost/tree_node/iterator/breadth_first.hpp>
-#else
-#include <boost/tree_node/iterator/breadth_first_descendant.hpp>
-#endif
-
-#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#include <boost/container/allocator_traits.hpp>
-#endif
-
-//[reference__cartesian_sort
-namespace boost { namespace tree_node {
-
- template <typename Iterator, typename Compare>
- void
- cartesian_sort(
- Iterator itr_begin
- , Iterator itr_end
- , Compare compare
- );
-
- template <typename Iterator>
- void cartesian_sort(Iterator itr_begin, Iterator itr_end);
-}} // namespace boost::tree_node
-//]
-
-//[reference__cartesian_sort_range
-namespace boost { namespace tree_node {
-
- template <typename Range, typename Compare>
- Range& cartesian_sort_range(Range& r, Compare compare);
-
- template <typename Range>
- Range& cartesian_sort_range(Range& r);
-}} // namespace boost::tree_node
-//]
-
-namespace boost { namespace tree_node {
-
- //[impl__cartesian_sort__build_tree
- template <typename Iterator, typename Compare>
- void
- cartesian_sort(
- Iterator itr_begin
- , Iterator itr_end
- , Compare compare
- )
- {
- if (itr_begin == itr_end) return;
-
- typedef typename ::boost::iterator_value<Iterator>::type Value;
- typedef ::boost::tree_node::binary_node<Value> Node;
- typedef typename Node::traits::allocator Alloc;
-
- Alloc allocator;
-//<-
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- typename Node::pointer root_ptr = allocator.allocate(1);
-
- allocator.construct(root_ptr, *itr_begin);
-#else
-//->
- typename Node::pointer root_ptr = ::boost::container::allocator_traits<
- Alloc
- >::allocate(allocator, 1);
-
- ::boost::container::allocator_traits<
- Alloc
- >::construct(allocator, root_ptr, *itr_begin);
-//<-
-#endif
-//->
-
- typename Node::pointer right_ptr = root_ptr;
- typename Node::pointer ancestor_ptr;
-
- for (Iterator itr = itr_begin; ++itr != itr_end;)
- {
- if (compare(*itr, get(*root_ptr, data_key())))
- {
- right_ptr = root_ptr = root_ptr->emplace_parent_of_left(*itr);
- }
- else if (!compare(*itr, get(*right_ptr, data_key())))
- {
- right_ptr = &*right_ptr->emplace_right(*itr);
- }
- else
- {
- for (
- ancestor_ptr = right_ptr;
- ancestor_ptr->get_parent_ptr() && compare(
- *itr
- , get(*ancestor_ptr->get_parent_ptr(), data_key())
- );
- ancestor_ptr = ancestor_ptr->get_parent_ptr()
- )
- {
- }
-
- BOOST_ASSERT(!!ancestor_ptr->get_parent_ptr());
- right_ptr = ancestor_ptr->emplace_parent_of_left(*itr);
- }
- }
- //]
-
- //[impl__cartesian_sort__check_in_order_symmetry_with_input_range
- BOOST_ASSERT(
- ::std::equal(
- itr_begin
- , itr_end
- , ::boost::make_transform_iterator(
- make_in_order_iterator(*root_ptr)
- , at_key<data_key>()
- )
- , ::boost::make_equivalence_function(compare)
- )
- );
- //]
-
-#if defined BOOST_TREE_NODE_ALGORITHM_CARTESIAN_SORT_USE_BREADTH_FIRST
- //[impl__cartesian_sort__breadth_first_iterate_with_priority
- for (
- breadth_first_iterator<
- Node const
- , ::boost::std_heap_selector< ::boost::tree_node::compareS>
- > itr(
- *root_ptr
- , ::boost::bind(compare, ::boost::arg<2>(), ::boost::arg<1>())
- );
- itr;
- ++itr
- )
- {
- BOOST_ASSERT(itr_begin != itr_end);
- *itr_begin = get(*itr, data_key());
- ++itr_begin;
- }
- //]
-#else // !defined BOOST_TREE_NODE_ALGORITHM_CARTESIAN_SORT_USE_BREADTH_FIRST
- //[impl__cartesian_sort__breadth_first_descendant_iterate_with_priority
- *itr_begin = get(*root_ptr, data_key());
- ++itr_begin;
-
- for (
- breadth_first_descendant_iterator<
- Node const
- , ::boost::std_heap_selector< ::boost::tree_node::compareS>
- > itr(
- *root_ptr
- , ::boost::bind(compare, ::boost::arg<2>(), ::boost::arg<1>())
- );
- itr;
- ++itr
- )
- {
- BOOST_ASSERT(itr_begin != itr_end);
- *itr_begin = get(*itr, data_key());
- ++itr_begin;
- }
- //]
-#endif // BOOST_TREE_NODE_ALGORITHM_CARTESIAN_SORT_USE_BREADTH_FIRST
-
- //[impl__cartesian_sort__cleanup
- BOOST_ASSERT(itr_begin == itr_end);
-//<-
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- allocator.destroy(root_ptr);
- allocator.deallocate(root_ptr, 1);
-#else
-//->
- ::boost::container::allocator_traits<
- Alloc
- >::destroy(allocator, root_ptr);
- ::boost::container::allocator_traits<
- Alloc
- >::deallocate(allocator, root_ptr, 1);
-//<-
-#endif
-//->
- }
- //]
-
- template <typename Iterator>
- inline void cartesian_sort(Iterator itr_begin, Iterator itr_end)
- {
- cartesian_sort(
- itr_begin
- , itr_end
- , ::std::less<typename ::boost::iterator_value<Iterator>::type>()
- );
- }
-
- template <typename Range, typename Compare>
- inline Range& cartesian_sort_range(Range& r, Compare compare)
- {
- cartesian_sort(::boost::begin(r), ::boost::end(r), compare);
- return r;
- }
-
- template <typename Range>
- inline Range& cartesian_sort_range(Range& r)
- {
- return cartesian_sort_range(
- r
- , ::std::less<
- typename ::boost::iterator_value<
- typename ::boost::range_iterator<Range>::type
- >::type
- >()
- );
- }
-}} // namespace boost::tree_node
-
-#endif // BOOST_TREE_NODE_ALGORITHM_CARTESIAN_SORT_HPP
-
Deleted: sandbox/tree_node/boost/tree_node/container/binode.hpp
==============================================================================
--- sandbox/tree_node/boost/tree_node/container/binode.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85023)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,2203 +0,0 @@
-// Copyright (C) 2013 Cromwell D. Enage
-// 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)
-
-#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_HPP_INCLUDED
-#define BOOST_TREE_NODE_CONTAINER_BINODE_HPP_INCLUDED
-
-#include <boost/config.hpp>
-
-#if !defined BOOST_NO_CXX11_NULLPTR
-#include <cstddef>
-#endif
-
-#include <algorithm>
-#include <utility>
-#include <boost/tr1/type_traits.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/apply_wrap.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/iterator/transform_iterator.hpp>
-#include <boost/utility/value_init.hpp>
-
-#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#include <boost/move/move.hpp>
-#include <boost/container/allocator_traits.hpp>
-#endif
-
-#include <boost/tree_node/preprocessor.hpp>
-#include <boost/tree_node/key/data.hpp>
-#include <boost/tree_node/key/count.hpp>
-#include <boost/tree_node/iterator/in_order.hpp>
-#include <boost/tree_node/intrinsic/has_key.hpp>
-#include <boost/tree_node/intrinsic/at_key.hpp>
-#include <boost/tree_node/intrinsic/value_at_key.hpp>
-#include <boost/tree_node/algorithm/binary_descendant_at_index.hpp>
-#include <boost/tree_node/container/binode_fwd.hpp>
-#include <boost/assert.hpp>
-
-namespace boost { namespace tree_node {
-
- template <typename T, typename NodeGenerator, typename Balancer>
- class binode_container
- {
-#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- BOOST_COPYABLE_AND_MOVABLE(binode_container)
-#endif
-
- public:
- //[reference__binode_container__value_type
- typedef T value_type;
- //]
-
- //[reference__binode_container__reference
- typedef value_type& reference;
- //]
-
- //[reference__binode_container__const_reference
- typedef value_type const& const_reference;
- //]
-
- //[reference__binode_container__pointer
- typedef value_type* pointer;
- //]
-
- //[reference__binode_container__const_pointer
- typedef value_type const* const_pointer;
- //]
-
- //[reference__binode_container__node
- typedef typename ::boost::mpl::apply_wrap1<
- NodeGenerator
- , value_type
- >::type
- node;
- //]
-
- //[reference__binode_container__allocator_type
- typedef typename node::traits::allocator allocator_type;
- //]
-
- //[reference__binode_container__iterator
- typedef ::boost::transform_iterator<
- at_key<data_key>
- , in_order_iterator<node>
- >
- iterator;
- //]
-
- //[reference__binode_container__const_iterator
- typedef ::boost::transform_iterator<
- at_key<data_key>
- , in_order_iterator<node const>
- >
- const_iterator;
- //]
-
- //[reference__binode_container__reverse_iterator
- typedef ::boost::transform_iterator<
- at_key<data_key>
- , in_order_iterator<node,::boost::mpl::true_>
- >
- reverse_iterator;
- //]
-
- //[reference__binode_container__const_reverse_iterator
- typedef ::boost::transform_iterator<
- at_key<data_key>
- , in_order_iterator<node const,::boost::mpl::true_>
- >
- const_reverse_iterator;
- //]
-
- //[reference__binode_container__size_type
- typedef typename ::boost::mpl::eval_if<
- result_of::has_key<node,count_key>
- , result_of::value_at_key<node,count_key>
- , typename node::size_type
- >::type
- size_type;
- //]
-
- private:
- allocator_type _allocator;
- typename node::pointer _root_ptr;
-
- public:
- //[reference__binode_container__default_ctor
- binode_container();
- //]
-
- //[reference__binode_container__ctor_w_alloc
- explicit binode_container(allocator_type const& allocator);
- //]
-
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- //[reference__binode_container__copy_ctor
- binode_container(binode_container const& copy);
- //]
-
- //[reference__binode_container__copy_ctor_w_alloc
- binode_container(
- binode_container const& copy
- , allocator_type const& allocator
- );
- //]
-
- //[reference__binode_container__copy_assign
- binode_container& operator=(binode_container const& copy);
- //]
-#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- binode_container(
- BOOST_COPY_ASSIGN_REF(binode_container) copy
- );
-
- binode_container(
- BOOST_COPY_ASSIGN_REF(binode_container) copy
- , allocator_type const& allocator
- );
-
- binode_container(
- BOOST_RV_REF(binode_container) source
- );
-
- binode_container(
- BOOST_RV_REF(binode_container) source
- , allocator_type const& allocator
- );
-
- binode_container& operator=(BOOST_RV_REF(binode_container) source);
-
- binode_container&
- operator=(BOOST_COPY_ASSIGN_REF(binode_container) copy);
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
- //[reference__binode_container__dtor
- ~binode_container();
- //]
-
- //[reference__binode_container__data__const
- typename node::const_pointer data() const;
- //]
-
- //[reference__binode_container__data
- typename node::pointer data();
- //]
-
- //[reference__binode_container__cbegin
- const_iterator cbegin() const;
- const_iterator begin() const;
- //]
-
- //[reference__binode_container__begin
- iterator begin();
- //]
-
- //[reference__binode_container__cend
- const_iterator cend() const;
- const_iterator end() const;
- //]
-
- //[reference__binode_container__end
- iterator end();
- //]
-
- //[reference__binode_container__crbegin
- const_reverse_iterator crbegin() const;
- const_reverse_iterator rbegin() const;
- //]
-
- //[reference__binode_container__rbegin
- reverse_iterator rbegin();
- //]
-
- //[reference__binode_container__crend
- const_reverse_iterator crend() const;
- const_reverse_iterator rend() const;
- //]
-
- //[reference__binode_container__rend
- reverse_iterator rend();
- //]
-
- //[reference__binode_container__cback
- const_reference back() const;
- //]
-
- //[reference__binode_container__back
- reference back();
- //]
-
- //[reference__binode_container__cfront
- const_reference front() const;
- //]
-
- //[reference__binode_container__front
- reference front();
- //]
-
- //[reference__binode_container__push_back
- void push_back(const_reference t);
- //]
-
- //[reference__binode_container__push_front
- void push_front(const_reference t);
- //]
-
- //[reference__binode_container__insert
- iterator insert(const_iterator itr, const_reference t);
- //]
-
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- void \
- emplace_back( \
- BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ); \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- void \
- emplace_front( \
- BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ); \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- iterator \
- emplace( \
- const_iterator itr \
- , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ); \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-#elif defined BOOST_CONTAINER_PERFECT_FORWARDING
- //[reference__binode_container__emplace_back
- template <typename ...Args>
- void emplace_back(Args&& ...args);
- //]
-
- //[reference__binode_container__emplace_front
- template <typename ...Args>
- void emplace_front(Args&& ...args);
- //]
-
- //[reference__binode_container__emplace
- template <typename ...Args>
- iterator emplace(const_iterator itr, Args&& ...args);
- //]
-#else // partial template specialization support, imperfect forwarding
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- void \
- emplace_back( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ); \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- void \
- emplace_front( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ); \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- iterator \
- emplace( \
- const_iterator itr \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ); \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-#endif // compiler defect handling
-
- //[reference__binode_container__pop_back
- void pop_back();
- //]
-
- //[reference__binode_container__pop_front
- void pop_front();
- //]
-
- //[reference__binode_container__erase
- iterator erase(const_iterator p);
- //]
-
- //[reference__binode_container__erase_range
- void erase(const_iterator itr, const_iterator itr_end);
- //]
-
- //[reference__binode_container__empty
- bool empty() const;
- //]
-
- //[reference__binode_container__clear
- void clear();
- //]
-
- //[reference__binode_container__size
- size_type size() const;
- //]
-
- //[reference__binode_container__index_operator__const
- const_reference operator[](size_type index) const;
- //]
-
- //[reference__binode_container__index_operator
- reference operator[](size_type index);
- //]
-
- private:
- static typename node::pointer
- _construct_from(
- ::std::tr1::true_type
- , allocator_type& allocator
- , value_type const& value
- );
-
- static typename node::pointer
- _construct_from(
- ::std::tr1::false_type
- , allocator_type& allocator
- , value_type const& value
- );
-
- static typename node::pointer
- _construct_from(
- ::std::tr1::true_type
- , allocator_type& allocator
- , typename node::pointer p
- );
-
- static typename node::pointer
- _construct_from(
- ::std::tr1::false_type
- , allocator_type& allocator
- , typename node::pointer p
- );
-
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- static typename node::pointer \
- _construct_from( \
- ::std::tr1::true_type \
- , allocator_type& allocator \
- , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ); \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- static typename node::pointer \
- _construct_from( \
- ::std::tr1::false_type \
- , allocator_type& allocator \
- , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ); \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-#elif defined BOOST_CONTAINER_PERFECT_FORWARDING
- template <typename ...Args>
- static typename node::pointer
- _construct_from(
- ::std::tr1::true_type
- , allocator_type& allocator
- , Args&& ...args
- );
-
- template <typename ...Args>
- static typename node::pointer
- _construct_from(
- ::std::tr1::false_type
- , allocator_type& allocator
- , Args&& ...args
- );
-#else // partial template specialization support, imperfect forwarding
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- static typename node::pointer \
- _construct_from( \
- ::std::tr1::true_type \
- , allocator_type& allocator \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ); \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- static typename node::pointer \
- _construct_from( \
- ::std::tr1::false_type \
- , allocator_type& allocator \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ); \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-#endif // compiler defect handling
-
- size_type _size(::boost::mpl::true_) const;
-
- size_type _size(::boost::mpl::false_) const;
-
- typename node::const_pointer _back() const;
-
- typename node::pointer _back();
- };
-
- template <typename T, typename NodeGenerator, typename Balancer>
- binode_container<T,NodeGenerator,Balancer>::binode_container()
- : _allocator()
- , _root_ptr(
-#if defined BOOST_NO_CXX11_NULLPTR
- 0
-#else
- nullptr
-#endif
- )
- {
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- binode_container<T,NodeGenerator,Balancer>::binode_container(
- allocator_type const& allocator
- ) : _allocator(allocator)
- , _root_ptr(
-#if defined BOOST_NO_CXX11_NULLPTR
- 0
-#else
- nullptr
-#endif
- )
- {
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::_construct_from(
- ::std::tr1::true_type
- , allocator_type& allocator
- , typename node::pointer p
- )
- {
- if (p)
- {
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- typename node::pointer result(allocator.allocate(1));
- allocator.construct(result, *p);
-#else
- typename node::pointer result(
- ::boost::container::allocator_traits<
- allocator_type
- >::allocate(allocator, 1)
- );
- ::boost::container::allocator_traits<
- allocator_type
- >::construct(allocator, result, *p);
-#endif
- return result;
- }
- else
- {
- return p;
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::_construct_from(
- ::std::tr1::false_type
- , allocator_type& allocator
- , typename node::pointer p
- )
- {
- if (p)
- {
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- typename node::pointer result(allocator.allocate(1));
- allocator.construct(result, *p, allocator);
-#else
- typename node::pointer result(
- ::boost::container::allocator_traits<
- allocator_type
- >::allocate(allocator, 1)
- );
- ::boost::container::allocator_traits<
- allocator_type
- >::construct(allocator, result, *p, allocator);
-#endif
- return result;
- }
- else
- {
- return p;
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- binode_container<T,NodeGenerator,Balancer>::binode_container(
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- binode_container const& copy
-#else
- BOOST_COPY_ASSIGN_REF(binode_container) copy
-#endif
- ) : _allocator(copy._allocator)
- , _root_ptr(
- this->_construct_from(
- ::std::tr1::is_const<
- typename ::std::tr1::remove_reference<
- typename node::traits::allocator_reference
- >::type
- >()
- , this->_allocator
- , copy._root_ptr
- )
- )
- {
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- binode_container<T,NodeGenerator,Balancer>::binode_container(
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- binode_container const& copy
-#else
- BOOST_COPY_ASSIGN_REF(binode_container) copy
-#endif
- , allocator_type const& allocator
- ) : _allocator(copy._allocator)
- , _root_ptr(
- this->_construct_from(
- ::std::tr1::is_const<
- typename ::std::tr1::remove_reference<
- typename node::traits::allocator_reference
- >::type
- >()
- , this->_allocator
- , copy._root_ptr
- )
- )
- {
- }
-
-#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- template <typename T, typename NodeGenerator, typename Balancer>
- binode_container<T,NodeGenerator,Balancer>::binode_container(
- BOOST_RV_REF(binode_container) source
- ) : _allocator(::boost::move(source._allocator))
- , _root_ptr(source._root_ptr)
- {
-#if defined BOOST_NO_CXX11_NULLPTR
- source._root_ptr = 0;
-#else
- source._root_ptr = nullptr;
-#endif
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- binode_container<T,NodeGenerator,Balancer>::binode_container(
- BOOST_RV_REF(binode_container) source
- , allocator_type const& allocator
- ) : _allocator(allocator), _root_ptr(source._root_ptr)
- {
-#if defined BOOST_NO_CXX11_NULLPTR
- source._root_ptr = 0;
-#else
- source._root_ptr = nullptr;
-#endif
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline binode_container<T,NodeGenerator,Balancer>&
- binode_container<T,NodeGenerator,Balancer>::operator=(
- BOOST_RV_REF(binode_container) source
- )
- {
- if (this != &static_cast<binode_container&>(source))
- {
- this->_allocator = ::boost::move(source._allocator);
- this->clear();
- this->_root_ptr = source._root_ptr;
-#if defined BOOST_NO_CXX11_NULLPTR
- source._root_ptr = 0;
-#else
- source._root_ptr = nullptr;
-#endif
- }
-
- return *this;
- }
-#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline binode_container<T,NodeGenerator,Balancer>&
- binode_container<T,NodeGenerator,Balancer>::operator=(
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- binode_container const& copy
-#else
- BOOST_COPY_ASSIGN_REF(binode_container) copy
-#endif
- )
- {
- if (this != ©)
- {
- if (copy._root_ptr)
- {
- if (this->_root_ptr)
- {
- *this->_root_ptr = *copy._root_ptr;
- }
- else
- {
- this->_root_ptr = this->_construct_from(
- ::std::tr1::is_const<
- typename ::std::tr1::remove_reference<
- typename node::traits::allocator_reference
- >::type
- >()
- , this->_allocator
- , copy._root_ptr
- );
- }
- }
- else
- {
- this->clear();
- }
- }
-
- return *this;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- binode_container<T,NodeGenerator,Balancer>::~binode_container()
- {
- this->clear();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<
- T
- , NodeGenerator
- , Balancer
- >::node::const_pointer
- binode_container<T,NodeGenerator,Balancer>::data() const
- {
- return this->_root_ptr;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::data()
- {
- return this->_root_ptr;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::const_iterator
- binode_container<T,NodeGenerator,Balancer>::cbegin() const
- {
- return this->_root_ptr ? const_iterator(
- make_in_order_iterator(*this->_root_ptr)
- , at_key<data_key>()
- ) : this->cend();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::const_iterator
- binode_container<T,NodeGenerator,Balancer>::begin() const
- {
- return this->_root_ptr ? const_iterator(
- make_in_order_iterator(*this->_root_ptr)
- , at_key<data_key>()
- ) : this->end();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::iterator
- binode_container<T,NodeGenerator,Balancer>::begin()
- {
- return this->_root_ptr ? iterator(
- make_in_order_iterator(*this->_root_ptr)
- , at_key<data_key>()
- ) : this->end();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::const_iterator
- binode_container<T,NodeGenerator,Balancer>::cend() const
- {
- return const_iterator(
- make_in_order_iterator_end(this->_root_ptr)
- , at_key<data_key>()
- );
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::const_iterator
- binode_container<T,NodeGenerator,Balancer>::end() const
- {
- return const_iterator(
- make_in_order_iterator_end(this->_root_ptr)
- , at_key<data_key>()
- );
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::iterator
- binode_container<T,NodeGenerator,Balancer>::end()
- {
- return iterator(
- make_in_order_iterator_end(this->_root_ptr)
- , at_key<data_key>()
- );
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<
- T
- , NodeGenerator
- , Balancer
- >::const_reverse_iterator
- binode_container<T,NodeGenerator,Balancer>::crbegin() const
- {
- return this->_root_ptr ? const_reverse_iterator(
- make_in_order_reverse_iterator(*this->_root_ptr)
- , at_key<data_key>()
- ) : this->crend();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<
- T
- , NodeGenerator
- , Balancer
- >::const_reverse_iterator
- binode_container<T,NodeGenerator,Balancer>::rbegin() const
- {
- return this->_root_ptr ? const_reverse_iterator(
- make_in_order_reverse_iterator(*this->_root_ptr)
- , at_key<data_key>()
- ) : this->rend();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<
- T
- , NodeGenerator
- , Balancer
- >::reverse_iterator
- binode_container<T,NodeGenerator,Balancer>::rbegin()
- {
- return this->_root_ptr ? reverse_iterator(
- make_in_order_reverse_iterator(*this->_root_ptr)
- , at_key<data_key>()
- ) : this->rend();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<
- T
- , NodeGenerator
- , Balancer
- >::const_reverse_iterator
- binode_container<T,NodeGenerator,Balancer>::crend() const
- {
- return const_reverse_iterator(
- make_in_order_reverse_iterator_end(this->_root_ptr)
- , at_key<data_key>()
- );
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<
- T
- , NodeGenerator
- , Balancer
- >::const_reverse_iterator
- binode_container<T,NodeGenerator,Balancer>::rend() const
- {
- return const_reverse_iterator(
- make_in_order_reverse_iterator_end(this->_root_ptr)
- , at_key<data_key>()
- );
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<
- T
- , NodeGenerator
- , Balancer
- >::reverse_iterator
- binode_container<T,NodeGenerator,Balancer>::rend()
- {
- return reverse_iterator(
- make_in_order_reverse_iterator_end(this->_root_ptr)
- , at_key<data_key>()
- );
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::const_reference
- binode_container<T,NodeGenerator,Balancer>::front() const
- {
- return *this->cbegin();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::reference
- binode_container<T,NodeGenerator,Balancer>::front()
- {
- return *this->begin();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::const_reference
- binode_container<T,NodeGenerator,Balancer>::back() const
- {
- return *this->crbegin();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::reference
- binode_container<T,NodeGenerator,Balancer>::back()
- {
- return *this->rbegin();
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline void binode_container<T,NodeGenerator,Balancer>::pop_front()
- {
- this->erase(this->cbegin());
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::node::const_pointer
- binode_container<T,NodeGenerator,Balancer>::_back() const
- {
- typename node::const_pointer result = this->_root_ptr;
-
- if (result)
- {
- while (result->get_right_child_ptr())
- {
- result = result->get_right_child_ptr();
- }
- }
-
- return result;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::_back()
- {
- typename node::pointer result = this->_root_ptr;
-
- if (result)
- {
- while (result->get_right_child_ptr())
- {
- result = result->get_right_child_ptr();
- }
- }
-
- return result;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline void binode_container<T,NodeGenerator,Balancer>::pop_back()
- {
- this->erase(
- iterator(
- make_in_order_iterator_position(*this->_back())
- , at_key<data_key>()
- )
- );
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::_construct_from(
- ::std::tr1::true_type
- , allocator_type& allocator
- , value_type const& value
- )
- {
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- typename node::pointer result(allocator.allocate(1));
- allocator.construct(result, value);
-#else
- typename node::pointer result(
- ::boost::container::allocator_traits<
- allocator_type
- >::allocate(allocator, 1)
- );
- ::boost::container::allocator_traits<
- allocator_type
- >::construct(allocator, result, value);
-#endif
- return result;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::_construct_from(
- ::std::tr1::false_type
- , allocator_type& allocator
- , value_type const& value
- )
- {
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- typename node::pointer result(allocator.allocate(1));
- allocator.construct(
- result
- , ::boost::container::allocator_arg
- , allocator
- , value
- );
-#else
- typename node::pointer result(
- ::boost::container::allocator_traits<
- allocator_type
- >::allocate(allocator, 1)
- );
- ::boost::container::allocator_traits<allocator_type>::construct(
- allocator
- , result
- , ::boost::container::allocator_arg
- , allocator
- , value
- );
-#endif
- return result;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- void
- binode_container<T,NodeGenerator,Balancer>::push_front(
- const_reference t
- )
- {
- if (this->_root_ptr)
- {
- typename node::pointer p = this->_root_ptr;
-
- while (p->get_left_child_ptr())
- {
- p = p->get_left_child_ptr();
- }
-
- p = Balancer::post_insert(p = &*p->emplace_left(t));
-
- if (!p->get_parent_ptr())
- {
- this->_root_ptr = p;
- }
- }
- else // if (!this->_root_ptr)
- {
- this->_root_ptr = this->_construct_from(
- ::std::tr1::is_const<
- typename ::std::tr1::remove_reference<
- typename node::traits::allocator_reference
- >::type
- >()
- , this->_allocator
- , t
- );
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- void
- binode_container<T,NodeGenerator,Balancer>::push_back(
- const_reference t
- )
- {
- if (this->_root_ptr)
- {
- typename node::pointer p = this->_root_ptr;
-
- while (p->get_right_child_ptr())
- {
- p = p->get_right_child_ptr();
- }
-
- p = Balancer::post_insert(p = &*p->emplace_right(t));
-
- if (!p->get_parent_ptr())
- {
- this->_root_ptr = p;
- }
- }
- else // if (!this->_root_ptr)
- {
- this->_root_ptr = this->_construct_from(
- ::std::tr1::is_const<
- typename ::std::tr1::remove_reference<
- typename node::traits::allocator_reference
- >::type
- >()
- , this->_allocator
- , t
- );
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::iterator
- binode_container<T,NodeGenerator,Balancer>::insert(
- const_iterator itr
- , const_reference t
- )
- {
- if (itr.base())
- {
- typename node::pointer anc_ptr = const_cast<
- typename node::pointer
- >(&*itr.base());
- typename node::pointer node_ptr = anc_ptr->get_left_child_ptr();
-
- if (node_ptr)
- {
- while (node_ptr->get_right_child_ptr())
- {
- node_ptr = node_ptr->get_right_child_ptr();
- }
-
- node_ptr = &*node_ptr->emplace_right(t);
- }
- else
- {
- node_ptr = &*anc_ptr->emplace_left(t);
- }
-
- anc_ptr = Balancer::post_insert(node_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
-
- return iterator(
- make_in_order_iterator_position(*node_ptr)
- , at_key<data_key>()
- );
- }
- else // if (!itr)
- {
- this->push_back(t);
- return this->end();
- }
- }
-
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer \
- binode_container<T,NodeGenerator,Balancer>::_construct_from( \
- ::std::tr1::true_type \
- , allocator_type& allocator \
- , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ) \
- { \
- typename node::pointer result(allocator.allocate(1)); \
- allocator.construct( \
- result \
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ); \
- return result; \
- } \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer \
- binode_container<T,NodeGenerator,Balancer>::_construct_from( \
- ::std::tr1::false_type \
- , allocator_type& allocator \
- , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ) \
- { \
- typename node::pointer result(allocator.allocate(1)); \
- allocator.construct( \
- result \
- , ::boost::container::allocator_arg \
- , allocator \
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ); \
- return result; \
- } \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- void \
- binode_container<T,NodeGenerator,Balancer>::emplace_front( \
- BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ) \
- { \
- if (this->_root_ptr) \
- { \
- typename node::pointer p = this->_root; \
- while (p->get_left_child_ptr()) \
- { \
- p = p->get_left_child_ptr(); \
- } \
- p = Balancer::post_insert( \
- p = &*p->emplace_left( \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ) \
- ); \
- if (!p->get_parent_ptr()) \
- { \
- this->_root_ptr = p; \
- } \
- } \
- else \
- { \
- this->_root_ptr = this->_construct_from( \
- ::std::tr1::is_const< \
- typename ::std::tr1::remove_reference< \
- typename node::traits::allocator_reference \
- >::type \
- >() \
- , this->_allocator \
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ); \
- } \
- } \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- void \
- binode_container<T,NodeGenerator,Balancer>::emplace_back( \
- BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ) \
- { \
- if (this->_root_ptr) \
- { \
- typename node::pointer p = this->_root; \
- while (p->get_right_child_ptr()) \
- { \
- p = p->get_right_child_ptr(); \
- } \
- p = Balancer::post_insert( \
- p = &*p->emplace_right( \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ) \
- ); \
- if (!p->get_parent_ptr()) \
- { \
- this->_root_ptr = p; \
- } \
- } \
- else \
- { \
- this->_root_ptr = this->_construct_from( \
- ::std::tr1::is_const< \
- typename ::std::tr1::remove_reference< \
- typename node::traits::allocator_reference \
- >::type \
- >() \
- , this->_allocator \
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ); \
- } \
- } \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
- BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
- typename binode_container<T,NodeGenerator,Balancer>::iterator \
- binode_container<T,NodeGenerator,Balancer>::emplace( \
- const_iterator itr \
- , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
- ) \
- { \
- if (itr.base()) \
- { \
- typename node::pointer anc_ptr = const_cast< \
- typename node::pointer \
- >(&*itr.base()); \
- typename node::pointer node_ptr = ( \
- anc_ptr->get_left_child_ptr() \
- ); \
- if (node_ptr) \
- { \
- while (node_ptr->get_right_child_ptr()) \
- { \
- node_ptr = node_ptr->get_right_child_ptr(); \
- } \
- node_ptr = &*node_ptr->emplace_right( \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ); \
- } \
- else \
- { \
- node_ptr = &*anc_ptr->emplace_left( \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ); \
- } \
- anc_ptr = Balancer::post_insert(node_ptr); \
- if (!anc_ptr->get_parent_ptr()) \
- { \
- this->_root_ptr = anc_ptr; \
- } \
- return iterator( \
- make_in_order_iterator_position(*node_ptr) \
- , at_key<data_key>() \
- ); \
- } \
- else \
- { \
- this->emplace_back( \
- BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
- ); \
- return this->end(); \
- } \
- } \
-//!
- BOOST_PP_FOR(
- (0)
- , BOOST_CONTAINER_GEN_PP_PARAM_PRED
- , BOOST_CONTAINER_GEN_PP_PARAM_INC
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-#elif defined BOOST_CONTAINER_PERFECT_FORWARDING
- template <typename T, typename NodeGenerator, typename Balancer>
- template <typename ...Args>
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::_construct_from(
- ::std::tr1::true_type
- , allocator_type& allocator
- , Args&& ...args
- )
- {
- typename node::pointer result(
- ::boost::container::allocator_traits<
- allocator_type
- >::allocate(allocator, 1)
- );
- ::boost::container::allocator_traits<
- allocator_type
- >::construct(allocator, result, ::boost::forward<Args>(args)...);
- return result;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- template <typename ...Args>
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer
- binode_container<T,NodeGenerator,Balancer>::_construct_from(
- ::std::tr1::false_type
- , allocator_type& allocator
- , Args&& ...args
- )
- {
- typename node::pointer result(
- ::boost::container::allocator_traits<
- allocator_type
- >::allocate(allocator, 1)
- );
- ::boost::container::allocator_traits<allocator_type>::construct(
- allocator
- , result
- , ::boost::container::allocator_arg
- , allocator
- , ::boost::forward<Args>(args)...
- );
- return result;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- template <typename ...Args>
- void
- binode_container<T,NodeGenerator,Balancer>::emplace_front(
- Args&& ...args
- )
- {
- if (this->_root_ptr)
- {
- typename node::pointer p = this->_root;
-
- while (p->get_left_child_ptr())
- {
- p = p->get_left_child_ptr();
- }
-
- p = Balancer::post_insert(
- p = &*p->emplace_left(::boost::forward<Args>(args)...)
- );
-
- if (!p->get_parent_ptr())
- {
- this->_root_ptr = p;
- }
- }
- else // if (!this->_root_ptr)
- {
- this->_root_ptr = this->_construct_from(
- ::std::tr1::is_const<
- typename ::std::tr1::remove_reference<
- typename node::traits::allocator_reference
- >::type
- >()
- , this->_allocator
- , ::boost::forward<Args>(args)...
- );
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- template <typename ...Args>
- void
- binode_container<T,NodeGenerator,Balancer>::emplace_back(
- Args&& ...args
- )
- {
- if (this->_root_ptr)
- {
- typename node::pointer p = this->_root;
-
- while (p->get_right_child_ptr())
- {
- p = p->get_right_child_ptr();
- }
-
- p = Balancer::post_insert(
- p = &*p->emplace_right(::boost::forward<Args>(args)...)
- );
-
- if (!p->get_parent_ptr())
- {
- this->_root_ptr = p;
- }
- }
- else // if (!this->_root_ptr)
- {
- this->_root_ptr = this->_construct_from(
- ::std::tr1::is_const<
- typename ::std::tr1::remove_reference<
- typename node::traits::allocator_reference
- >::type
- >()
- , this->_allocator
- , ::boost::forward<Args>(args)...
- );
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- template <typename ...Args>
- typename binode_container<T,NodeGenerator,Balancer>::iterator
- binode_container<T,NodeGenerator,Balancer>::emplace(
- const_iterator itr
- , Args&& ...args
- )
- {
- if (itr.base())
- {
- typename node::pointer anc_ptr = const_cast<
- typename node::pointer
- >(&*itr.base());
- typename node::pointer node_ptr = anc_ptr->get_left_child_ptr();
-
- if (node_ptr)
- {
- while (node_ptr->get_right_child_ptr())
- {
- node_ptr = node_ptr->get_right_child_ptr();
- }
-
- node_ptr = &*node_ptr->emplace_right(
- ::boost::forward<Args>(args)...
- );
- }
- else
- {
- node_ptr = &*anc_ptr->emplace_left(
- ::boost::forward<Args>(args)...
- );
- }
-
- anc_ptr = Balancer::post_insert(node_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
-
- return iterator(
- make_in_order_iterator_position(*node_ptr)
- , at_key<data_key>()
- );
- }
- else // if (!itr)
- {
- this->emplace_back(::boost::forward<Args>(args)...);
- return this->end();
- }
- }
-#else // partial template specialization support, imperfect forwarding
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer \
- binode_container<T,NodeGenerator,Balancer>::_construct_from( \
- ::std::tr1::true_type \
- , allocator_type& allocator \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ) \
- { \
- typename node::pointer result( \
- ::boost::container::allocator_traits< \
- allocator_type \
- >::allocate(allocator, 1) \
- ); \
- ::boost::container::allocator_traits<allocator_type>::construct( \
- allocator \
- , result \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ); \
- return result; \
- } \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- typename binode_container<T,NodeGenerator,Balancer>::node::pointer \
- binode_container<T,NodeGenerator,Balancer>::_construct_from( \
- ::std::tr1::false_type \
- , allocator_type& allocator \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ) \
- { \
- typename node::pointer result( \
- ::boost::container::allocator_traits< \
- allocator_type \
- >::allocate(allocator, 1) \
- ); \
- ::boost::container::allocator_traits<allocator_type>::construct( \
- allocator \
- , result \
- , ::boost::container::allocator_arg \
- , allocator \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ); \
- return result; \
- } \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- void \
- binode_container<T,NodeGenerator,Balancer>::emplace_front( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ) \
- { \
- if (this->_root_ptr) \
- { \
- typename node::pointer p = this->_root; \
- while (p->get_left_child_ptr()) \
- { \
- p = p->get_left_child_ptr(); \
- } \
- p = Balancer::post_insert( \
- p = &*p->emplace_left( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ) \
- ); \
- if (!p->get_parent_ptr()) \
- { \
- this->_root_ptr = p; \
- } \
- } \
- else \
- { \
- this->_root_ptr = this->_construct_from( \
- ::std::tr1::is_const< \
- typename ::std::tr1::remove_reference< \
- typename node::traits::allocator_reference \
- >::type \
- >() \
- , this->_allocator \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ); \
- } \
- } \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- void \
- binode_container<T,NodeGenerator,Balancer>::emplace_back( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ) \
- { \
- if (this->_root_ptr) \
- { \
- typename node::pointer p = this->_root; \
- while (p->get_right_child_ptr()) \
- { \
- p = p->get_right_child_ptr(); \
- } \
- p = Balancer::post_insert( \
- p = &*p->emplace_right( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ) \
- ); \
- if (!p->get_parent_ptr()) \
- { \
- this->_root_ptr = p; \
- } \
- } \
- else \
- { \
- this->_root_ptr = this->_construct_from( \
- ::std::tr1::is_const< \
- typename ::std::tr1::remove_reference< \
- typename node::traits::allocator_reference \
- >::type \
- >() \
- , this->_allocator \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ); \
- } \
- } \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-
-#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
- template <typename T, typename NodeGenerator, typename Balancer> \
- BOOST_PP_EXPR_IF(n, template <) \
- BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
- BOOST_PP_EXPR_IF(n, >) \
- typename binode_container<T,NodeGenerator,Balancer>::iterator \
- binode_container<T,NodeGenerator,Balancer>::emplace( \
- const_iterator itr \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_LIST \
- , _ \
- ) \
- ) \
- { \
- if (itr.base()) \
- { \
- typename node::pointer anc_ptr = const_cast< \
- typename node::pointer \
- >(&*itr.base()); \
- typename node::pointer node_ptr = ( \
- anc_ptr->get_left_child_ptr() \
- ); \
- if (node_ptr) \
- { \
- while (node_ptr->get_right_child_ptr()) \
- { \
- node_ptr = node_ptr->get_right_child_ptr(); \
- } \
- node_ptr = &*node_ptr->emplace_right( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ); \
- } \
- else \
- { \
- node_ptr = &*anc_ptr->emplace_left( \
- BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ); \
- } \
- anc_ptr = Balancer::post_insert(node_ptr); \
- if (!anc_ptr->get_parent_ptr()) \
- { \
- this->_root_ptr = anc_ptr; \
- } \
- return iterator( \
- make_in_order_iterator_position(*node_ptr) \
- , at_key<data_key>() \
- ); \
- } \
- else \
- { \
- this->emplace_back( \
- BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
- n \
- , BOOST_CONTAINER_PP_PARAM_FORWARD \
- , _ \
- ) \
- ); \
- return this->end(); \
- } \
- } \
-//!
- BOOST_PP_REPEAT(
- BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
- , BOOST_TREE_NODE_EMPLACEMENT_IMPL
- , _
- )
-#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
-#endif // compiler defect handling
-
- template <typename T, typename NodeGenerator, typename Balancer>
- typename binode_container<T,NodeGenerator,Balancer>::iterator
- binode_container<T,NodeGenerator,Balancer>::erase(
- const_iterator itr
- )
- {
- if (itr.base()->empty() && (this->_root_ptr == &*itr.base()))
- {
- this->clear();
- return this->end();
- }
-
- typename node::pointer anc_ptr = const_cast<typename node::pointer>(
- &*itr.base()
- );
- iterator result(
- make_in_order_iterator_position(*anc_ptr)
- , at_key<data_key>()
- );
- bool must_erase_begin = (result == this->begin());
-
- if (!must_erase_begin)
- {
- --result;
- }
-
- for (typename node::pointer desc_ptr;;)
- {
- if (
- (desc_ptr = anc_ptr->get_left_child_ptr()) && (
- !anc_ptr->get_right_child_ptr()
- )
- )
- {
- while (desc_ptr->get_right_child_ptr())
- {
- desc_ptr = desc_ptr->get_right_child_ptr();
- }
-
- if (desc_ptr->get_parent_ptr() == anc_ptr)
- {
- if (!anc_ptr->get_right_child_ptr())
- {
- put(*anc_ptr, data_key(), get(*desc_ptr, data_key()));
-
- bool must_rebalance = Balancer::pre_erase(*desc_ptr);
-
- anc_ptr->erase_left();
-
- if (must_rebalance)
- {
- anc_ptr = Balancer::post_erase_left(anc_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
- }
-
- break;
- }
- }
- else // if (desc_ptr == anc_ptr->get_right_child_ptr())
- {
- put(*anc_ptr, data_key(), get(*desc_ptr, data_key()));
-
- if (desc_ptr->get_left_child_ptr())
- {
- anc_ptr = desc_ptr;
- }
- else // if (desc_ptr->empty())
- {
- anc_ptr = desc_ptr->get_parent_ptr();
-
- if (anc_ptr->get_left_child_ptr())
- {
- put(*desc_ptr, data_key(), get(*anc_ptr, data_key()));
- }
- else // desc_ptr is only child of anc_ptr
- {
- bool must_rebalance = Balancer::pre_erase(*desc_ptr);
-
- anc_ptr->erase_right();
-
- if (must_rebalance)
- {
- anc_ptr = Balancer::post_erase_right(anc_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
- }
-
- break;
- }
- }
-
- continue;
- }
- }
-
- if ((desc_ptr = anc_ptr->get_right_child_ptr()))
- {
- while (desc_ptr->get_left_child_ptr())
- {
- desc_ptr = desc_ptr->get_left_child_ptr();
- }
-
- put(*anc_ptr, data_key(), get(*desc_ptr, data_key()));
-
- if (desc_ptr->get_right_child_ptr())
- {
- if (desc_ptr->get_right_child_ptr()->empty())
- {
- bool must_rebalance = Balancer::pre_erase(*desc_ptr);
-
- anc_ptr->erase_right();
-
- if (must_rebalance)
- {
- anc_ptr = Balancer::post_erase_right(anc_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
- }
- }
- else
- {
- anc_ptr = desc_ptr;
- }
- }
- else if (desc_ptr->get_parent_ptr() == anc_ptr)
- {
- bool must_rebalance = Balancer::pre_erase(*desc_ptr);
-
- anc_ptr->erase_right();
-
- if (must_rebalance)
- {
- anc_ptr = Balancer::post_erase_right(anc_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
- }
-
- break;
- }
- else
- {
- BOOST_ASSERT(desc_ptr->empty());
- anc_ptr = desc_ptr->get_parent_ptr();
- BOOST_ASSERT(anc_ptr->get_left_child_ptr() == desc_ptr);
-
- if (anc_ptr->get_right_child_ptr())
- {
- put(*desc_ptr, data_key(), get(*anc_ptr, data_key()));
- }
- else // desc_ptr is only child of anc_ptr
- {
- bool must_rebalance = Balancer::pre_erase(*desc_ptr);
-
- anc_ptr->erase_left();
-
- if (must_rebalance)
- {
- anc_ptr = Balancer::post_erase_left(anc_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
- }
-
- break;
- }
- }
- }
- else // if (anc_ptr->empty())
- {
- desc_ptr = anc_ptr;
- anc_ptr = anc_ptr->get_parent_ptr();
-
- bool must_rebalance = Balancer::pre_erase(*desc_ptr);
-
- if (anc_ptr->get_left_child_ptr() == desc_ptr)
- {
- anc_ptr->erase_left();
-
- if (must_rebalance)
- {
- anc_ptr = Balancer::post_erase_left(anc_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
- }
- }
- else // if (anc_ptr->get_right_child_ptr() == desc_ptr)
- {
- anc_ptr->erase_right();
-
- if (must_rebalance)
- {
- anc_ptr = Balancer::post_erase_right(anc_ptr);
-
- if (!anc_ptr->get_parent_ptr())
- {
- this->_root_ptr = anc_ptr;
- }
- }
- }
-
- break;
- }
- }
-
- return must_erase_begin ? this->begin() : ++result;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- void
- binode_container<T,NodeGenerator,Balancer>::erase(
- const_iterator itr
- , const_iterator itr_end
- )
- {
- while (itr != itr_end)
- {
- itr = this->erase(itr);
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline bool binode_container<T,NodeGenerator,Balancer>::empty() const
- {
- return !this->_root_ptr;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- void binode_container<T,NodeGenerator,Balancer>::clear()
- {
- if (this->_root_ptr)
- {
-#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
- this->_allocator.destroy(this->_root_ptr);
- this->_allocator.deallocate(this->_root_ptr, 1);
-#else
- ::boost::container::allocator_traits<
- allocator_type
- >::destroy(this->_allocator, this->_root_ptr);
- ::boost::container::allocator_traits<
- allocator_type
- >::deallocate(this->_allocator, this->_root_ptr, 1);
-#endif
-
-#if defined BOOST_NO_CXX11_NULLPTR
- this->_root_ptr = 0;
-#else
- this->_root_ptr = nullptr;
-#endif
- }
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::size_type
- binode_container<T,NodeGenerator,Balancer>::_size(
- ::boost::mpl::true_
- ) const
- {
- return this->_root_ptr ? get(*this->_root_ptr, count_key()) : 0;
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::size_type
- binode_container<T,NodeGenerator,Balancer>::_size(
- ::boost::mpl::false_
- ) const
- {
- return ::std::distance(this->cbegin(), this->cend());
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::size_type
- binode_container<T,NodeGenerator,Balancer>::size() const
- {
- return this->_size(result_of::has_key<node,count_key>());
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::const_reference
- binode_container<T,NodeGenerator,Balancer>::operator[](
- size_type index
- ) const
- {
- BOOST_ASSERT_MSG(
- this->_root_ptr && (index < this->size())
- , "index out of bounds"
- );
-
- typename node::const_pointer node_ptr = this->_root_ptr;
-
- return get(*binary_descendant_at_index(node_ptr, index), data_key());
- }
-
- template <typename T, typename NodeGenerator, typename Balancer>
- inline typename binode_container<T,NodeGenerator,Balancer>::reference
- binode_container<T,NodeGenerator,Balancer>::operator[](size_type index)
- {
- BOOST_ASSERT_MSG(
- this->_root_ptr && (index < this->size())
- , "index out of bounds"
- );
-
- return get(
- *binary_descendant_at_index(this->_root_ptr, index)
- , data_key()
- );
- }
-}} // namespace boost::tree_node
-
-#endif // BOOST_TREE_NODE_CONTAINER_BINODE_HPP_INCLUDED
-
Added: sandbox/tree_node/boost/tree_node/container/binode_associative.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/binode_associative.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,5002 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+#if !defined BOOST_NO_CXX11_NULLPTR
+#include <cstddef>
+#endif
+
+#include <algorithm>
+#include <utility>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/utility/value_init.hpp>
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/move/move.hpp>
+#include <boost/container/allocator_traits.hpp>
+#endif
+
+#include <boost/tree_node/preprocessor.hpp>
+#include <boost/tree_node/key/data.hpp>
+#include <boost/tree_node/key/count.hpp>
+#include <boost/tree_node/iterator/in_order.hpp>
+#include <boost/tree_node/intrinsic/has_key.hpp>
+#include <boost/tree_node/intrinsic/value_at_key.hpp>
+#include <boost/tree_node/algorithm/binary_descendant.hpp>
+#include <boost/tree_node/algorithm/binary_lower_bound.hpp>
+#include <boost/tree_node/algorithm/binary_upper_bound.hpp>
+#include <boost/tree_node/algorithm/binary_descendant_at_index.hpp>
+#include <boost/tree_node/container/binode_associative_fwd.hpp>
+#include <boost/assert.hpp>
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ class binode_associative_container
+ {
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ BOOST_COPYABLE_AND_MOVABLE(binode_associative_container)
+#endif
+
+ public:
+ //[reference__binode_associative_container__key_type
+ typedef T1 key_type;
+ //]
+
+ //[reference__binode_associative_container__value_type
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_void<T2>
+ , T1
+ , ::std::pair<T1 const,T2>
+ >::type
+ value_type;
+ //]
+
+ //[reference__binode_associative_container__reference
+ typedef value_type& reference;
+ //]
+
+ //[reference__binode_associative_container__const_reference
+ typedef value_type const& const_reference;
+ //]
+
+ //[reference__binode_associative_container__pointer
+ typedef value_type* pointer;
+ //]
+
+ //[reference__binode_associative_container__const_pointer
+ typedef value_type const* const_pointer;
+ //]
+
+ //[reference__binode_associative_container__node
+ typedef typename ::boost::mpl::apply_wrap1<
+ NodeGenerator
+ , typename ::boost::mpl::if_<
+ ::std::tr1::is_void<T2>
+ , T1
+ , ::std::pair<T1,T2>
+ >::type
+ >::type
+ node;
+ //]
+
+ //[reference__binode_associative_container__allocator_type
+ typedef typename node::traits::allocator allocator_type;
+ //]
+
+ private:
+ //[reference__binode_associative_container__transform_function
+ struct simple_transform_function
+ {
+ typedef const_reference const_result;
+ typedef const_reference mutable_result;
+ const_reference operator()(node const& n) const;
+ };
+
+ struct pair_associative_transform_function
+ {
+ typedef ::std::pair<T1 const&,T2 const&> const_result;
+ typedef ::std::pair<T1 const&,T2&> mutable_result;
+ const_result operator()(node const& n) const;
+ mutable_result operator()(node& n) const;
+ };
+
+ typedef typename ::boost::mpl::if_<
+ ::std::tr1::is_void<T2>
+ , simple_transform_function
+ , pair_associative_transform_function
+ >::type
+ transform_function;
+ //]
+
+ public:
+ //[reference__binode_associative_container__iterator
+ typedef ::boost::transform_iterator<
+ transform_function
+ , in_order_iterator<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_void<T2>
+ , node const
+ , node
+ >::type
+ >
+ >
+ iterator;
+ //]
+
+ //[reference__binode_associative_container__const_iterator
+ typedef ::boost::transform_iterator<
+ transform_function
+ , in_order_iterator<node const>
+ >
+ const_iterator;
+ //]
+
+ //[reference__binode_associative_container__reverse_iterator
+ typedef ::boost::transform_iterator<
+ transform_function
+ , in_order_iterator<
+ typename ::boost::mpl::if_<
+ ::std::tr1::is_void<T2>
+ , node const
+ , node
+ >::type
+ , ::boost::mpl::true_
+ >
+ >
+ reverse_iterator;
+ //]
+
+ //[reference__binode_associative_container__const_reverse_iterator
+ typedef ::boost::transform_iterator<
+ transform_function
+ , in_order_iterator<node const,::boost::mpl::true_>
+ >
+ const_reverse_iterator;
+ //]
+
+ //[reference__binode_associative_container__size_type
+ typedef typename ::boost::mpl::eval_if<
+ result_of::has_key<node,count_key>
+ , result_of::value_at_key<node,count_key>
+ , typename node::size_type
+ >::type
+ size_type;
+ //]
+
+ //[reference__binode_associative_container__key_compare
+ typedef typename ::boost::mpl::apply_wrap1<
+ CompareSelector
+ , key_type
+ >::type
+ key_compare;
+ //]
+
+ //[reference__binode_associative_container__value_compare
+ class value_compare
+ {
+ //<-
+ key_compare const& _compare;
+ //->
+
+ public:
+ typedef bool result_type;
+
+ explicit value_compare(key_compare const& compare);
+ result_type operator()(const_reference, const_reference) const;
+ result_type operator()(node const& n, key_type const& key) const;
+ result_type operator()(key_type const& key, node const& n) const;
+
+ //<-
+ private:
+ result_type
+ _evaluate(
+ const_reference arg1
+ , const_reference arg2
+ , ::std::tr1::true_type
+ ) const;
+ result_type
+ _evaluate(
+ const_reference arg1
+ , const_reference arg2
+ , ::std::tr1::false_type
+ ) const;
+ result_type
+ _evaluate(
+ node const& n
+ , key_type const& key
+ , ::std::tr1::true_type
+ ) const;
+ result_type
+ _evaluate(
+ node const& n
+ , key_type const& key
+ , ::std::tr1::false_type
+ ) const;
+ result_type
+ _evaluate(
+ key_type const& key
+ , node const& n
+ , ::std::tr1::true_type
+ ) const;
+ result_type
+ _evaluate(
+ key_type const& key
+ , node const& n
+ , ::std::tr1::false_type
+ ) const;
+ //->
+ };
+ //]
+
+ private:
+ class insert_compare
+ {
+ key_compare const& _compare;
+
+ public:
+ typedef bool result_type;
+
+ explicit insert_compare(key_compare const& compare);
+ result_type operator()(node const&, const_reference) const;
+ result_type operator()(const_reference, node const&) const;
+
+ private:
+ result_type
+ _evaluate(
+ node const& n
+ , const_reference value
+ , ::std::tr1::true_type
+ ) const;
+ result_type
+ _evaluate(
+ node const& n
+ , const_reference value
+ , ::std::tr1::false_type
+ ) const;
+ result_type
+ _evaluate(
+ const_reference value
+ , node const& n
+ , ::std::tr1::true_type
+ ) const;
+ result_type
+ _evaluate(
+ const_reference value
+ , node const& n
+ , ::std::tr1::false_type
+ ) const;
+ };
+
+ allocator_type _allocator;
+ typename node::pointer _root_ptr;
+ key_compare _key_compare;
+ value_compare _value_compare;
+
+ public:
+ //[reference__binode_associative_container__default_ctor
+ binode_associative_container();
+ //]
+
+ //[reference__binode_associative_container__ctor_w_alloc
+ explicit binode_associative_container(allocator_type const& allocator);
+ //]
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ //[reference__binode_associative_container__copy_ctor
+ binode_associative_container(
+ binode_associative_container const& copy
+ );
+ //]
+
+ //[reference__binode_associative_container__copy_ctor_w_alloc
+ binode_associative_container(
+ binode_associative_container const& copy
+ , allocator_type const& allocator
+ );
+ //]
+
+ //[reference__binode_associative_container__copy_assign
+ binode_associative_container&
+ operator=(binode_associative_container const& copy);
+ //]
+#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ binode_associative_container(
+ BOOST_COPY_ASSIGN_REF(binode_associative_container) copy
+ );
+
+ binode_associative_container(
+ BOOST_COPY_ASSIGN_REF(binode_associative_container) copy
+ , allocator_type const& allocator
+ );
+
+ binode_associative_container(
+ BOOST_RV_REF(binode_associative_container) source
+ );
+
+ binode_associative_container(
+ BOOST_RV_REF(binode_associative_container) source
+ , allocator_type const& allocator
+ );
+
+ binode_associative_container&
+ operator=(BOOST_RV_REF(binode_associative_container) source);
+
+ binode_associative_container&
+ operator=(
+ BOOST_COPY_ASSIGN_REF(binode_associative_container) copy
+ );
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ //[reference__binode_associative_container__dtor
+ ~binode_associative_container();
+ //]
+
+ //[reference__binode_associative_container__data
+ typename node::const_pointer data() const;
+ //]
+
+ //[reference__binode_associative_container__cbegin
+ const_iterator cbegin() const;
+ const_iterator begin() const;
+ //]
+
+ //[reference__binode_associative_container__begin
+ iterator begin();
+ //]
+
+ //[reference__binode_associative_container__cend
+ const_iterator cend() const;
+ const_iterator end() const;
+ //]
+
+ //[reference__binode_associative_container__end
+ iterator end();
+ //]
+
+ //[reference__binode_associative_container__crbegin
+ const_reverse_iterator crbegin() const;
+ const_reverse_iterator rbegin() const;
+ //]
+
+ //[reference__binode_associative_container__rbegin
+ reverse_iterator rbegin();
+ //]
+
+ //[reference__binode_associative_container__crend
+ const_reverse_iterator crend() const;
+ const_reverse_iterator rend() const;
+ //]
+
+ //[reference__binode_associative_container__rend
+ reverse_iterator rend();
+ //]
+
+ //[reference__binode_associative_container__cfind
+ const_iterator find(key_type const& key) const;
+ //]
+
+ //[reference__binode_associative_container__find
+ iterator find(key_type const& key);
+ //]
+
+ //[reference__binode_associative_container__lower_bound__const
+ const_iterator lower_bound(key_type const& key) const;
+ //]
+
+ //[reference__binode_associative_container__lower_bound
+ iterator lower_bound(key_type const& key);
+ //]
+
+ //[reference__binode_associative_container__upper_bound__const
+ const_iterator upper_bound(key_type const& key) const;
+ //]
+
+ //[reference__binode_associative_container__upper_bound
+ iterator upper_bound(key_type const& key);
+ //]
+
+ //[reference__binode_associative_container__equal_range__const
+ ::std::pair<const_iterator,const_iterator>
+ equal_range(key_type const& key) const;
+ //]
+
+ //[reference__binode_associative_container__equal_range
+ ::std::pair<iterator,iterator> equal_range(key_type const& key);
+ //]
+
+ //[reference__binode_associative_container__insert
+ typename ::boost::mpl::if_<
+ IsMultipleAssociative
+ , iterator
+ , ::std::pair<iterator,bool>
+ >::type
+ insert(value_type const& value);
+ //]
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ typename ::boost::mpl::if_< \
+ IsMultipleAssociative \
+ , iterator \
+ , ::std::pair<iterator,bool> \
+ >::type \
+ emplace( \
+ BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#elif defined BOOST_CONTAINER_PERFECT_FORWARDING
+ //[reference__binode_associative_container__emplace
+ template <typename ...Args>
+ typename ::boost::mpl::if_<
+ IsMultipleAssociative
+ , iterator
+ , ::std::pair<iterator,bool>
+ >::type
+ emplace(Args&& ...args);
+ //]
+#else // partial template specialization support, imperfect forwarding
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ typename ::boost::mpl::if_< \
+ IsMultipleAssociative \
+ , iterator \
+ , ::std::pair<iterator,bool> \
+ >::type \
+ emplace( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#endif // compiler defect handling
+
+ //[reference__binode_associative_container__erase
+ size_type erase(key_type const& key);
+ //]
+
+ //[reference__binode_associative_container__empty
+ bool empty() const;
+ //]
+
+ //[reference__binode_associative_container__clear
+ void clear();
+ //]
+
+ //[reference__binode_associative_container__size
+ size_type size() const;
+ //]
+
+ //[reference__binode_associative_container__index_operator__const
+ typename transform_function::const_result
+ operator[](size_type const& index) const;
+ //]
+
+ //[reference__binode_associative_container__index_operator
+ typename transform_function::mutable_result
+ operator[](size_type const& index);
+ //]
+
+ private:
+ static typename node::pointer
+ _construct_node_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , value_type const& value
+ );
+
+ static typename node::pointer
+ _construct_node_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , value_type const& value
+ );
+
+ static typename node::pointer
+ _construct_node_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ );
+
+ static typename node::pointer
+ _construct_node_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ );
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ static typename node::pointer \
+ _construct_node_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ static typename node::pointer \
+ _construct_node_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ static value_type \
+ _construct_node_from( \
+ ::std::tr1::true_type \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ static value_type \
+ _construct_node_from( \
+ ::std::tr1::false_type \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ iterator \
+ _emplace( \
+ ::boost::mpl::true_ \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ ::std::pair<iterator,bool> \
+ _emplace( \
+ ::boost::mpl::false_ \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#elif defined BOOST_CONTAINER_PERFECT_FORWARDING
+ template <typename ...Args>
+ static typename node::pointer
+ _construct_node_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , Args&& ...args
+ );
+
+ template <typename ...Args>
+ static typename node::pointer
+ _construct_node_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , Args&& ...args
+ );
+
+ template <typename ...Args>
+ static value_type
+ _construct_value_from(
+ ::std::tr1::true_type
+ , Args&& ...args
+ );
+
+ template <typename ...Args>
+ static value_type
+ _construct_value_from(
+ ::std::tr1::false_type
+ , key_type const& key
+ , Args&& ...args
+ );
+
+ template <typename ...Args>
+ iterator _emplace(::boost::mpl::true_, Args&& ...args);
+
+ template <typename ...Args>
+ ::std::pair<iterator,bool>
+ _emplace(::boost::mpl::false_, Args&& ...args);
+#else // partial template specialization support, imperfect forwarding
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ static typename node::pointer \
+ _construct_node_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ static typename node::pointer \
+ _construct_node_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ static value_type \
+ _construct_value_from( \
+ ::std::tr1::true_type \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ static value_type \
+ _construct_value_from( \
+ ::std::tr1::false_type \
+ , key_type const& key \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_PP_DEC(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ iterator \
+ _emplace( \
+ ::boost::mpl::true_ \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ ::std::pair<iterator,bool> \
+ _emplace( \
+ ::boost::mpl::false_ \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#endif // compiler defect handling
+
+ iterator _insert(value_type const& value, ::boost::mpl::true_);
+
+ ::std::pair<iterator,bool>
+ _insert(value_type const& value, ::boost::mpl::false_);
+
+ void _erase_one(typename node::pointer p);
+
+ size_type _erase(key_type const& key, ::boost::mpl::true_);
+
+ size_type _erase(key_type const& key, ::boost::mpl::false_);
+
+ size_type _size(::boost::mpl::true_) const;
+
+ size_type _size(::boost::mpl::false_) const;
+ };
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_reference
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::simple_transform_function::operator()(node const& n) const
+ {
+ return get(n, data_key());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::pair_associative_transform_function::const_result
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::pair_associative_transform_function::operator()(node const& n) const
+ {
+ ::std::pair<T1,T2> const& p = get(n, data_key());
+ ::std::pair<T1 const&,T2 const&> result(p.first, p.second);
+ return result;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::pair_associative_transform_function::mutable_result
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::pair_associative_transform_function::operator()(node& n) const
+ {
+ ::std::pair<T1,T2>& p = get(n, data_key());
+ ::std::pair<T1 const&,T2&> result(p.first, p.second);
+ return result;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::value_compare(key_compare const& c) : _compare(c)
+ {
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::_evaluate(
+ const_reference arg1
+ , const_reference arg2
+ , ::std::tr1::true_type
+ ) const
+ {
+ return this->_compare(arg1, arg2);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::_evaluate(
+ const_reference arg1
+ , const_reference arg2
+ , ::std::tr1::false_type
+ ) const
+ {
+ return this->_compare(arg1.first, arg2.first);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::operator()(
+ const_reference arg1
+ , const_reference arg2
+ ) const
+ {
+ return this->_evaluate(arg1, arg2, ::std::tr1::is_void<T2>());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::_evaluate(
+ node const& n
+ , key_type const& key
+ , ::std::tr1::true_type
+ ) const
+ {
+ return this->_compare(get(n, data_key()), key);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::_evaluate(
+ node const& n
+ , key_type const& key
+ , ::std::tr1::false_type
+ ) const
+ {
+ return this->_compare(get(n, data_key()).first, key);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::operator()(node const& n, key_type const& key) const
+ {
+ return this->_evaluate(n, key, ::std::tr1::is_void<T2>());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::_evaluate(
+ key_type const& key
+ , node const& n
+ , ::std::tr1::true_type
+ ) const
+ {
+ return this->_compare(key, get(n, data_key()));
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::_evaluate(
+ key_type const& key
+ , node const& n
+ , ::std::tr1::false_type
+ ) const
+ {
+ return this->_compare(key, get(n, data_key()).first);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_compare::operator()(key_type const& key, node const& n) const
+ {
+ return this->_evaluate(key, n, ::std::tr1::is_void<T2>());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::insert_compare(key_compare const& c) : _compare(c)
+ {
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::_evaluate(
+ const_reference value
+ , node const& n
+ , ::std::tr1::true_type
+ ) const
+ {
+ return this->_compare(value, get(n, data_key()));
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::_evaluate(
+ const_reference value
+ , node const& n
+ , ::std::tr1::false_type
+ ) const
+ {
+ return this->_compare(value.first, get(n, data_key()).first);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::operator()(
+ const_reference value
+ , node const& n
+ ) const
+ {
+ return this->_evaluate(value, n, ::std::tr1::is_void<T2>());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::_evaluate(
+ node const& n
+ , const_reference value
+ , ::std::tr1::true_type
+ ) const
+ {
+ return this->_compare(get(n, data_key()), value);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::_evaluate(
+ node const& n
+ , const_reference value
+ , ::std::tr1::false_type
+ ) const
+ {
+ return this->_compare(get(n, data_key()).first, value.first);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::result_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert_compare::operator()(
+ node const& n
+ , const_reference value
+ ) const
+ {
+ return this->_evaluate(n, value, ::std::tr1::is_void<T2>());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::binode_associative_container()
+ : _allocator()
+ , _root_ptr(
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ )
+ , _key_compare()
+ , _value_compare(this->_key_compare)
+ {
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::binode_associative_container(allocator_type const& allocator)
+ : _allocator(allocator)
+ , _root_ptr(
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ )
+ , _key_compare()
+ , _value_compare(this->_key_compare)
+ {
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::node::pointer
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_node_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ )
+ {
+ if (p)
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(result, *p);
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, *p);
+#endif
+ return result;
+ }
+ else
+ {
+ return p;
+ }
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::node::pointer
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_node_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ )
+ {
+ if (p)
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(result, *p, allocator);
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, *p, allocator);
+#endif
+ return result;
+ }
+ else
+ {
+ return p;
+ }
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::binode_associative_container(
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ binode_associative_container const& copy
+#else
+ BOOST_COPY_ASSIGN_REF(binode_associative_container) copy
+#endif
+ ) : _allocator(copy._allocator)
+ , _root_ptr(
+ this->_construct_node_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , copy._root_ptr
+ )
+ )
+ , _key_compare(copy._key_compare)
+ , _value_compare(this->_key_compare)
+ {
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::binode_associative_container(
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ binode_associative_container const& copy
+#else
+ BOOST_COPY_ASSIGN_REF(binode_associative_container) copy
+#endif
+ , allocator_type const& allocator
+ ) : _allocator(allocator)
+ , _root_ptr(
+ this->_construct_node_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , copy._root_ptr
+ )
+ )
+ , _key_compare(copy._key_compare)
+ , _value_compare(this->_key_compare)
+ {
+ }
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::binode_associative_container(
+ BOOST_RV_REF(binode_associative_container) source
+ ) : _allocator(::boost::move(source._allocator))
+ , _root_ptr(source._root_ptr)
+ , _key_compare(::boost::move(source._key_compare))
+ , _value_compare(this->_key_compare)
+ {
+#if defined BOOST_NO_CXX11_NULLPTR
+ source._root_ptr = 0;
+#else
+ source._root_ptr = nullptr;
+#endif
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::binode_associative_container(
+ BOOST_RV_REF(binode_associative_container) source
+ , allocator_type const& allocator
+ ) : _allocator(allocator)
+ , _root_ptr(source._root_ptr)
+ , _key_compare(::boost::move(source._key_compare))
+ , _value_compare(this->_key_compare)
+ {
+#if defined BOOST_NO_CXX11_NULLPTR
+ source._root_ptr = 0;
+#else
+ source._root_ptr = nullptr;
+#endif
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >&
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::operator=(BOOST_RV_REF(binode_associative_container) source)
+ {
+ if (this != &static_cast<binode_associative_container&>(source))
+ {
+ this->_allocator = ::boost::move(source._allocator);
+ this->clear();
+ this->_root_ptr = source._root_ptr;
+#if defined BOOST_NO_CXX11_NULLPTR
+ source._root_ptr = 0;
+#else
+ source._root_ptr = nullptr;
+#endif
+ this->_key_compare = ::boost::move(source._key_compare);
+ }
+
+ return *this;
+ }
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >&
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::operator=(
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ binode_associative_container const& copy
+#else
+ BOOST_COPY_ASSIGN_REF(binode_associative_container) copy
+#endif
+ )
+ {
+ if (this != &static_cast<binode_associative_container const&>(copy))
+ {
+ if (copy._root_ptr)
+ {
+ if (this->_root_ptr)
+ {
+ *this->_root_ptr = *copy._root_ptr;
+ }
+ else
+ {
+ this->_root_ptr = this->_construct_node_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , copy._root_ptr
+ );
+ }
+ }
+ else
+ {
+ this->clear();
+ }
+
+ this->_key_compare = copy._key_compare;
+ }
+
+ return *this;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::~binode_associative_container()
+ {
+ this->clear();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::node::const_pointer
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::data() const
+ {
+ return this->_root_ptr;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::cbegin() const
+ {
+ return this->_root_ptr ? const_iterator(
+ make_in_order_iterator(*this->_root_ptr)
+ , transform_function()
+ ) : this->cend();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::begin() const
+ {
+ return this->_root_ptr ? const_iterator(
+ make_in_order_iterator(*this->_root_ptr)
+ , transform_function()
+ ) : this->end();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::begin()
+ {
+ return this->_root_ptr ? iterator(
+ make_in_order_iterator(*this->_root_ptr)
+ , transform_function()
+ ) : this->end();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::cend() const
+ {
+ return const_iterator(
+ make_in_order_iterator_end(this->_root_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::end() const
+ {
+ return const_iterator(
+ make_in_order_iterator_end(this->_root_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::end()
+ {
+ return iterator(
+ make_in_order_iterator_end(this->_root_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_reverse_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::crbegin() const
+ {
+ return this->_root_ptr ? const_reverse_iterator(
+ make_in_order_reverse_iterator(*this->_root_ptr)
+ , transform_function()
+ ) : this->crend();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_reverse_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::rbegin() const
+ {
+ return this->_root_ptr ? const_reverse_iterator(
+ make_in_order_reverse_iterator(*this->_root_ptr)
+ , transform_function()
+ ) : this->rend();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::reverse_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::rbegin()
+ {
+ return this->_root_ptr ? reverse_iterator(
+ make_in_order_reverse_iterator(*this->_root_ptr)
+ , transform_function()
+ ) : this->rend();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_reverse_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::crend() const
+ {
+ return const_reverse_iterator(
+ make_in_order_reverse_iterator_end(this->_root_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_reverse_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::rend() const
+ {
+ return const_reverse_iterator(
+ make_in_order_reverse_iterator_end(this->_root_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::reverse_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::rend()
+ {
+ return reverse_iterator(
+ make_in_order_reverse_iterator_end(this->_root_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::find(key_type const& key) const
+ {
+ typename node::const_pointer node_ptr = this->_root_ptr;
+
+ node_ptr = binary_descendant(node_ptr, key, this->_value_compare);
+ return node_ptr ? const_iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ ) : this->cend();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::find(key_type const& key)
+ {
+ typename node::pointer node_ptr = binary_descendant(
+ this->_root_ptr
+ , key
+ , this->_value_compare
+ );
+
+ return node_ptr ? iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ ) : this->end();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::lower_bound(key_type const& key) const
+ {
+ typename node::const_pointer node_ptr = this->_root_ptr;
+
+ node_ptr = binary_lower_bound(node_ptr, key, this->_value_compare);
+ return node_ptr ? const_iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ ) : this->cend();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::lower_bound(key_type const& key)
+ {
+ typename node::pointer node_ptr = binary_lower_bound(
+ this->_root_ptr
+ , key
+ , this->_value_compare
+ );
+
+ return node_ptr ? iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ ) : this->end();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::upper_bound(key_type const& key) const
+ {
+ typename node::const_pointer node_ptr = this->_root_ptr;
+
+ node_ptr = binary_upper_bound(node_ptr, key, this->_value_compare);
+ return node_ptr ? const_iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ ) : this->cend();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::upper_bound(key_type const& key)
+ {
+ typename node::pointer node_ptr = binary_upper_bound(
+ this->_root_ptr
+ , key
+ , this->_value_compare
+ );
+
+ return node_ptr ? iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ ) : this->end();
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline ::std::pair<
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ , typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::const_iterator
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::equal_range(key_type const& key) const
+ {
+ return ::std::make_pair(
+ this->lower_bound(key)
+ , this->upper_bound(key)
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline ::std::pair<
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ , typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::equal_range(key_type const& key)
+ {
+ return ::std::make_pair(
+ this->lower_bound(key)
+ , this->upper_bound(key)
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::node::pointer
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_node_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , value_type const& value
+ )
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(result, value);
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, value);
+#endif
+ return result;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::node::pointer
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_node_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , value_type const& value
+ )
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(
+ result
+ , ::boost::container::allocator_arg
+ , allocator
+ , value
+ );
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<allocator_type>::construct(
+ allocator
+ , result
+ , ::boost::container::allocator_arg
+ , allocator
+ , value
+ );
+#endif
+ return result;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_insert(value_type const& value, ::boost::mpl::true_)
+ {
+ if (!this->_root_ptr)
+ {
+ return iterator(
+ make_in_order_iterator(
+ *(
+ this->_root_ptr = this->_construct_node_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , value
+ )
+ )
+ )
+ , transform_function()
+ );
+ }
+
+ typename node::pointer node_ptr = binary_upper_bound(
+ this->_root_ptr
+ , value
+ , insert_compare(this->_key_compare)
+ );
+
+ if (node_ptr)
+ {
+ if (node_ptr->get_left_child_ptr())
+ {
+ for (
+ node_ptr = node_ptr->get_left_child_ptr();
+ node_ptr->get_right_child_ptr();
+ node_ptr = node_ptr->get_right_child_ptr()
+ )
+ {
+ }
+
+ node_ptr = &*node_ptr->emplace_right(value);
+ }
+ else
+ {
+ node_ptr = &*node_ptr->emplace_left(value);
+ }
+ }
+ else // if (!node_ptr)
+ {
+ for (
+ node_ptr = this->_root_ptr;
+ node_ptr->get_right_child_ptr();
+ node_ptr = node_ptr->get_right_child_ptr()
+ )
+ {
+ }
+
+ node_ptr = &*node_ptr->emplace_right(value);
+ }
+
+ node_ptr = Balancer::post_insert(node_ptr);
+
+ if (!node_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = node_ptr;
+ }
+
+ return iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ ::std::pair<
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ , bool
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_insert(value_type const& value, ::boost::mpl::false_)
+ {
+ if (!this->_root_ptr)
+ {
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator(
+ *(
+ this->_root_ptr = this->_construct_node_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , value
+ )
+ )
+ )
+ , transform_function()
+ )
+ , true
+ );
+ }
+
+ insert_compare compare(this->_key_compare);
+ typename node::pointer p = this->_root_ptr;
+
+ for (;;)
+ {
+ if (compare(value, *p))
+ {
+ if (p->get_left_child_ptr())
+ {
+ p = p->get_left_child_ptr();
+ }
+ else
+ {
+ typename node::pointer n = Balancer::post_insert(
+ p = &*p->emplace_left(value)
+ );
+
+ if (!n->get_parent_ptr())
+ {
+ this->_root_ptr = n;
+ }
+
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator_position(*p)
+ , transform_function()
+ )
+ , true
+ );
+ }
+ }
+ else if (compare(*p, value))
+ {
+ if (p->get_right_child_ptr())
+ {
+ p = p->get_right_child_ptr();
+ }
+ else
+ {
+ typename node::pointer n = Balancer::post_insert(
+ p = &*p->emplace_right(value)
+ );
+
+ if (!n->get_parent_ptr())
+ {
+ this->_root_ptr = n;
+ }
+
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator_position(*p)
+ , transform_function()
+ )
+ , true
+ );
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator_position(*p)
+ , transform_function()
+ )
+ , false
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename ::boost::mpl::if_<
+ IsMultipleAssociative
+ , typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ , ::std::pair<
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ , bool
+ >
+ >::type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::insert(value_type const& value)
+ {
+ return this->_insert(value, IsMultipleAssociative());
+ }
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::node::pointer \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_node_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ typename node::pointer result(allocator.allocate(1)); \
+ allocator.construct( \
+ result \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::node::pointer \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_node_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ typename node::pointer result(allocator.allocate(1)); \
+ allocator.construct( \
+ result \
+ , ::boost::container::allocator_arg \
+ , allocator \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ inline typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::value_type \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_value_from( \
+ ::std::tr1::true_type \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ return value_type( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ inline typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::value_type \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_value_from( \
+ ::std::tr1::false_type \
+ , key_type const& key \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ return value_type( \
+ key \
+ , T2(BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p)) \
+ ); \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_emplace( \
+ ::boost::mpl::true_ \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ if (!this->_root_ptr) \
+ { \
+ return iterator( \
+ make_in_order_iterator( \
+ *( \
+ this->_root_ptr = this->_construct_node_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_ENUM_TRAILING_PARAMS( \
+ BOOST_PP_SEQ_SIZE(seq) \
+ , p \
+ ) \
+ ) \
+ ) \
+ ) \
+ , transform_function() \
+ ); \
+ } \
+ typename node::pointer node_ptr = binary_upper_bound( \
+ this->_root_ptr \
+ , this->_construct_value_from( \
+ ::std::tr1::is_void<T2>() \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ) \
+ , insert_compare(this->_key_compare) \
+ ); \
+ if (node_ptr) \
+ { \
+ if (node_ptr->get_left_child_ptr()) \
+ { \
+ for ( \
+ node_ptr = node_ptr->get_left_child_ptr(); \
+ node_ptr->get_right_child_ptr(); \
+ node_ptr = node_ptr->get_right_child_ptr() \
+ ) \
+ { \
+ } \
+ node_ptr = &*node_ptr->emplace_right( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+ else \
+ { \
+ node_ptr = &*node_ptr->emplace_left( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+ } \
+ else \
+ { \
+ for ( \
+ node_ptr = this->_root_ptr; \
+ node_ptr->get_right_child_ptr(); \
+ node_ptr = node_ptr->get_right_child_ptr() \
+ ) \
+ { \
+ } \
+ node_ptr = &*node_ptr->emplace_right( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+ node_ptr = Balancer::post_insert(node_ptr); \
+ if (!node_ptr->get_parent_ptr()) \
+ { \
+ this->_root_ptr = node_ptr; \
+ } \
+ return iterator( \
+ make_in_order_iterator_position(*node_ptr) \
+ , transform_function() \
+ ); \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ ::std::pair< \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ , bool \
+ > \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_emplace( \
+ ::boost::mpl::false_ \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ if (!this->_root_ptr) \
+ { \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator( \
+ *( \
+ this->_root_ptr = this->_construct_node_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_ENUM_TRAILING_PARAMS( \
+ BOOST_PP_SEQ_SIZE(seq) \
+ , p \
+ ) \
+ ) \
+ ) \
+ ) \
+ , transform_function() \
+ ) \
+ , true \
+ ); \
+ } \
+ value_type value( \
+ this->_construct_value_from( \
+ ::std::tr1::is_void<T2>() \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ) \
+ ); \
+ insert_compare compare(this->_key_compare); \
+ typename node::pointer p = this->_root_ptr; \
+ for (;;) \
+ { \
+ if (compare(value, *p)) \
+ { \
+ if (p->get_left_child_ptr()) \
+ { \
+ p = p->get_left_child_ptr(); \
+ } \
+ else \
+ { \
+ typename node::pointer n = Balancer::post_insert( \
+ p = &*p->emplace_left( \
+ BOOST_PP_ENUM_PARAMS( \
+ BOOST_PP_SEQ_SIZE(seq) \
+ , p \
+ ) \
+ ) \
+ ); \
+ if (!n->get_parent_ptr()) \
+ { \
+ this->_root_ptr = n; \
+ } \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator_position(*p) \
+ , transform_function() \
+ ) \
+ , true \
+ ); \
+ } \
+ } \
+ else if (compare(*p, value)) \
+ { \
+ if (p->get_right_child_ptr()) \
+ { \
+ p = p->get_right_child_ptr(); \
+ } \
+ else \
+ { \
+ typename node::pointer n = Balancer::post_insert( \
+ p = &*p->emplace_right( \
+ BOOST_PP_ENUM_PARAMS( \
+ BOOST_PP_SEQ_SIZE(seq) \
+ , p \
+ ) \
+ ) \
+ ); \
+ if (!n->get_parent_ptr()) \
+ { \
+ this->_root_ptr = n; \
+ } \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator_position(*p) \
+ , transform_function() \
+ ) \
+ , true \
+ ); \
+ } \
+ } \
+ else \
+ { \
+ break; \
+ } \
+ } \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator_position(*p) \
+ , transform_function() \
+ ) \
+ , false \
+ ); \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ inline typename ::boost::mpl::if_< \
+ IsMultipleAssociative \
+ , typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ , ::std::pair< \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ , bool \
+ > \
+ >::type \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::emplace( \
+ BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ return this->_emplace( \
+ IsMultipleAssociative() \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#elif defined BOOST_CONTAINER_PERFECT_FORWARDING
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ template <typename ...Args>
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::node::pointer
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_node_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , Args&& ...args
+ )
+ {
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, ::boost::forward<Args>(args)...);
+ return result;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ template <typename ...Args>
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::node::pointer
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_node_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , Args&& ...args
+ )
+ {
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<allocator_type>::construct(
+ allocator
+ , result
+ , ::boost::container::allocator_arg
+ , allocator
+ , ::boost::forward<Args>(args)...
+ );
+ return result;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ template <typename ...Args>
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_value_from(
+ ::std::tr1::true_type
+ , Args&& ...args
+ )
+ {
+ return value_type(::boost::forward<Args>(args)...);
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ template <typename ...Args>
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::value_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_construct_value_from(
+ ::std::tr1::false_type
+ , key_type const& key
+ , Args&& ...args
+ )
+ {
+ return value_type(key, T2(::boost::forward<Args>(args)...));
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ template <typename ...Args>
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_emplace(::boost::mpl::true_, Args&& ...args)
+ {
+ if (!this->_root_ptr)
+ {
+ return iterator(
+ make_in_order_iterator(
+ *(
+ this->_root_ptr = this->_construct_node_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , ::boost::forward<Args>(args)...
+ )
+ )
+ )
+ , transform_function()
+ );
+ }
+
+ typename node::pointer node_ptr = binary_upper_bound(
+ this->_root_ptr
+ , this->_construct_value_from(
+ ::std::tr1::is_void<T2>()
+ , ::boost::forward<Args>(args)...
+ )
+ , insert_compare(this->_key_compare)
+ );
+
+ if (node_ptr)
+ {
+ if (node_ptr->get_left_child_ptr())
+ {
+ for (
+ node_ptr = node_ptr->get_left_child_ptr();
+ node_ptr->get_right_child_ptr();
+ node_ptr = node_ptr->get_right_child_ptr()
+ )
+ {
+ }
+
+ node_ptr = &*node_ptr->emplace_right(
+ ::boost::forward<Args>(args)...
+ );
+ }
+ else
+ {
+ node_ptr = &*node_ptr->emplace_left(
+ ::boost::forward<Args>(args)...
+ );
+ }
+ }
+ else // if (!node_ptr)
+ {
+ for (
+ node_ptr = this->_root_ptr;
+ node_ptr->get_right_child_ptr();
+ node_ptr = node_ptr->get_right_child_ptr()
+ )
+ {
+ }
+
+ node_ptr = &*node_ptr->emplace_right(
+ ::boost::forward<Args>(args)...
+ );
+ }
+
+ typename node::pointer anc_ptr = Balancer::post_insert(node_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+
+ return iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , transform_function()
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ template <typename ...Args>
+ ::std::pair<
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ , bool
+ >
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_emplace(::boost::mpl::false_, Args&& ...args)
+ {
+ if (!this->_root_ptr)
+ {
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator(
+ *(
+ this->_root_ptr = this->_construct_node_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , ::boost::forward<Args>(args)...
+ )
+ )
+ )
+ , transform_function()
+ )
+ , true
+ );
+ }
+
+ value_type value(
+ this->_construct_value_from(
+ ::std::tr1::is_void<T2>()
+ , ::boost::forward<Args>(args)...
+ )
+ );
+ insert_compare compare(this->_key_compare);
+ typename node::pointer p = this->_root_ptr;
+
+ for (;;)
+ {
+ if (compare(value, *p))
+ {
+ if (p->get_left_child_ptr())
+ {
+ p = p->get_left_child_ptr();
+ }
+ else
+ {
+ typename node::pointer n = Balancer::post_insert(
+ p = &*p->emplace_left(::boost::forward<Args>(args)...)
+ );
+
+ if (!n->get_parent_ptr())
+ {
+ this->_root_ptr = n;
+ }
+
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator_position(*p)
+ , transform_function()
+ )
+ , true
+ );
+ }
+ }
+ else if (compare(*p, value))
+ {
+ if (p->get_right_child_ptr())
+ {
+ p = p->get_right_child_ptr();
+ }
+ else
+ {
+ typename node::pointer n = Balancer::post_insert(
+ p = &*p->emplace_right(::boost::forward<Args>(args)...)
+ );
+
+ if (!n->get_parent_ptr())
+ {
+ this->_root_ptr = n;
+ }
+
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator_position(*p)
+ , transform_function()
+ )
+ , true
+ );
+ }
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ return ::std::make_pair(
+ iterator(
+ make_in_order_iterator_position(*p)
+ , transform_function()
+ )
+ , false
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ template <typename ...Args>
+ inline typename ::boost::mpl::if_<
+ IsMultipleAssociative
+ , typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ , ::std::pair<
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::iterator
+ , bool
+ >
+ >::type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::emplace(Args&& ...args)
+ {
+ return this->_emplace(
+ IsMultipleAssociative()
+ , ::boost::forward<Args>(args)...
+ );
+ }
+#else // partial template specialization support, imperfect forwarding
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::node::pointer \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_node_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ typename node::pointer result( \
+ ::boost::container::allocator_traits< \
+ allocator_type \
+ >::allocate(allocator, 1) \
+ ); \
+ ::boost::container::allocator_traits<allocator_type>::construct( \
+ allocator \
+ , result \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::node::pointer \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_node_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ typename node::pointer result( \
+ ::boost::container::allocator_traits< \
+ allocator_type \
+ >::allocate(allocator, 1) \
+ ); \
+ ::boost::container::allocator_traits<allocator_type>::construct( \
+ allocator \
+ , result \
+ , ::boost::container::allocator_arg \
+ , allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ inline typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::value_type \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_value_from( \
+ ::std::tr1::true_type \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ return value_type( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ inline typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::value_type \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_construct_value_from( \
+ ::std::tr1::false_type \
+ , key_type const& key \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ return value_type( \
+ key \
+ , T2( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ); \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_PP_DEC(BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS)
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_emplace( \
+ ::boost::mpl::true_ \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ if (!this->_root_ptr) \
+ { \
+ return iterator( \
+ make_in_order_iterator( \
+ *( \
+ this->_root_ptr = this->_construct_node_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ) \
+ ) \
+ , transform_function() \
+ ); \
+ } \
+ typename node::pointer node_ptr = binary_upper_bound( \
+ this->_root_ptr \
+ , this->_construct_value_from( \
+ ::std::tr1::is_void<T2>() \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ , insert_compare(this->_key_compare) \
+ ); \
+ if (node_ptr) \
+ { \
+ if (node_ptr->get_left_child_ptr()) \
+ { \
+ for ( \
+ node_ptr = node_ptr->get_left_child_ptr(); \
+ node_ptr->get_right_child_ptr(); \
+ node_ptr = node_ptr->get_right_child_ptr() \
+ ) \
+ { \
+ } \
+ node_ptr = &*node_ptr->emplace_right( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+ else \
+ { \
+ node_ptr = &*node_ptr->emplace_left( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+ } \
+ else \
+ { \
+ for ( \
+ node_ptr = this->_root_ptr; \
+ node_ptr->get_right_child_ptr(); \
+ node_ptr = node_ptr->get_right_child_ptr() \
+ ) \
+ { \
+ } \
+ node_ptr = &*node_ptr->emplace_right( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+ node_ptr = Balancer::post_insert(node_ptr); \
+ if (!node_ptr->get_parent_ptr()) \
+ { \
+ this->_root_ptr = node_ptr; \
+ } \
+ return iterator( \
+ make_in_order_iterator_position(*node_ptr) \
+ , transform_function() \
+ ); \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ ::std::pair< \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ , bool \
+ > \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::_emplace( \
+ ::boost::mpl::false_ \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ if (!this->_root_ptr) \
+ { \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator( \
+ *( \
+ this->_root_ptr = this->_construct_node_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ) \
+ ) \
+ , transform_function() \
+ ) \
+ , true \
+ ); \
+ } \
+ value_type value( \
+ this->_construct_value_from( \
+ ::std::tr1::is_void<T2>() \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ); \
+ insert_compare compare(this->_key_compare); \
+ typename node::pointer p = this->_root_ptr; \
+ for (;;) \
+ { \
+ if (compare(value, *p)) \
+ { \
+ if (p->get_left_child_ptr()) \
+ { \
+ p = p->get_left_child_ptr(); \
+ } \
+ else \
+ { \
+ typename node::pointer n = Balancer::post_insert( \
+ p = &*p->emplace_left( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ); \
+ if (!n->get_parent_ptr()) \
+ { \
+ this->_root_ptr = n; \
+ } \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator_position(*p) \
+ , transform_function() \
+ ) \
+ , true \
+ ); \
+ } \
+ } \
+ else if (compare(*p, value)) \
+ { \
+ if (p->get_right_child_ptr()) \
+ { \
+ p = p->get_right_child_ptr(); \
+ } \
+ else \
+ { \
+ typename node::pointer n = Balancer::post_insert( \
+ p = &*p->emplace_right( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ); \
+ if (!n->get_parent_ptr()) \
+ { \
+ this->_root_ptr = n; \
+ } \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator_position(*p) \
+ , transform_function() \
+ ) \
+ , true \
+ ); \
+ } \
+ } \
+ else \
+ { \
+ break; \
+ } \
+ } \
+ return ::std::make_pair( \
+ iterator( \
+ make_in_order_iterator_position(*p) \
+ , transform_function() \
+ ) \
+ , false \
+ ); \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template < \
+ typename NodeGenerator \
+ , typename T1 \
+ , typename T2 \
+ , typename IsMultipleAssociative \
+ , typename CompareSelector \
+ , typename Balancer \
+ > \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ inline typename ::boost::mpl::if_< \
+ IsMultipleAssociative \
+ , typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ , ::std::pair< \
+ typename binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::iterator \
+ , bool \
+ > \
+ >::type \
+ binode_associative_container< \
+ NodeGenerator \
+ , T1 \
+ , T2 \
+ , IsMultipleAssociative \
+ , CompareSelector \
+ , Balancer \
+ >::emplace( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ return this->_emplace( \
+ IsMultipleAssociative() \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#endif // compiler defect handling
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ void
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_erase_one(typename node::pointer p)
+ {
+ for (typename node::pointer s;;)
+ {
+ if (
+ (s = p->get_left_child_ptr()) && (
+ !p->get_right_child_ptr() || Balancer::choose_predecessor(
+ *typename node::const_pointer(p)
+ )
+ )
+ )
+ {
+ while (s->get_right_child_ptr())
+ {
+ s = s->get_right_child_ptr();
+ }
+
+ if (s->get_parent_ptr() == p)
+ {
+ if (!p->get_right_child_ptr())
+ {
+ put(*p, data_key(), get(*s, data_key()));
+
+ bool must_rebalance = Balancer::pre_erase(*s);
+
+ p->erase_left();
+
+ if (must_rebalance)
+ {
+ p = Balancer::post_erase_left(p);
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+
+ break;
+ }
+ }
+ else // if (s == s->get_parent_ptr()->get_right_child_ptr())
+ {
+ put(*p, data_key(), get(*s, data_key()));
+
+ if (s->get_left_child_ptr())
+ {
+ p = s;
+ }
+ else // if (s->empty())
+ {
+ p = s->get_parent_ptr();
+
+ if (p->get_left_child_ptr())
+ {
+ put(*s, data_key(), get(*p, data_key()));
+ }
+ else // s is only child of p
+ {
+ bool must_rebalance = Balancer::pre_erase(*s);
+
+ p->erase_right();
+
+ if (must_rebalance)
+ {
+ p = Balancer::post_erase_right(p);
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+
+ break;
+ }
+ }
+
+ continue;
+ }
+ }
+
+ if ((s = p->get_right_child_ptr()))
+ {
+ while (s->get_left_child_ptr())
+ {
+ s = s->get_left_child_ptr();
+ }
+
+ put(*p, data_key(), get(*s, data_key()));
+
+ if (s->get_right_child_ptr())
+ {
+ p = s;
+ }
+ else if (s->get_parent_ptr() == p)
+ {
+ bool must_rebalance = Balancer::pre_erase(*s);
+
+ p->erase_right();
+
+ if (must_rebalance)
+ {
+ p = Balancer::post_erase_right(p);
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+
+ break;
+ }
+ else
+ {
+ BOOST_ASSERT(s->empty());
+ p = s->get_parent_ptr();
+ BOOST_ASSERT(p->get_left_child_ptr() == s);
+
+ if (p->get_right_child_ptr())
+ {
+ put(*s, data_key(), get(*p, data_key()));
+ }
+ else // s is only child of p
+ {
+ bool must_rebalance = Balancer::pre_erase(*s);
+
+ p->erase_left();
+
+ if (must_rebalance)
+ {
+ p = Balancer::post_erase_left(p);
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+
+ break;
+ }
+ }
+ }
+ else // if (p->empty())
+ {
+ s = p;
+ p = p->get_parent_ptr();
+
+ bool must_rebalance = Balancer::pre_erase(*s);
+
+ if (p->get_left_child_ptr() == s)
+ {
+ p->erase_left();
+
+ if (must_rebalance)
+ {
+ p = Balancer::post_erase_left(p);
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ }
+ else // if (p->get_right_child_ptr() == s)
+ {
+ p->erase_right();
+
+ if (must_rebalance)
+ {
+ p = Balancer::post_erase_right(p);
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ }
+
+ break;
+ }
+ }
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::size_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_erase(key_type const& key, ::boost::mpl::true_)
+ {
+ size_type result = ::boost::initialized_value;
+
+ for (
+ typename node::pointer p;
+ (
+ p = binary_descendant(
+ this->_root_ptr
+ , key
+ , this->_value_compare
+ )
+ );
+ ++result
+ )
+ {
+ this->_erase_one(p);
+ }
+
+ return result;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::size_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_erase(key_type const& key, ::boost::mpl::false_)
+ {
+ this->_erase_one(
+ binary_descendant(
+ this->_root_ptr
+ , key
+ , this->_value_compare
+ )
+ );
+ return 1;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::size_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::erase(key_type const& key)
+ {
+ if (this->_root_ptr)
+ {
+ if (this->_root_ptr->empty())
+ {
+ this->clear();
+ return 1;
+ }
+ else
+ {
+ return this->_erase(key, IsMultipleAssociative());
+ }
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline bool
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::empty() const
+ {
+ return !this->_root_ptr;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ void
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::clear()
+ {
+ if (this->_root_ptr)
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ this->_allocator.destroy(this->_root_ptr);
+ this->_allocator.deallocate(this->_root_ptr, 1);
+#else
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::destroy(this->_allocator, this->_root_ptr);
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::deallocate(this->_allocator, this->_root_ptr, 1);
+#endif
+
+#if defined BOOST_NO_CXX11_NULLPTR
+ this->_root_ptr = 0;
+#else
+ this->_root_ptr = nullptr;
+#endif
+ }
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::size_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_size(::boost::mpl::true_) const
+ {
+ return this->_root_ptr ? get(*this->_root_ptr, count_key()) : 0;
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::size_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::_size(::boost::mpl::false_) const
+ {
+ return ::std::distance(this->cbegin(), this->cend());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::size_type
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::size() const
+ {
+ return this->_size(result_of::has_key<node,count_key>());
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::transform_function::const_result
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::operator[](size_type const& index) const
+ {
+ BOOST_ASSERT_MSG(
+ this->_root_ptr && (index < this->size())
+ , "index out of bounds"
+ );
+
+ typename node::const_pointer node_ptr = this->_root_ptr;
+
+ return transform_function()(
+ *binary_descendant_at_index(node_ptr, index)
+ );
+ }
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ inline typename binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::transform_function::mutable_result
+ binode_associative_container<
+ NodeGenerator
+ , T1
+ , T2
+ , IsMultipleAssociative
+ , CompareSelector
+ , Balancer
+ >::operator[](size_type const& index)
+ {
+ BOOST_ASSERT_MSG(
+ this->_root_ptr && (index < this->size())
+ , "index out of bounds"
+ );
+
+ return transform_function()(
+ *binary_descendant_at_index(this->_root_ptr, index)
+ );
+ }
+}} // namespace boost::tree_node
+
+#endif // BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_HPP_INCLUDED
+
Added: sandbox/tree_node/boost/tree_node/container/binode_associative_fwd.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/binode_associative_fwd.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,23 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_FWD_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_FWD_HPP_INCLUDED
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename NodeGenerator
+ , typename T1
+ , typename T2
+ , typename IsMultipleAssociative
+ , typename CompareSelector
+ , typename Balancer
+ >
+ class binode_associative_container;
+}} // namespace boost::tree_node
+
+#endif // BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_FWD_HPP_INCLUDED
+
Deleted: sandbox/tree_node/boost/tree_node/container/binode_fwd.hpp
==============================================================================
--- sandbox/tree_node/boost/tree_node/container/binode_fwd.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85023)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,23 +0,0 @@
-// Copyright (C) 2013 Cromwell D. Enage
-// 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)
-
-#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_FWD_HPP_INCLUDED
-#define BOOST_TREE_NODE_CONTAINER_BINODE_FWD_HPP_INCLUDED
-
-#include <boost/tree_node/binary_node.hpp>
-#include <boost/tree_node/balancer/null.hpp>
-
-namespace boost { namespace tree_node {
-
- template <
- typename T
- , typename NodeGenerator = binary_node_default_gen
- , typename Balancer = null_balancer
- >
- class binode_container;
-}} // namespace boost::tree_node
-
-#endif // BOOST_TREE_NODE_CONTAINER_BINODE_FWD_HPP_INCLUDED
-
Added: sandbox/tree_node/boost/tree_node/container/binode_map.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/binode_map.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,100 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_MAP_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_BINODE_MAP_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/tree_node/preprocessor.hpp>
+#include <boost/tree_node/container/binode_associative.hpp>
+#include <boost/tree_node/container/binode_map_fwd.hpp>
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename Key
+ , typename Mapped
+ , typename NodeGenerator
+ , typename Balancer
+ , typename CompareSelector
+ >
+ class binode_map
+ : public
+ //[reference__binode_map__bases
+ binode_associative_container<
+ NodeGenerator
+ , Key
+ , Mapped
+ , ::boost::mpl::false_
+ , CompareSelector
+ , Balancer
+ >
+ //]
+ {
+ typedef binode_associative_container<
+ NodeGenerator
+ , Key
+ , Mapped
+ , ::boost::mpl::false_
+ , CompareSelector
+ , Balancer
+ >
+ super_t;
+
+ public:
+ //[reference__binode_map__mapped_type
+ typedef Mapped mapped_type;
+ //]
+
+ BOOST_TREE_NODE_ASSOCIATIVE_CONTAINER_DERIVED_BODY(binode_map, super_t)
+ };
+}} // namespace boost::tree_node
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename Key
+ , typename Mapped
+ , typename NodeGenerator
+ , typename Balancer
+ , typename CompareSelector
+ >
+ class binode_multimap
+ : public
+ //[reference__binode_multimap__bases
+ binode_associative_container<
+ NodeGenerator
+ , Key
+ , Mapped
+ , ::boost::mpl::true_
+ , CompareSelector
+ , Balancer
+ >
+ //]
+ {
+ typedef binode_associative_container<
+ NodeGenerator
+ , Key
+ , Mapped
+ , ::boost::mpl::true_
+ , CompareSelector
+ , Balancer
+ >
+ super_t;
+
+ public:
+ //[reference__binode_multimap__mapped_type
+ typedef Mapped mapped_type;
+ //]
+
+ BOOST_TREE_NODE_ASSOCIATIVE_CONTAINER_DERIVED_BODY(
+ binode_multimap
+ , super_t
+ )
+ };
+}} // namespace boost::tree_node
+
+#endif // BOOST_TREE_NODE_CONTAINER_BINODE_MAP_HPP_INCLUDED
+
Added: sandbox/tree_node/boost/tree_node/container/binode_map_fwd.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/binode_map_fwd.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,35 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_MAP_FWD_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_BINODE_MAP_FWD_HPP_INCLUDED
+
+#include <boost/container_gen/selectors.hpp>
+#include <boost/tree_node/binary_node.hpp>
+#include <boost/tree_node/balancer/null.hpp>
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename Key
+ , typename Mapped
+ , typename NodeGenerator = binary_node_default_gen
+ , typename Balancer = null_balancer
+ , typename CompareSelector = ::boost::less_than_selector
+ >
+ class binode_map;
+
+ template <
+ typename Key
+ , typename Mapped
+ , typename NodeGenerator = binary_node_default_gen
+ , typename Balancer = null_balancer
+ , typename CompareSelector = ::boost::less_than_selector
+ >
+ class binode_multimap;
+}} // namespace boost::tree_node
+
+#endif // BOOST_TREE_NODE_CONTAINER_BINODE_MAP_FWD_HPP_INCLUDED
+
Added: sandbox/tree_node/boost/tree_node/container/binode_set.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/binode_set.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,90 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_SET_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_BINODE_SET_HPP_INCLUDED
+
+#include <boost/mpl/bool.hpp>
+#include <boost/tree_node/preprocessor.hpp>
+#include <boost/tree_node/container/binode_associative.hpp>
+#include <boost/tree_node/container/binode_set_fwd.hpp>
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename T
+ , typename NodeGenerator
+ , typename Balancer
+ , typename CompareSelector
+ >
+ class binode_set
+ : public
+ //[reference__binode_set__bases
+ binode_associative_container<
+ NodeGenerator
+ , T
+ , void
+ , ::boost::mpl::false_
+ , CompareSelector
+ , Balancer
+ >
+ //]
+ {
+ typedef binode_associative_container<
+ NodeGenerator
+ , T
+ , void
+ , ::boost::mpl::false_
+ , CompareSelector
+ , Balancer
+ >
+ super_t;
+
+ public:
+ BOOST_TREE_NODE_ASSOCIATIVE_CONTAINER_DERIVED_BODY(binode_set, super_t)
+ };
+}} // namespace boost::tree_node
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename T
+ , typename NodeGenerator
+ , typename Balancer
+ , typename CompareSelector
+ >
+ class binode_multiset
+ : public
+ //[reference__binode_multiset__bases
+ binode_associative_container<
+ NodeGenerator
+ , T
+ , void
+ , ::boost::mpl::true_
+ , CompareSelector
+ , Balancer
+ >
+ //]
+ {
+ typedef binode_associative_container<
+ NodeGenerator
+ , T
+ , void
+ , ::boost::mpl::true_
+ , CompareSelector
+ , Balancer
+ >
+ super_t;
+
+ public:
+ BOOST_TREE_NODE_ASSOCIATIVE_CONTAINER_DERIVED_BODY(
+ binode_multiset
+ , super_t
+ )
+ };
+}} // namespace boost::tree_node
+
+#endif // BOOST_TREE_NODE_CONTAINER_BINODE_SET_HPP_INCLUDED
+
Added: sandbox/tree_node/boost/tree_node/container/binode_set_fwd.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/binode_set_fwd.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,33 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_BINODE_SET_FWD_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_BINODE_SET_FWD_HPP_INCLUDED
+
+#include <boost/container_gen/selectors.hpp>
+#include <boost/tree_node/binary_node.hpp>
+#include <boost/tree_node/balancer/null.hpp>
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename T
+ , typename NodeGenerator = binary_node_default_gen
+ , typename Balancer = null_balancer
+ , typename CompareSelector = ::boost::less_than_selector
+ >
+ class binode_set;
+
+ template <
+ typename T
+ , typename NodeGenerator = binary_node_default_gen
+ , typename Balancer = null_balancer
+ , typename CompareSelector = ::boost::less_than_selector
+ >
+ class binode_multiset;
+}} // namespace boost::tree_node
+
+#endif // BOOST_TREE_NODE_CONTAINER_BINODE_SET_FWD_HPP_INCLUDED
+
Added: sandbox/tree_node/boost/tree_node/container/deque.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/deque.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,2823 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_DEQUE_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_DEQUE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+#if !defined BOOST_NO_CXX11_NULLPTR
+#include <cstddef>
+#endif
+
+#include <algorithm>
+#include <utility>
+#include <boost/tr1/type_traits.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/apply_wrap.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/iterator/transform_iterator.hpp>
+#include <boost/utility/value_init.hpp>
+
+#if !defined BOOST_NO_SFINAE
+#include <boost/utility/enable_if.hpp>
+#include <boost/detail/metafunction/is_input_iterator.hpp>
+#endif
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#include <boost/move/move.hpp>
+#include <boost/container/allocator_traits.hpp>
+#endif
+
+#if !defined BOOST_NO_LIMITS
+#include <boost/limits.hpp>
+#endif
+
+#include <boost/tree_node/preprocessor.hpp>
+#include <boost/tree_node/key/data.hpp>
+#include <boost/tree_node/key/count.hpp>
+#include <boost/tree_node/iterator/breadth_first.hpp>
+#include <boost/tree_node/iterator/in_order.hpp>
+#include <boost/tree_node/intrinsic/has_key.hpp>
+#include <boost/tree_node/intrinsic/at_key.hpp>
+#include <boost/tree_node/intrinsic/value_at_key.hpp>
+#include <boost/tree_node/algorithm/binary_descendant_at_index.hpp>
+#include <boost/tree_node/container/deque_fwd.hpp>
+#include <boost/assert.hpp>
+
+namespace boost { namespace tree_node {
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ class deque
+ {
+ typedef deque<T,NodeGenerator,Balancer> self;
+
+#if !defined BOOST_NO_SFINAE
+ struct enabler
+ {
+ };
+#endif
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ BOOST_COPYABLE_AND_MOVABLE(deque)
+#endif
+
+ public:
+ //[reference__deque__value_type
+ typedef T value_type;
+ //]
+
+ //[reference__deque__reference
+ typedef value_type& reference;
+ //]
+
+ //[reference__deque__const_reference
+ typedef value_type const& const_reference;
+ //]
+
+ //[reference__deque__pointer
+ typedef value_type* pointer;
+ //]
+
+ //[reference__deque__const_pointer
+ typedef value_type const* const_pointer;
+ //]
+
+ //[reference__deque__node
+ typedef typename ::boost::mpl::apply_wrap1<
+ NodeGenerator
+ , value_type
+ >::type
+ node;
+ //]
+
+ //[reference__deque__allocator_type
+ typedef typename node::traits::allocator allocator_type;
+ //]
+
+ //[reference__deque__iterator
+ typedef ::boost::transform_iterator<
+ at_key<data_key>
+ , in_order_iterator<node>
+ >
+ iterator;
+ //]
+
+ //[reference__deque__const_iterator
+ typedef ::boost::transform_iterator<
+ at_key<data_key>
+ , in_order_iterator<node const>
+ >
+ const_iterator;
+ //]
+
+ //[reference__deque__reverse_iterator
+ typedef ::boost::transform_iterator<
+ at_key<data_key>
+ , in_order_iterator<node,::boost::mpl::true_>
+ >
+ reverse_iterator;
+ //]
+
+ //[reference__deque__const_reverse_iterator
+ typedef ::boost::transform_iterator<
+ at_key<data_key>
+ , in_order_iterator<node const,::boost::mpl::true_>
+ >
+ const_reverse_iterator;
+ //]
+
+ //[reference__deque__size_type
+ typedef typename ::boost::mpl::eval_if<
+ result_of::has_key<node,count_key>
+ , result_of::value_at_key<node,count_key>
+ , typename node::size_type
+ >::type
+ size_type;
+ //]
+
+ private:
+ allocator_type _allocator;
+ typename node::pointer _root_ptr;
+
+ public:
+ //[reference__deque__default_fill_ctor
+ explicit deque(size_type n = ::boost::initialized_value);
+ //]
+
+ //[reference__deque__ctor_w_alloc
+ explicit deque(allocator_type const& allocator);
+ //]
+
+ //[reference__deque__default_fill_ctor_w_alloc
+ deque(size_type n, allocator_type const& allocator);
+ //]
+
+ //[reference__deque__fill_ctor
+ deque(size_type n, value_type const& t);
+ //]
+
+ //[reference__deque__fill_ctor_w_alloc
+ deque(
+ size_type n
+ , value_type const& t
+ , allocator_type const& allocator
+ );
+ //]
+
+#if defined BOOST_NO_SFINAE
+ deque(const_iterator itr_begin, const_iterator itr_end);
+
+ deque(
+ const_iterator itr_begin
+ , const_iterator itr_end
+ , allocator_type const& allocator
+ );
+#else
+ //[reference__deque__range_ctor
+ template <typename Iterator>
+ deque(
+ Iterator itr_begin
+ , Iterator itr_end
+ //<-
+ , typename ::boost::enable_if<
+ ::boost::detail::metafunction::is_input_iterator<Iterator>
+ , enabler
+ >::type = enabler()
+ //->
+ );
+ //]
+
+ //[reference__deque__range_ctor_w_alloc
+ template <typename Iterator>
+ deque(
+ Iterator itr_begin
+ , Iterator itr_end
+ , allocator_type const& allocator
+ //<-
+ , typename ::boost::enable_if<
+ ::boost::detail::metafunction::is_input_iterator<Iterator>
+ , enabler
+ >::type = enabler()
+ //->
+ );
+ //]
+#endif // BOOST_NO_SFINAE
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ //[reference__deque__copy_ctor
+ deque(deque const& copy);
+ //]
+
+ //[reference__deque__copy_ctor_w_alloc
+ deque(deque const& copy, allocator_type const& allocator);
+ //]
+
+ //[reference__deque__copy_assign
+ deque& operator=(deque const& copy);
+ //]
+#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ deque(BOOST_COPY_ASSIGN_REF(deque) copy);
+
+ deque(
+ BOOST_COPY_ASSIGN_REF(deque) copy
+ , allocator_type const& allocator
+ );
+
+ deque(BOOST_RV_REF(deque) source);
+
+ deque(
+ BOOST_RV_REF(deque) source
+ , allocator_type const& allocator
+ );
+
+ deque& operator=(BOOST_RV_REF(deque) source);
+
+ deque& operator=(BOOST_COPY_ASSIGN_REF(deque) copy);
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ //[reference__deque__dtor
+ ~deque();
+ //]
+
+ //[reference__deque__data__const
+ typename node::const_pointer data() const;
+ //]
+
+ //[reference__deque__data
+ typename node::pointer data();
+ //]
+
+ //[reference__deque__cbegin
+ const_iterator cbegin() const;
+ const_iterator begin() const;
+ //]
+
+ //[reference__deque__begin
+ iterator begin();
+ //]
+
+ //[reference__deque__cend
+ const_iterator cend() const;
+ const_iterator end() const;
+ //]
+
+ //[reference__deque__end
+ iterator end();
+ //]
+
+ //[reference__deque__crbegin
+ const_reverse_iterator crbegin() const;
+ const_reverse_iterator rbegin() const;
+ //]
+
+ //[reference__deque__rbegin
+ reverse_iterator rbegin();
+ //]
+
+ //[reference__deque__crend
+ const_reverse_iterator crend() const;
+ const_reverse_iterator rend() const;
+ //]
+
+ //[reference__deque__rend
+ reverse_iterator rend();
+ //]
+
+ //[reference__deque__cback
+ const_reference back() const;
+ //]
+
+ //[reference__deque__back
+ reference back();
+ //]
+
+ //[reference__deque__cfront
+ const_reference front() const;
+ //]
+
+ //[reference__deque__front
+ reference front();
+ //]
+
+ //[reference__deque__push_back
+ void push_back(const_reference t);
+ //]
+
+ //[reference__deque__push_front
+ void push_front(const_reference t);
+ //]
+
+ //[reference__deque__insert
+ iterator insert(const_iterator pos, const_reference t);
+ //]
+
+ //[reference__deque__insert_fill
+ iterator insert(const_iterator pos, size_type n, const_reference t);
+ //]
+
+ //[reference__deque__insert_range
+ template <typename Iterator>
+ iterator
+ insert(const_iterator pos, Iterator itr_begin, Iterator itr_end);
+ //]
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ void \
+ emplace_back( \
+ BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ void \
+ emplace_front( \
+ BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ iterator \
+ emplace( \
+ const_iterator pos \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ void push_back(BOOST_RV_REF(value_type) t);
+
+ void push_front(BOOST_RV_REF(value_type) t);
+
+ iterator insert(const_iterator pos, BOOST_RV_REF(value_type) t);
+
+#if defined BOOST_CONTAINER_PERFECT_FORWARDING
+ //[reference__deque__emplace_back
+ template <typename ...Args>
+ void emplace_back(Args&& ...args);
+ //]
+
+ //[reference__deque__emplace_front
+ template <typename ...Args>
+ void emplace_front(Args&& ...args);
+ //]
+
+ //[reference__deque__emplace
+ template <typename ...Args>
+ iterator emplace(const_iterator pos, Args&& ...args);
+ //]
+#else // !defined BOOST_CONTAINER_PERFECT_FORWARDING
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ void \
+ emplace_back( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ void \
+ emplace_front( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ iterator \
+ emplace( \
+ const_iterator pos \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#endif // BOOST_CONTAINER_PERFECT_FORWARDING
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ //[reference__deque__pop_back
+ void pop_back();
+ //]
+
+ //[reference__deque__pop_front
+ void pop_front();
+ //]
+
+ //[reference__deque__erase
+ iterator erase(const_iterator pos);
+ //]
+
+ //[reference__deque__erase_range
+ void erase(const_iterator itr_begin, const_iterator itr_end);
+ //]
+
+ //[reference__deque__swap_other
+ void swap(deque& other);
+ //]
+
+ //[reference__deque__empty
+ bool empty() const;
+ //]
+
+ //[reference__deque__clear
+ void clear();
+ //]
+
+ //[reference__deque__resize
+ void resize(size_type n);
+ //]
+
+ //[reference__deque__resize_w_value
+ void resize(size_type n, value_type const& t);
+ //]
+
+ //[reference__deque__size
+ size_type size() const;
+ //]
+
+ //[reference__deque__index_operator__const
+ const_reference operator[](size_type index) const;
+ //]
+
+ //[reference__deque__index_operator
+ reference operator[](size_type index);
+ //]
+
+#if !defined BOOST_NO_LIMITS
+ //[reference__deque__max_size
+ static size_type max_size();
+ //]
+#endif
+
+ private:
+ static typename node::pointer
+ _construct_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , value_type const& value
+ );
+
+ static typename node::pointer
+ _construct_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , value_type const& value
+ );
+
+ static typename node::pointer
+ _construct_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ );
+
+ static typename node::pointer
+ _construct_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ );
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ static typename node::pointer \
+ _construct_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ static typename node::pointer \
+ _construct_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ); \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#elif defined BOOST_CONTAINER_PERFECT_FORWARDING
+ template <typename ...Args>
+ static typename node::pointer
+ _construct_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , Args&& ...args
+ );
+
+ template <typename ...Args>
+ static typename node::pointer
+ _construct_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , Args&& ...args
+ );
+#else // partial template specialization support, imperfect forwarding
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ static typename node::pointer \
+ _construct_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ static typename node::pointer \
+ _construct_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ); \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#endif // compiler defect handling
+
+ static void
+ _fill_construct(
+ typename node::pointer const& root_ptr
+ , size_type n
+ );
+
+ static void
+ _fill_construct(
+ typename node::pointer const& root_ptr
+ , size_type n
+ , value_type const& t
+ );
+
+ size_type _size(::boost::mpl::true_) const;
+
+ size_type _size(::boost::mpl::false_) const;
+
+ typename node::const_pointer _back() const;
+
+ typename node::pointer _back();
+ };
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(allocator_type const& allocator)
+ : _allocator(allocator)
+#if defined BOOST_NO_CXX11_NULLPTR
+ , _root_ptr(0)
+#else
+ , _root_ptr(nullptr)
+#endif
+ {
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::_construct_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , value_type const& value
+ )
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(result, value);
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, value);
+#endif
+ return result;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::_construct_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , value_type const& value
+ )
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(
+ result
+ , ::boost::container::allocator_arg
+ , allocator
+ , value
+ );
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<allocator_type>::construct(
+ allocator
+ , result
+ , ::boost::container::allocator_arg
+ , allocator
+ , value
+ );
+#endif
+ return result;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void
+ deque<T,NodeGenerator,Balancer>::_fill_construct(
+ typename node::pointer const& root_ptr
+ , size_type n
+ )
+ {
+ for (breadth_first_iterator<node> itr(*root_ptr); n && itr; ++itr)
+ {
+ if (--n)
+ {
+ itr->emplace_left();
+
+ if (--n)
+ {
+ itr->emplace_right();
+ }
+ }
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void
+ deque<T,NodeGenerator,Balancer>::_fill_construct(
+ typename node::pointer const& root_ptr
+ , size_type n
+ , value_type const& t
+ )
+ {
+ for (breadth_first_iterator<node> itr(*root_ptr); n && itr; ++itr)
+ {
+ if (--n)
+ {
+ itr->emplace_left(t);
+
+ if (--n)
+ {
+ itr->emplace_right(t);
+ }
+ }
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(size_type n)
+ : _allocator()
+ , _root_ptr(
+ n ? self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ ) :
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ )
+ {
+ self::_fill_construct(this->_root_ptr, n);
+
+ if (n)
+ {
+ Balancer::post_fill(*this->_root_ptr, n);
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(
+ size_type n
+ , allocator_type const& allocator
+ ) : _allocator(allocator)
+ , _root_ptr(
+ n ? self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ ) :
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ )
+ {
+ self::_fill_construct(this->_root_ptr, n);
+
+ if (n)
+ {
+ Balancer::post_fill(*this->_root_ptr, n);
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(
+ size_type n
+ , value_type const& t
+ ) : _allocator()
+ , _root_ptr(
+ n ? self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , t
+ ) :
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ )
+ {
+ self::_fill_construct(this->_root_ptr, n, t);
+
+ if (n)
+ {
+ Balancer::post_fill(*this->_root_ptr, n);
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(
+ size_type n
+ , value_type const& t
+ , allocator_type const& allocator
+ ) : _allocator(allocator)
+ , _root_ptr(
+ n ? self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , t
+ ) :
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ )
+ {
+ self::_fill_construct(this->_root_ptr, n, t);
+
+ if (n)
+ {
+ Balancer::post_fill(*this->_root_ptr, n);
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+#if defined BOOST_NO_SFINAE
+ deque<T,NodeGenerator,Balancer>::deque(
+ const_iterator itr_begin
+ , const_iterator itr_end
+ )
+#else
+ template <typename Iterator>
+ deque<T,NodeGenerator,Balancer>::deque(
+ Iterator itr_begin
+ , Iterator itr_end
+ , typename ::boost::enable_if<
+ ::boost::detail::metafunction::is_input_iterator<Iterator>
+ , enabler
+ >::type
+ )
+#endif
+ : _allocator()
+ , _root_ptr(
+ (itr_begin == itr_end) ?
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ : self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , *itr_begin
+ )
+ )
+ {
+ size_type const n = static_cast<size_type>(
+ ::std::distance(itr_begin, itr_end)
+ );
+
+ self::_fill_construct(this->_root_ptr, n, *itr_begin);
+
+ if (n)
+ {
+ for (in_order_iterator<node> itr(*this->_root_ptr); itr; ++itr)
+ {
+ put(*itr, data_key(), *itr_begin);
+ ++itr_begin;
+ }
+
+ Balancer::post_fill(*this->_root_ptr, n);
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+#if defined BOOST_NO_SFINAE
+ deque<T,NodeGenerator,Balancer>::deque(
+ const_iterator itr_begin
+ , const_iterator itr_end
+ , allocator_type const& allocator
+ )
+#else
+ template <typename Iterator>
+ deque<T,NodeGenerator,Balancer>::deque(
+ Iterator itr_begin
+ , Iterator itr_end
+ , allocator_type const& allocator
+ , typename ::boost::enable_if<
+ ::boost::detail::metafunction::is_input_iterator<Iterator>
+ , enabler
+ >::type
+ )
+#endif
+ : _allocator(allocator)
+ , _root_ptr(
+ (itr_begin == itr_end) ?
+#if defined BOOST_NO_CXX11_NULLPTR
+ 0
+#else
+ nullptr
+#endif
+ : self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , *itr_begin
+ )
+ )
+ {
+ size_type const n = static_cast<size_type>(
+ ::std::distance(itr_begin, itr_end)
+ );
+
+ self::_fill_construct(this->_root_ptr, n, *itr_begin);
+
+ if (n)
+ {
+ for (in_order_iterator<node> itr(*this->_root_ptr); itr; ++itr)
+ {
+ put(*itr, data_key(), *itr_begin);
+ ++itr_begin;
+ }
+
+ Balancer::post_fill(*this->_root_ptr, n);
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::_construct_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ )
+ {
+ if (p)
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(result, *p);
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, *p);
+#endif
+ return result;
+ }
+ else
+ {
+ return p;
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::_construct_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , typename node::pointer p
+ )
+ {
+ if (p)
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ typename node::pointer result(allocator.allocate(1));
+ allocator.construct(result, *p, allocator);
+#else
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, *p, allocator);
+#endif
+ return result;
+ }
+ else
+ {
+ return p;
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ deque const& copy
+#else
+ BOOST_COPY_ASSIGN_REF(deque) copy
+#endif
+ ) : _allocator(copy._allocator)
+ , _root_ptr(
+ self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , copy._root_ptr
+ )
+ )
+ {
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ deque const& copy
+#else
+ BOOST_COPY_ASSIGN_REF(deque) copy
+#endif
+ , allocator_type const& allocator
+ ) : _allocator(copy._allocator)
+ , _root_ptr(
+ self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , copy._root_ptr
+ )
+ )
+ {
+ }
+
+#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(BOOST_RV_REF(deque) source)
+ : _allocator(::boost::move(source._allocator))
+ , _root_ptr(source._root_ptr)
+ {
+#if defined BOOST_NO_CXX11_NULLPTR
+ source._root_ptr = 0;
+#else
+ source._root_ptr = nullptr;
+#endif
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::deque(
+ BOOST_RV_REF(deque) source
+ , allocator_type const& allocator
+ ) : _allocator(allocator), _root_ptr(source._root_ptr)
+ {
+#if defined BOOST_NO_CXX11_NULLPTR
+ source._root_ptr = 0;
+#else
+ source._root_ptr = nullptr;
+#endif
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline deque<T,NodeGenerator,Balancer>&
+ deque<T,NodeGenerator,Balancer>::operator=(BOOST_RV_REF(deque) source)
+ {
+ if (this != &static_cast<deque&>(source))
+ {
+ this->_allocator = ::boost::move(source._allocator);
+ this->clear();
+ this->_root_ptr = source._root_ptr;
+#if defined BOOST_NO_CXX11_NULLPTR
+ source._root_ptr = 0;
+#else
+ source._root_ptr = nullptr;
+#endif
+ }
+
+ return *this;
+ }
+#endif // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline deque<T,NodeGenerator,Balancer>&
+ deque<T,NodeGenerator,Balancer>::operator=(
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ deque const& copy
+#else
+ BOOST_COPY_ASSIGN_REF(deque) copy
+#endif
+ )
+ {
+ if (this != ©)
+ {
+ if (copy._root_ptr)
+ {
+ if (this->_root_ptr)
+ {
+ *this->_root_ptr = *copy._root_ptr;
+ }
+ else
+ {
+ this->_root_ptr = self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , copy._root_ptr
+ );
+ }
+ }
+ else
+ {
+ this->clear();
+ }
+ }
+
+ return *this;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ deque<T,NodeGenerator,Balancer>::~deque()
+ {
+ this->clear();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::node::const_pointer
+ deque<T,NodeGenerator,Balancer>::data() const
+ {
+ return this->_root_ptr;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::data()
+ {
+ return this->_root_ptr;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_iterator
+ deque<T,NodeGenerator,Balancer>::cbegin() const
+ {
+ return this->_root_ptr ? const_iterator(
+ make_in_order_iterator(*this->_root_ptr)
+ , at_key<data_key>()
+ ) : this->cend();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_iterator
+ deque<T,NodeGenerator,Balancer>::begin() const
+ {
+ return this->_root_ptr ? const_iterator(
+ make_in_order_iterator(*this->_root_ptr)
+ , at_key<data_key>()
+ ) : this->end();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::begin()
+ {
+ return this->_root_ptr ? iterator(
+ make_in_order_iterator(*this->_root_ptr)
+ , at_key<data_key>()
+ ) : this->end();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_iterator
+ deque<T,NodeGenerator,Balancer>::cend() const
+ {
+ return const_iterator(
+ make_in_order_iterator_end(this->_root_ptr)
+ , at_key<data_key>()
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_iterator
+ deque<T,NodeGenerator,Balancer>::end() const
+ {
+ return const_iterator(
+ make_in_order_iterator_end(this->_root_ptr)
+ , at_key<data_key>()
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::end()
+ {
+ return iterator(
+ make_in_order_iterator_end(this->_root_ptr)
+ , at_key<data_key>()
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_reverse_iterator
+ deque<T,NodeGenerator,Balancer>::crbegin() const
+ {
+ return this->_root_ptr ? const_reverse_iterator(
+ make_in_order_reverse_iterator(*this->_root_ptr)
+ , at_key<data_key>()
+ ) : this->crend();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_reverse_iterator
+ deque<T,NodeGenerator,Balancer>::rbegin() const
+ {
+ return this->_root_ptr ? const_reverse_iterator(
+ make_in_order_reverse_iterator(*this->_root_ptr)
+ , at_key<data_key>()
+ ) : this->rend();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::reverse_iterator
+ deque<T,NodeGenerator,Balancer>::rbegin()
+ {
+ return this->_root_ptr ? reverse_iterator(
+ make_in_order_reverse_iterator(*this->_root_ptr)
+ , at_key<data_key>()
+ ) : this->rend();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_reverse_iterator
+ deque<T,NodeGenerator,Balancer>::crend() const
+ {
+ return const_reverse_iterator(
+ make_in_order_reverse_iterator_end(this->_root_ptr)
+ , at_key<data_key>()
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_reverse_iterator
+ deque<T,NodeGenerator,Balancer>::rend() const
+ {
+ return const_reverse_iterator(
+ make_in_order_reverse_iterator_end(this->_root_ptr)
+ , at_key<data_key>()
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::reverse_iterator
+ deque<T,NodeGenerator,Balancer>::rend()
+ {
+ return reverse_iterator(
+ make_in_order_reverse_iterator_end(this->_root_ptr)
+ , at_key<data_key>()
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_reference
+ deque<T,NodeGenerator,Balancer>::front() const
+ {
+ return *this->cbegin();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::reference
+ deque<T,NodeGenerator,Balancer>::front()
+ {
+ return *this->begin();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_reference
+ deque<T,NodeGenerator,Balancer>::back() const
+ {
+ return *this->crbegin();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::reference
+ deque<T,NodeGenerator,Balancer>::back()
+ {
+ return *this->rbegin();
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline void deque<T,NodeGenerator,Balancer>::pop_front()
+ {
+ this->erase(this->cbegin());
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::node::const_pointer
+ deque<T,NodeGenerator,Balancer>::_back() const
+ {
+ typename node::const_pointer result = this->_root_ptr;
+
+ if (result)
+ {
+ while (result->get_right_child_ptr())
+ {
+ result = result->get_right_child_ptr();
+ }
+ }
+
+ return result;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::_back()
+ {
+ typename node::pointer result = this->_root_ptr;
+
+ if (result)
+ {
+ while (result->get_right_child_ptr())
+ {
+ result = result->get_right_child_ptr();
+ }
+ }
+
+ return result;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline void deque<T,NodeGenerator,Balancer>::pop_back()
+ {
+ this->erase(
+ iterator(
+ make_in_order_iterator_position(*this->_back())
+ , at_key<data_key>()
+ )
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void deque<T,NodeGenerator,Balancer>::push_front(const_reference t)
+ {
+ if (this->_root_ptr)
+ {
+ typename node::pointer p = this->_root_ptr;
+
+ while (p->get_left_child_ptr())
+ {
+ p = p->get_left_child_ptr();
+ }
+
+ p = Balancer::post_insert(p = &*p->emplace_left(t));
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ else // if (!this->_root_ptr)
+ {
+ this->_root_ptr = self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , t
+ );
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void deque<T,NodeGenerator,Balancer>::push_back(const_reference t)
+ {
+ if (this->_root_ptr)
+ {
+ typename node::pointer p = this->_root_ptr;
+
+ while (p->get_right_child_ptr())
+ {
+ p = p->get_right_child_ptr();
+ }
+
+ p = Balancer::post_insert(p = &*p->emplace_right(t));
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ else // if (!this->_root_ptr)
+ {
+ this->_root_ptr = self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , t
+ );
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::insert(
+ const_iterator pos
+ , const_reference t
+ )
+ {
+ if (pos.base())
+ {
+ typename node::pointer anc_ptr = const_cast<
+ typename node::pointer
+ >(&*pos.base());
+ typename node::pointer node_ptr = anc_ptr->get_left_child_ptr();
+
+ if (node_ptr)
+ {
+ while (node_ptr->get_right_child_ptr())
+ {
+ node_ptr = node_ptr->get_right_child_ptr();
+ }
+
+ node_ptr = &*node_ptr->emplace_right(t);
+ }
+ else
+ {
+ node_ptr = &*anc_ptr->emplace_left(t);
+ }
+
+ anc_ptr = Balancer::post_insert(node_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+
+ return iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , at_key<data_key>()
+ );
+ }
+ else // if (!pos.base())
+ {
+ this->push_back(t);
+ return --this->end();
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::insert(
+ const_iterator pos
+ , size_type n
+ , value_type const& t
+ )
+ {
+ if (n)
+ {
+ iterator result = this->insert(pos, t);
+
+ for (iterator pos_itr; --n; pos = ++pos_itr)
+ {
+ pos_itr = this->insert(pos, t);
+ }
+
+ return result;
+ }
+ else // if (!n)
+ {
+ if (pos.base())
+ {
+ iterator result(
+ make_in_order_iterator_position(
+ const_cast<node&>(*pos.base())
+ )
+ , at_key<data_key>()
+ );
+ BOOST_ASSERT(result == pos);
+ return result;
+ }
+ else
+ {
+ BOOST_ASSERT(this->end() == pos);
+ return this->end();
+ }
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ template <typename Iterator>
+ typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::insert(
+ const_iterator pos
+ , Iterator itr_begin
+ , Iterator itr_end
+ )
+ {
+ if (itr_begin == itr_end)
+ {
+ if (pos.base())
+ {
+ iterator result(
+ make_in_order_iterator_position(
+ const_cast<node&>(*pos.base())
+ )
+ , at_key<data_key>()
+ );
+ BOOST_ASSERT(result == pos);
+ return result;
+ }
+ else
+ {
+ BOOST_ASSERT(this->end() == pos);
+ return this->end();
+ }
+ }
+ else
+ {
+ iterator result = this->insert(pos, *itr_begin);
+
+ for (iterator pos_itr; ++itr_begin != itr_end; pos = ++pos_itr)
+ {
+ pos_itr = this->insert(pos, *itr_begin);
+ }
+
+ return result;
+ }
+ }
+
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ typename deque<T,NodeGenerator,Balancer>::node::pointer \
+ deque<T,NodeGenerator,Balancer>::_construct_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ typename node::pointer result(allocator.allocate(1)); \
+ allocator.construct( \
+ result \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ typename deque<T,NodeGenerator,Balancer>::node::pointer \
+ deque<T,NodeGenerator,Balancer>::_construct_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ typename node::pointer result(allocator.allocate(1)); \
+ allocator.construct( \
+ result \
+ , ::boost::container::allocator_arg \
+ , allocator \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ void \
+ deque<T,NodeGenerator,Balancer>::emplace_front( \
+ BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ if (this->_root_ptr) \
+ { \
+ typename node::pointer p = this->_root_ptr; \
+ while (p->get_left_child_ptr()) \
+ { \
+ p = p->get_left_child_ptr(); \
+ } \
+ p = Balancer::post_insert( \
+ p = &*p->emplace_left( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ) \
+ ); \
+ if (!p->get_parent_ptr()) \
+ { \
+ this->_root_ptr = p; \
+ } \
+ } \
+ else \
+ { \
+ this->_root_ptr = self::_construct_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ void \
+ deque<T,NodeGenerator,Balancer>::emplace_back( \
+ BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ if (this->_root_ptr) \
+ { \
+ typename node::pointer p = this->_root_ptr; \
+ while (p->get_right_child_ptr()) \
+ { \
+ p = p->get_right_child_ptr(); \
+ } \
+ p = Balancer::post_insert( \
+ p = &*p->emplace_right( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ) \
+ ); \
+ if (!p->get_parent_ptr()) \
+ { \
+ this->_root_ptr = p; \
+ } \
+ } \
+ else \
+ { \
+ this->_root_ptr = self::_construct_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(r, seq) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), template <) \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), typename P) \
+ BOOST_PP_EXPR_IF(BOOST_PP_SEQ_SIZE(seq), >) \
+ typename deque<T,NodeGenerator,Balancer>::iterator \
+ deque<T,NodeGenerator,Balancer>::emplace( \
+ const_iterator pos \
+ , BOOST_DETAIL_PP_BINARY_SEQ_TO_PARAMS(seq, P, &, const&, p) \
+ ) \
+ { \
+ if (pos.base()) \
+ { \
+ typename node::pointer anc_ptr = const_cast< \
+ typename node::pointer \
+ >(&*pos.base()); \
+ typename node::pointer node_ptr = ( \
+ anc_ptr->get_left_child_ptr() \
+ ); \
+ if (node_ptr) \
+ { \
+ while (node_ptr->get_right_child_ptr()) \
+ { \
+ node_ptr = node_ptr->get_right_child_ptr(); \
+ } \
+ node_ptr = &*node_ptr->emplace_right( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+ else \
+ { \
+ node_ptr = &*anc_ptr->emplace_left( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ } \
+ anc_ptr = Balancer::post_insert(node_ptr); \
+ if (!anc_ptr->get_parent_ptr()) \
+ { \
+ this->_root_ptr = anc_ptr; \
+ } \
+ return iterator( \
+ make_in_order_iterator_position(*node_ptr) \
+ , at_key<data_key>() \
+ ); \
+ } \
+ else \
+ { \
+ this->emplace_back( \
+ BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(seq), p) \
+ ); \
+ return this->end(); \
+ } \
+ } \
+//!
+ BOOST_PP_FOR(
+ (0)
+ , BOOST_CONTAINER_GEN_PP_PARAM_PRED
+ , BOOST_CONTAINER_GEN_PP_PARAM_INC
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#else // !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void
+ deque<T,NodeGenerator,Balancer>::push_front(BOOST_RV_REF(value_type) t)
+ {
+ if (this->_root_ptr)
+ {
+ typename node::pointer p = this->_root_ptr;
+
+ while (p->get_left_child_ptr())
+ {
+ p = p->get_left_child_ptr();
+ }
+
+#if defined BOOST_NO_RVALUE_REFERENCES
+ p = Balancer::post_insert(p = &*p->emplace_left(t));
+#else
+ p = Balancer::post_insert(
+ p = &*p->emplace_left(static_cast<value_type&&>(t))
+ );
+#endif
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ else // if (!this->_root_ptr)
+ {
+ this->_root_ptr = self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+#if defined BOOST_NO_RVALUE_REFERENCES
+ , t
+#else
+ , static_cast<value_type&&>(t)
+#endif
+ );
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void deque<T,NodeGenerator,Balancer>::push_back(BOOST_RV_REF(value_type) t)
+ {
+ if (this->_root_ptr)
+ {
+ typename node::pointer p = this->_root_ptr;
+
+ while (p->get_right_child_ptr())
+ {
+ p = p->get_right_child_ptr();
+ }
+
+#if defined BOOST_NO_RVALUE_REFERENCES
+ p = Balancer::post_insert(p = &*p->emplace_right(t));
+#else
+ p = Balancer::post_insert(
+ p = &*p->emplace_right(static_cast<value_type&&>(t))
+ );
+#endif
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ else // if (!this->_root_ptr)
+ {
+ this->_root_ptr = self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+#if defined BOOST_NO_RVALUE_REFERENCES
+ , t
+#else
+ , static_cast<value_type&&>(t)
+#endif
+ );
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::insert(
+ const_iterator pos
+ , BOOST_RV_REF(value_type) t
+ )
+ {
+ if (pos.base())
+ {
+ typename node::pointer anc_ptr = const_cast<
+ typename node::pointer
+ >(&*pos.base());
+ typename node::pointer node_ptr = anc_ptr->get_left_child_ptr();
+
+ if (node_ptr)
+ {
+ while (node_ptr->get_right_child_ptr())
+ {
+ node_ptr = node_ptr->get_right_child_ptr();
+ }
+
+#if defined BOOST_NO_RVALUE_REFERENCES
+ node_ptr = &*node_ptr->emplace_right(t);
+#else
+ node_ptr = &*node_ptr->emplace_right(
+ static_cast<value_type&&>(t)
+ );
+#endif
+ }
+ else
+ {
+#if defined BOOST_NO_RVALUE_REFERENCES
+ node_ptr = &*node_ptr->emplace_left(t);
+#else
+ node_ptr = &*node_ptr->emplace_left(
+ static_cast<value_type&&>(t)
+ );
+#endif
+ }
+
+ anc_ptr = Balancer::post_insert(node_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+
+ return iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , at_key<data_key>()
+ );
+ }
+ else // if (!pos.base())
+ {
+#if defined BOOST_NO_RVALUE_REFERENCES
+ this->push_back(t);
+#else
+ this->push_back(static_cast<value_type&&>(t));
+#endif
+ return this->end();
+ }
+ }
+
+#if defined BOOST_CONTAINER_PERFECT_FORWARDING
+ template <typename T, typename NodeGenerator, typename Balancer>
+ template <typename ...Args>
+ typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::_construct_from(
+ ::std::tr1::true_type
+ , allocator_type& allocator
+ , Args&& ...args
+ )
+ {
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::construct(allocator, result, ::boost::forward<Args>(args)...);
+ return result;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ template <typename ...Args>
+ typename deque<T,NodeGenerator,Balancer>::node::pointer
+ deque<T,NodeGenerator,Balancer>::_construct_from(
+ ::std::tr1::false_type
+ , allocator_type& allocator
+ , Args&& ...args
+ )
+ {
+ typename node::pointer result(
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::allocate(allocator, 1)
+ );
+ ::boost::container::allocator_traits<allocator_type>::construct(
+ allocator
+ , result
+ , ::boost::container::allocator_arg
+ , allocator
+ , ::boost::forward<Args>(args)...
+ );
+ return result;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ template <typename ...Args>
+ void deque<T,NodeGenerator,Balancer>::emplace_front(Args&& ...args)
+ {
+ if (this->_root_ptr)
+ {
+ typename node::pointer p = this->_root_ptr;
+
+ while (p->get_left_child_ptr())
+ {
+ p = p->get_left_child_ptr();
+ }
+
+ p = Balancer::post_insert(
+ p = &*p->emplace_left(::boost::forward<Args>(args)...)
+ );
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ else // if (!this->_root_ptr)
+ {
+ this->_root_ptr = self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , ::boost::forward<Args>(args)...
+ );
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ template <typename ...Args>
+ void deque<T,NodeGenerator,Balancer>::emplace_back(Args&& ...args)
+ {
+ if (this->_root_ptr)
+ {
+ typename node::pointer p = this->_root_ptr;
+
+ while (p->get_right_child_ptr())
+ {
+ p = p->get_right_child_ptr();
+ }
+
+ p = Balancer::post_insert(
+ p = &*p->emplace_right(::boost::forward<Args>(args)...)
+ );
+
+ if (!p->get_parent_ptr())
+ {
+ this->_root_ptr = p;
+ }
+ }
+ else // if (!this->_root_ptr)
+ {
+ this->_root_ptr = self::_construct_from(
+ ::std::tr1::is_const<
+ typename ::std::tr1::remove_reference<
+ typename node::traits::allocator_reference
+ >::type
+ >()
+ , this->_allocator
+ , ::boost::forward<Args>(args)...
+ );
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ template <typename ...Args>
+ typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::emplace(
+ const_iterator pos
+ , Args&& ...args
+ )
+ {
+ if (pos.base())
+ {
+ typename node::pointer anc_ptr = const_cast<
+ typename node::pointer
+ >(&*pos.base());
+ typename node::pointer node_ptr = anc_ptr->get_left_child_ptr();
+
+ if (node_ptr)
+ {
+ while (node_ptr->get_right_child_ptr())
+ {
+ node_ptr = node_ptr->get_right_child_ptr();
+ }
+
+ node_ptr = &*node_ptr->emplace_right(
+ ::boost::forward<Args>(args)...
+ );
+ }
+ else
+ {
+ node_ptr = &*anc_ptr->emplace_left(
+ ::boost::forward<Args>(args)...
+ );
+ }
+
+ anc_ptr = Balancer::post_insert(node_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+
+ return iterator(
+ make_in_order_iterator_position(*node_ptr)
+ , at_key<data_key>()
+ );
+ }
+ else // if (!pos.base())
+ {
+ this->emplace_back(::boost::forward<Args>(args)...);
+ return this->end();
+ }
+ }
+#else // !defined BOOST_CONTAINER_PERFECT_FORWARDING
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ typename deque<T,NodeGenerator,Balancer>::node::pointer \
+ deque<T,NodeGenerator,Balancer>::_construct_from( \
+ ::std::tr1::true_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ typename node::pointer result( \
+ ::boost::container::allocator_traits< \
+ allocator_type \
+ >::allocate(allocator, 1) \
+ ); \
+ ::boost::container::allocator_traits<allocator_type>::construct( \
+ allocator \
+ , result \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ typename deque<T,NodeGenerator,Balancer>::node::pointer \
+ deque<T,NodeGenerator,Balancer>::_construct_from( \
+ ::std::tr1::false_type \
+ , allocator_type& allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ typename node::pointer result( \
+ ::boost::container::allocator_traits< \
+ allocator_type \
+ >::allocate(allocator, 1) \
+ ); \
+ ::boost::container::allocator_traits<allocator_type>::construct( \
+ allocator \
+ , result \
+ , ::boost::container::allocator_arg \
+ , allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ return result; \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ void \
+ deque<T,NodeGenerator,Balancer>::emplace_front( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ if (this->_root_ptr) \
+ { \
+ typename node::pointer p = this->_root_ptr; \
+ while (p->get_left_child_ptr()) \
+ { \
+ p = p->get_left_child_ptr(); \
+ } \
+ p = Balancer::post_insert( \
+ p = &*p->emplace_left( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ); \
+ if (!p->get_parent_ptr()) \
+ { \
+ this->_root_ptr = p; \
+ } \
+ } \
+ else \
+ { \
+ this->_root_ptr = self::_construct_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ void \
+ deque<T,NodeGenerator,Balancer>::emplace_back( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ if (this->_root_ptr) \
+ { \
+ typename node::pointer p = this->_root_ptr; \
+ while (p->get_right_child_ptr()) \
+ { \
+ p = p->get_right_child_ptr(); \
+ } \
+ p = Balancer::post_insert( \
+ p = &*p->emplace_right( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ) \
+ ); \
+ if (!p->get_parent_ptr()) \
+ { \
+ this->_root_ptr = p; \
+ } \
+ } \
+ else \
+ { \
+ this->_root_ptr = self::_construct_from( \
+ ::std::tr1::is_const< \
+ typename ::std::tr1::remove_reference< \
+ typename node::traits::allocator_reference \
+ >::type \
+ >() \
+ , this->_allocator \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+
+#define BOOST_TREE_NODE_EMPLACEMENT_IMPL(z, n, _) \
+ template <typename T, typename NodeGenerator, typename Balancer> \
+ BOOST_PP_EXPR_IF(n, template <) \
+ BOOST_PP_ENUM_PARAMS_Z(z, n, typename P) \
+ BOOST_PP_EXPR_IF(n, >) \
+ typename deque<T,NodeGenerator,Balancer>::iterator \
+ deque<T,NodeGenerator,Balancer>::emplace( \
+ const_iterator pos \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_LIST \
+ , _ \
+ ) \
+ ) \
+ { \
+ if (pos.base()) \
+ { \
+ typename node::pointer anc_ptr = const_cast< \
+ typename node::pointer \
+ >(&*pos.base()); \
+ typename node::pointer node_ptr = ( \
+ anc_ptr->get_left_child_ptr() \
+ ); \
+ if (node_ptr) \
+ { \
+ while (node_ptr->get_right_child_ptr()) \
+ { \
+ node_ptr = node_ptr->get_right_child_ptr(); \
+ } \
+ node_ptr = &*node_ptr->emplace_right( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+ else \
+ { \
+ node_ptr = &*anc_ptr->emplace_left( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ } \
+ anc_ptr = Balancer::post_insert(node_ptr); \
+ if (!anc_ptr->get_parent_ptr()) \
+ { \
+ this->_root_ptr = anc_ptr; \
+ } \
+ return iterator( \
+ make_in_order_iterator_position(*node_ptr) \
+ , at_key<data_key>() \
+ ); \
+ } \
+ else \
+ { \
+ this->emplace_back( \
+ BOOST_PP_CAT(BOOST_PP_ENUM_TRAILING_, z)( \
+ n \
+ , BOOST_CONTAINER_PP_PARAM_FORWARD \
+ , _ \
+ ) \
+ ); \
+ return this->end(); \
+ } \
+ } \
+//!
+ BOOST_PP_REPEAT(
+ BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS
+ , BOOST_TREE_NODE_EMPLACEMENT_IMPL
+ , _
+ )
+#undef BOOST_TREE_NODE_EMPLACEMENT_IMPL
+#endif // BOOST_CONTAINER_PERFECT_FORWARDING
+#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ typename deque<T,NodeGenerator,Balancer>::iterator
+ deque<T,NodeGenerator,Balancer>::erase(const_iterator pos)
+ {
+ if (pos.base()->empty() && (this->_root_ptr == &*pos.base()))
+ {
+ this->clear();
+ return this->end();
+ }
+
+ typename node::pointer anc_ptr = const_cast<typename node::pointer>(
+ &*pos.base()
+ );
+ iterator result(
+ make_in_order_iterator_position(*anc_ptr)
+ , at_key<data_key>()
+ );
+ bool must_erase_begin = (result == this->begin());
+
+ if (!must_erase_begin)
+ {
+ --result;
+ }
+
+ for (typename node::pointer desc_ptr;;)
+ {
+ if (
+ (desc_ptr = anc_ptr->get_left_child_ptr()) && (
+ !anc_ptr->get_right_child_ptr()
+ )
+ )
+ {
+ while (desc_ptr->get_right_child_ptr())
+ {
+ desc_ptr = desc_ptr->get_right_child_ptr();
+ }
+
+ if (desc_ptr->get_parent_ptr() == anc_ptr)
+ {
+ if (!anc_ptr->get_right_child_ptr())
+ {
+ put(*anc_ptr, data_key(), get(*desc_ptr, data_key()));
+
+ bool must_rebalance = Balancer::pre_erase(*desc_ptr);
+
+ anc_ptr->erase_left();
+
+ if (must_rebalance)
+ {
+ anc_ptr = Balancer::post_erase_left(anc_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+ }
+
+ break;
+ }
+ }
+ else // if (desc_ptr == anc_ptr->get_right_child_ptr())
+ {
+ put(*anc_ptr, data_key(), get(*desc_ptr, data_key()));
+
+ if (desc_ptr->get_left_child_ptr())
+ {
+ anc_ptr = desc_ptr;
+ }
+ else // if (desc_ptr->empty())
+ {
+ anc_ptr = desc_ptr->get_parent_ptr();
+
+ if (anc_ptr->get_left_child_ptr())
+ {
+ put(*desc_ptr, data_key(), get(*anc_ptr, data_key()));
+ }
+ else // desc_ptr is only child of anc_ptr
+ {
+ bool must_rebalance = Balancer::pre_erase(*desc_ptr);
+
+ anc_ptr->erase_right();
+
+ if (must_rebalance)
+ {
+ anc_ptr = Balancer::post_erase_right(anc_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+ }
+
+ break;
+ }
+ }
+
+ continue;
+ }
+ }
+
+ if ((desc_ptr = anc_ptr->get_right_child_ptr()))
+ {
+ while (desc_ptr->get_left_child_ptr())
+ {
+ desc_ptr = desc_ptr->get_left_child_ptr();
+ }
+
+ put(*anc_ptr, data_key(), get(*desc_ptr, data_key()));
+
+ if (desc_ptr->get_right_child_ptr())
+ {
+ if (desc_ptr->get_right_child_ptr()->empty())
+ {
+ bool must_rebalance = Balancer::pre_erase(*desc_ptr);
+
+ anc_ptr->erase_right();
+
+ if (must_rebalance)
+ {
+ anc_ptr = Balancer::post_erase_right(anc_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+ }
+ }
+ else
+ {
+ anc_ptr = desc_ptr;
+ }
+ }
+ else if (desc_ptr->get_parent_ptr() == anc_ptr)
+ {
+ bool must_rebalance = Balancer::pre_erase(*desc_ptr);
+
+ anc_ptr->erase_right();
+
+ if (must_rebalance)
+ {
+ anc_ptr = Balancer::post_erase_right(anc_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+ }
+
+ break;
+ }
+ else
+ {
+ BOOST_ASSERT(desc_ptr->empty());
+ anc_ptr = desc_ptr->get_parent_ptr();
+ BOOST_ASSERT(anc_ptr->get_left_child_ptr() == desc_ptr);
+
+ if (anc_ptr->get_right_child_ptr())
+ {
+ put(*desc_ptr, data_key(), get(*anc_ptr, data_key()));
+ }
+ else // desc_ptr is only child of anc_ptr
+ {
+ bool must_rebalance = Balancer::pre_erase(*desc_ptr);
+
+ anc_ptr->erase_left();
+
+ if (must_rebalance)
+ {
+ anc_ptr = Balancer::post_erase_left(anc_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+ }
+
+ break;
+ }
+ }
+ }
+ else // if (anc_ptr->empty())
+ {
+ desc_ptr = anc_ptr;
+ anc_ptr = anc_ptr->get_parent_ptr();
+
+ bool must_rebalance = Balancer::pre_erase(*desc_ptr);
+
+ if (anc_ptr->get_left_child_ptr() == desc_ptr)
+ {
+ anc_ptr->erase_left();
+
+ if (must_rebalance)
+ {
+ anc_ptr = Balancer::post_erase_left(anc_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+ }
+ }
+ else // if (anc_ptr->get_right_child_ptr() == desc_ptr)
+ {
+ anc_ptr->erase_right();
+
+ if (must_rebalance)
+ {
+ anc_ptr = Balancer::post_erase_right(anc_ptr);
+
+ if (!anc_ptr->get_parent_ptr())
+ {
+ this->_root_ptr = anc_ptr;
+ }
+ }
+ }
+
+ break;
+ }
+ }
+
+ return must_erase_begin ? this->begin() : ++result;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void
+ deque<T,NodeGenerator,Balancer>::erase(
+ const_iterator itr_begin
+ , const_iterator itr_end
+ )
+ {
+ while (itr_begin != itr_end)
+ {
+ itr_begin = this->erase(itr_begin);
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline bool deque<T,NodeGenerator,Balancer>::empty() const
+ {
+ return !this->_root_ptr;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline void deque<T,NodeGenerator,Balancer>::swap(deque& other)
+ {
+ typename node::pointer p = this->_root_ptr;
+
+ this->_root_ptr = other._root_ptr;
+ other._root_ptr = p;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void deque<T,NodeGenerator,Balancer>::clear()
+ {
+ if (this->_root_ptr)
+ {
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+ this->_allocator.destroy(this->_root_ptr);
+ this->_allocator.deallocate(this->_root_ptr, 1);
+#else
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::destroy(this->_allocator, this->_root_ptr);
+ ::boost::container::allocator_traits<
+ allocator_type
+ >::deallocate(this->_allocator, this->_root_ptr, 1);
+#endif
+
+#if defined BOOST_NO_CXX11_NULLPTR
+ this->_root_ptr = 0;
+#else
+ this->_root_ptr = nullptr;
+#endif
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void deque<T,NodeGenerator,Balancer>::resize(size_type n)
+ {
+ if (this->size() < n)
+ {
+ while (this->size() < n)
+ {
+ this->emplace_back();
+ }
+ }
+ else if (n < this->size())
+ {
+ while (n < this->size())
+ {
+ this->pop_back();
+ }
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void
+ deque<T,NodeGenerator,Balancer>::resize(
+ size_type n
+ , value_type const& t
+ )
+ {
+ if (this->size() < n)
+ {
+ while (this->size() < n)
+ {
+ this->push_back(t);
+ }
+ }
+ else if (n < this->size())
+ {
+ while (n < this->size())
+ {
+ this->pop_back();
+ }
+ }
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::size_type
+ deque<T,NodeGenerator,Balancer>::_size(::boost::mpl::true_) const
+ {
+ return this->_root_ptr ? get(*this->_root_ptr, count_key()) : 0;
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::size_type
+ deque<T,NodeGenerator,Balancer>::_size(::boost::mpl::false_) const
+ {
+ return ::std::distance(this->cbegin(), this->cend());
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::size_type
+ deque<T,NodeGenerator,Balancer>::size() const
+ {
+ return this->_size(result_of::has_key<node,count_key>());
+ }
+
+#if !defined BOOST_NO_LIMITS
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::size_type
+ deque<T,NodeGenerator,Balancer>::max_size()
+ {
+ return (::std::numeric_limits<size_type>::max)();
+ }
+#endif
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::const_reference
+ deque<T,NodeGenerator,Balancer>::operator[](size_type index) const
+ {
+ BOOST_ASSERT_MSG(
+ this->_root_ptr && (index < this->size())
+ , "index out of bounds"
+ );
+
+ typename node::const_pointer node_ptr = this->_root_ptr;
+
+ return get(*binary_descendant_at_index(node_ptr, index), data_key());
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline typename deque<T,NodeGenerator,Balancer>::reference
+ deque<T,NodeGenerator,Balancer>::operator[](size_type index)
+ {
+ BOOST_ASSERT_MSG(
+ this->_root_ptr && (index < this->size())
+ , "index out of bounds"
+ );
+
+ return get(
+ *binary_descendant_at_index(this->_root_ptr, index)
+ , data_key()
+ );
+ }
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ inline void
+ swap(
+ deque<T,NodeGenerator,Balancer>& x
+ , deque<T,NodeGenerator,Balancer>& y
+ )
+ {
+ x.swap(y);
+ }
+}} // namespace boost::tree_node
+
+#endif // BOOST_TREE_NODE_CONTAINER_DEQUE_HPP_INCLUDED
+
Added: sandbox/tree_node/boost/tree_node/container/deque_fwd.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/tree_node/container/deque_fwd.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,35 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TREE_NODE_CONTAINER_DEQUE_FWD_HPP_INCLUDED
+#define BOOST_TREE_NODE_CONTAINER_DEQUE_FWD_HPP_INCLUDED
+
+#include <boost/tree_node/binary_node.hpp>
+#include <boost/tree_node/balancer/null.hpp>
+
+namespace boost { namespace tree_node {
+
+ template <
+ typename T
+ , typename NodeGenerator = binary_node_default_gen
+ , typename Balancer = null_balancer
+ >
+ class deque;
+}} // namespace boost::tree_node
+
+//[reference__deque__swap
+namespace boost { namespace tree_node {
+
+ template <typename T, typename NodeGenerator, typename Balancer>
+ void
+ swap(
+ deque<T,NodeGenerator,Balancer>& x
+ , deque<T,NodeGenerator,Balancer>& y
+ );
+}} // namespace boost::tree_node
+//]
+
+#endif // BOOST_TREE_NODE_CONTAINER_DEQUE_FWD_HPP_INCLUDED
+
Deleted: sandbox/tree_node/boost/typeof/boost/tree_node/container/binode.hpp
==============================================================================
--- sandbox/tree_node/boost/typeof/boost/tree_node/container/binode.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85023)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,21 +0,0 @@
-// Copyright (C) 2013 Cromwell D. Enage
-// 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)
-
-#ifndef BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_HPP
-#define BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_HPP
-
-#include <boost/typeof/typeof.hpp>
-#include <boost/typeof/boost/container_gen/selectors.hpp>
-#include <boost/typeof/boost/tree_node/binary_node.hpp>
-#include <boost/typeof/boost/tree_node/balancer/null.hpp>
-#include <boost/tree_node/container/binode.hpp>
-
-#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
-BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_container, 1)
-BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_container, 2)
-BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_container, 3)
-
-#endif // BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_HPP
-
Added: sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_associative.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_associative.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,19 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_HPP
+#define BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_HPP
+
+#include <boost/typeof/typeof.hpp>
+#include <boost/tree_node/container/binode_associative.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+BOOST_TYPEOF_REGISTER_TEMPLATE(
+ ::boost::tree_node::binode_associative_container
+ , 6
+)
+
+#endif // BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_ASSOCIATIVE_HPP
+
Added: sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_map.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_map.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,26 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_MAP_HPP
+#define BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_MAP_HPP
+
+#include <boost/typeof/typeof.hpp>
+#include <boost/typeof/boost/container_gen/selectors.hpp>
+#include <boost/typeof/boost/tree_node/binary_node.hpp>
+#include <boost/typeof/boost/tree_node/container/binode_associative.hpp>
+#include <boost/tree_node/container/binode_map.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_map, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_map, 3)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_map, 4)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_map, 5)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multimap, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multimap, 3)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multimap, 4)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multimap, 5)
+
+#endif // BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_MAP_HPP
+
Added: sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_set.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/typeof/boost/tree_node/container/binode_set.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,26 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_SET_HPP
+#define BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_SET_HPP
+
+#include <boost/typeof/typeof.hpp>
+#include <boost/typeof/boost/container_gen/selectors.hpp>
+#include <boost/typeof/boost/tree_node/binary_node.hpp>
+#include <boost/typeof/boost/tree_node/container/binode_associative.hpp>
+#include <boost/tree_node/container/binode_set.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_set, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_set, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_set, 3)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_set, 4)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multiset, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multiset, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multiset, 3)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::binode_multiset, 4)
+
+#endif // BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_BINODE_SET_HPP
+
Added: sandbox/tree_node/boost/typeof/boost/tree_node/container/deque.hpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/boost/typeof/boost/tree_node/container/deque.hpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,21 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#ifndef BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_DEQUE_HPP
+#define BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_DEQUE_HPP
+
+#include <boost/typeof/typeof.hpp>
+#include <boost/typeof/boost/container_gen/selectors.hpp>
+#include <boost/typeof/boost/tree_node/binary_node.hpp>
+#include <boost/typeof/boost/tree_node/balancer/null.hpp>
+#include <boost/tree_node/container/deque.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::deque, 1)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::deque, 2)
+BOOST_TYPEOF_REGISTER_TEMPLATE(::boost::tree_node::deque, 3)
+
+#endif // BOOST_TYPEOF_BOOST_TREE_NODE_CONTAINER_DEQUE_HPP
+
Added: sandbox/tree_node/libs/algorithm/doc/html/boost/algorithm/cartesian_sort.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/algorithm/doc/html/boost/algorithm/cartesian_sort.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,114 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>cartesian_sort</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="cartesian_sort.html" title="cartesian_sort">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav"></div>
+<div class="article">
+<div class="titlepage">
+<div>
+<div><h2 class="title">
+<a name="cartesian_sort"></a>cartesian_sort</h2></div>
+<div><p class="copyright">Copyright © 2013 Cromwell Enage</p></div>
+<div><div class="legalnotice">
+<a name="cartesian_sort.legal"></a><p>
+ 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)
+ </p>
+</div></div>
+</div>
+<hr>
+</div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Synopsis</span></dt>
+<dt><span class="section">Description</span></dt>
+<dt><span class="section">Where defined</span></dt>
+<dt><span class="section">Test</span></dt>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="cartesian_sort.synopsis"></a><a class="link" href="cartesian_sort.html#cartesian_sort.synopsis" title="Synopsis">Synopsis</a>
+</h2></div></div></div>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">boost</span> <span class="special">{</span> <span class="keyword">namespace</span> <span class="identifier">algorithm</span> <span class="special">{</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Range</span><span class="special">></span>
+ <span class="identifier">Range</span><span class="special">&</span> <span class="identifier">cartesian_sort</span><span class="special">(</span><span class="identifier">Range</span><span class="special">&</span> <span class="identifier">r</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Range</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Compare</span><span class="special">></span>
+ <span class="identifier">Range</span><span class="special">&</span> <span class="identifier">cartesian_sort</span><span class="special">(</span><span class="identifier">Range</span><span class="special">&</span> <span class="identifier">r</span><span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">compare</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">></span>
+ <span class="keyword">void</span> <span class="identifier">cartesian_sort</span><span class="special">(</span><span class="identifier">Iterator</span> <span class="identifier">itr_begin</span><span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">itr_end</span><span class="special">);</span>
+
+ <span class="keyword">template</span> <span class="special"><</span><span class="keyword">typename</span> <span class="identifier">Iterator</span><span class="special">,</span> <span class="keyword">typename</span> <span class="identifier">Compare</span><span class="special">></span>
+ <span class="keyword">void</span>
+ <span class="identifier">cartesian_sort</span><span class="special">(</span>
+ <span class="identifier">Iterator</span> <span class="identifier">itr_begin</span>
+ <span class="special">,</span> <span class="identifier">Iterator</span> <span class="identifier">itr_end</span>
+ <span class="special">,</span> <span class="identifier">Compare</span> <span class="identifier">compare</span>
+ <span class="special">);</span>
+<span class="special">}}</span> <span class="comment">// namespace boost::algorithm</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="cartesian_sort.description"></a><a class="link" href="cartesian_sort.html#cartesian_sort.description" title="Description">Description</a>
+</h2></div></div></div>
+<p>
+ The <code class="computeroutput"><span class="identifier">cartesian_sort</span><span class="special">()</span></code>
+ function sorts the elements in the specified range into ascending order, meaning
+ that if <code class="computeroutput"><span class="identifier">i</span></code> and <code class="computeroutput"><span class="identifier">j</span></code> are any two valid iterators in the specified
+ range such that <code class="computeroutput"><span class="identifier">i</span></code> precedes
+ <code class="computeroutput"><span class="identifier">j</span></code>, then <code class="computeroutput"><span class="special">*</span><span class="identifier">j</span></code> is not less than <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span></code>.
+ </p>
+<p>
+ The <code class="computeroutput"><span class="identifier">cartesian_sort</span><span class="special">()</span></code>
+ function is not guaranteed to be stable. That is, if <code class="computeroutput"><span class="special">*</span><span class="identifier">i</span></code> and <code class="computeroutput"><span class="special">*</span><span class="identifier">j</span></code> are equivalent, meaning neither one is
+ less than the other, then it is not guaranteed that <code class="computeroutput"><span class="identifier">cartesian_sort</span><span class="special">()</span></code> will preserve the relative order of these
+ two elements.
+ </p>
+<p>
+ When using the first and second versions, the range type must fulfill the
+ Forward Range concept, and it must be mutable.
+ When using the third and fourth versions, the iterator type must fulfill the
+ <a href="http://www.sgi.com/tech/stl/ForwardIterator.html" target="_top"><span class="bold"><strong>Forward
+ Iterator</strong></span></a> concept, and its value type must be mutable.
+ </p>
+<p>
+ The first and third versions compare objects using the less-than operator.
+ The second and fourth versions compare objects using the Strict Weak Ordering object <code class="computeroutput"><span class="identifier">compare</span></code>.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="cartesian_sort.definition"></a><a class="link" href="cartesian_sort.html#cartesian_sort.definition" title="Where defined">Where defined</a>
+</h2></div></div></div>
+<pre class="programlisting"><span class="preprocessor">#include</span> <span class="special"><</span>boost/algorithm/sorting/cartesian_sort.hpp<span class="special">></span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="cartesian_sort.test"></a><a class="link" href="cartesian_sort.html#cartesian_sort.test" title="Test">Test</a>
+</h2></div></div></div>
+<p>
+ <test/cartesian_sort.cpp>
+ </p>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: July 12, 2013 at 04:12:25 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"></div>
+</body>
+</html>
Added: sandbox/tree_node/libs/algorithm/doc/src/cartesian_sort/Jamroot
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/algorithm/doc/src/cartesian_sort/Jamroot 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,68 @@
+project
+ : requirements
+ # Path for links to Boost:
+ # <xsl:param>boost.root=../../../../../..
+ <xsl:param>boost.root=http://www.boost.org
+
+ # Some general style settings:
+ <xsl:param>table.footnote.number.format=1
+ <xsl:param>footnote.number.format=1
+
+ # HTML options first:
+ # Use graphics not text for navigation:
+ <xsl:param>navig.graphics=1
+ # PDF Options:
+ # TOC Generation: this is needed for FOP-0.9 and later:
+ <xsl:param>fop1.extensions=0
+ <xsl:param>xep.extensions=1
+ # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
+ <xsl:param>fop.extensions=0
+ # No indent on body text:
+ <xsl:param>body.start.indent=0pt
+ # Margin size:
+ <xsl:param>page.margin.inner=0.5in
+ # Margin size:
+ <xsl:param>page.margin.outer=0.5in
+ # Paper type = A4
+ <xsl:param>paper.type=A4
+ # Yes, we want graphics for admonishments:
+ <xsl:param>admon.graphics=1
+ # Set this one for PDF generation *only*:
+ # default pnd graphics are awful in PDF form,
+ # better use SVG's instead:
+ <format>pdf:<xsl:param>admon.graphics.extension=".svg"
+ <format>pdf:<xsl:param>admon.graphics.path=$(boost-images)/
+# <format>pdf:<xsl:param>boost.url.prefix=../../../../../../../../libs/utility/doc/html
+ <format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/libs/utility/doc/html
+ ;
+
+import boostbook : boostbook ;
+using quickbook ;
+
+path-constant boost-images : http://www.boost.org/doc/src/images ;
+
+xml cartesian_sort : doc.qbk ;
+boostbook standalone
+ :
+ cartesian_sort
+ :
+ <xsl:param>admon.graphics.path=http://www.boost.org/doc/libs/release/doc/src/images/
+ <xsl:param>navig.graphics.path=http://www.boost.org/doc/libs/release/doc/src/images/
+ <xsl:param>base.dir=../../../html/boost/algorithm
+ <xsl:param>root.filename=cartesian_sort
+ <xsl:param>boost.root=http://www.boost.org
+ <xsl:param>boost.libraries=http://www.boost.org/libs/libraries.htm
+ <xsl:param>boost.image.src=../../../../../../boost.png
+ <xsl:param>boost.image.alt="C++ Boost"
+ <xsl:param>boost.image.w=277
+ <xsl:param>boost.image.h=86
+# <xsl:param>html.stylesheet=../../../../../../../../doc/src/boostbook.css
+ <xsl:param>html.stylesheet=http://www.boost.org/doc/libs/release/doc/src/boostbook.css
+ <xsl:param>nav.layout=none
+ <xsl:param>chunk.section.depth=0
+ <xsl:param>chunk.first.sections=0
+ <xsl:param>toc.section.depth=1
+ <xsl:param>toc.max.depth=1
+ <xsl:param>generate.section.toc.level=1
+ ;
+
Added: sandbox/tree_node/libs/algorithm/doc/src/cartesian_sort/doc.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/algorithm/doc/src/cartesian_sort/doc.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,52 @@
+[article cartesian_sort
+ [quickbook 1.6]
+ [copyright 2013 Cromwell Enage]
+ [license
+ 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])
+ ]
+]
+
+[def __Forward_Range__ [@boost:libs/range/doc/html/range/concepts/forward_range.html [*Forward Range]]]
+[def __Forward_Iterator__ [@http://www.sgi.com/tech/stl/ForwardIterator.html [*Forward Iterator]]]
+[def __Strict_Weak_Ordering__ [@http://www.sgi.com/tech/stl/StrictWeakOrdering.html [*Strict Weak Ordering]]]
+[def __cartesian_sort__header__ [@../../../../../../boost/algorithm/sorting/cartesian_sort.hpp boost/algorithm/sorting/cartesian_sort.hpp]]
+[def __test_cartesian_sort_cpp__ [@../../../../test/cartesian_sort.cpp test/cartesian_sort.cpp]]
+
+[import ../../../../../boost/algorithm/sorting/cartesian_sort.hpp]
+
+[section Synopsis]
+[reference__cartesian_sort]
+[endsect]
+
+[section Description]
+The `cartesian_sort()` function sorts the elements in the specified range into
+ascending order, meaning that if `i` and `j` are any two valid iterators in the
+specified range such that `i` precedes `j`, then `*j` is not less than `*i`.
+
+The `cartesian_sort()` function is not guaranteed to be stable. That is, if
+`*i` and `*j` are equivalent, meaning neither one is less than the other, then
+it is not guaranteed that `cartesian_sort()` will preserve the relative order
+of these two elements.
+
+When using the first and second versions, the range type must fulfill the
+__Forward_Range__ concept, and it must be mutable. When using the third and
+fourth versions, the iterator type must fulfill the __Forward_Iterator__
+concept, and its value type must be mutable.
+
+The first and third versions compare objects using the less-than operator. The
+second and fourth versions compare objects using the __Strict_Weak_Ordering__
+object `compare`.
+[endsect]
+
+[section:definition Where defined]
+``
+#include <__cartesian_sort__header__>
+``
+[endsect]
+
+[section Test]
+<__test_cartesian_sort_cpp__>
+[endsect]
+
Added: sandbox/tree_node/libs/algorithm/test/cartesian_sort.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/algorithm/test/cartesian_sort.cpp 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,34 @@
+// Copyright (C) 2013 Cromwell D. Enage
+// 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)
+
+#define BOOST_ALGORITHM_SORTING_CARTESIAN_SORT_USE_BREADTH_FIRST
+
+#include <boost/config.hpp>
+#include <boost/range/algorithm/equal.hpp>
+#include <boost/container_gen/selectors.hpp>
+#include <boost/container_gen/container_gen.hpp>
+#include <boost/container_gen/emplace_function_gen.hpp>
+#include <boost/algorithm/sorting/cartesian_sort.hpp>
+#include <boost/test/minimal.hpp>
+
+int test_main(int argc, char** argv)
+{
+#if defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION || \
+ defined BOOST_NO_SLIST
+ boost::container_gen<boost::listS,std::size_t>::type numbers, sorted;
+ boost::emplace_function_gen<boost::listS>::type emplacer;
+#else
+ boost::container_gen<boost::slistS,std::size_t>::type numbers, sorted;
+ boost::emplace_function_gen<boost::slistS>::type emplacer;
+#endif
+
+ emplacer[numbers](9)(3)(7)(1)(8)(12)(10)(20)(15)(18)(5);
+ emplacer[sorted](1)(3)(5)(7)(8)(9)(10)(12)(15)(18)(20);
+ boost::algorithm::cartesian_sort(numbers.begin(), numbers.end());
+ BOOST_CHECK(boost::range::equal(numbers, sorted));
+
+ return 0;
+}
+
Deleted: sandbox/tree_node/libs/tree_node/doc/changelog.qbk
==============================================================================
--- sandbox/tree_node/libs/tree_node/doc/changelog.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85023)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,186 +0,0 @@
-[/=============================================================================
- Copyright (C) 2011-2013 Cromwell D. Enage
-
- 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])
-=============================================================================/]
-
-[section Changelog]
-
-[heading From 0.4 to 0.5]
-
-[itemized_list
- [Added the __Copyable_Tree_Node__ and __Movable_Tree_Node__ concepts.]
- [Added the __tree_node_compare_selector__ template.]
- [Added the __null_balancer__ trait struct.]
- [Added the __at_key__ intrinsic function object.]
- [Added the __cartesian_sort__ and __cartesian_sort_range__ algorithms.]
-]
-
-[heading From 0.3 to 0.4]
-
-[itemized_list
- [
- Added the __binode_container__, __binode_associative_container__,
- __binode_set__, __binode_multiset__, __binode_map__, and
- __binode_multimap__ data structures.
- ]
- [Added the __red_black_balancer__ and __avl_balancer__ trait structs.]
- [
- Added the __Reversible_Tree_Node__, __Indexable_Container__, and
- __Indexable_Iterator__ concepts.
- ]
- [
- Refined the [*Type Generator] concept into the __Node_Type_Generator__
- and __Base_Type_Generator__ concepts.
- ]
- [
- Added the __TREE_NODE_COPYABLE_AND_MOVABLE__,
- __TREE_NODE_EMPLACEMENT_CTOR_FWD_DECL__,
- __TREE_NODE_EMPLACEMENT_CTOR_INLINE_HEADER__,
- __TREE_NODE_EMPLACEMENT_CTOR_INLINE_DEF__,
- __TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_FWD_DECL__,
- __TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_HEADER__,
- __TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_DEF__,
- __TREE_NODE_CAN_USE_FUSION__, and
- __TREE_NODE_CAN_USE_FUSION_WITH_TYPEOF__ preprocessor macros.
- ]
- [
- Added size type and emplacement constructor and size method expressions
- to the __Tree_Node__ concept.
- ]
- [
- Added `on_post_*` and `on_post_*_impl` method expressions to the
- __Base_Tree_Node__ concept.
- ]
- [
- Added iterator range and immutable iterator range types to the
- __Associative_Tree_Node__ concept.
- ]
- [__Tree_Node__ models are now __Movable__.]
- [
- __Tree_Node__ models are no longer __Equality_Comparable__ or
- __Less_Than_Comparable__.
- ]
- [
- Added the __tree_node_with_accumulation__ adaptor class template,
- the corresponding __Base_Tree_Node__ model
- __tree_node_with_accumulation_base__, the corresponding
- __Node_Type_Generator__ model __tree_node_with_accumulation_gen__,
- and the corresponding __Base_Type_Generator__ model
- __tree_node_with_accumulation_base_gen__.
- ]
- [
- Added the __tree_node_with_count__ adaptor class template, the
- corresponding __Base_Tree_Node__ model __tree_node_with_count_base__,
- the corresponding __Node_Type_Generator__ model
- __tree_node_with_count_gen__, and the corresponding
- __Base_Type_Generator__ model __tree_node_with_count_base_gen__.
- ]
- [Renamed `with_depth` to __tree_node_with_height__.]
- [Renamed `with_depth_base` to __tree_node_with_height_base__.]
- [Renamed `with_depth_gen` to __tree_node_with_height_gen__.]
- [
- Added the __Base_Type_Generator__ models
- __tree_node_with_count_base_gen__, __tree_node_with_height_base_gen__,
- __tree_node_with_position_base_gen__, and
- __tree_node_with_red_black_flag_base_gen__.
- ]
- [
- Added the __advance_binary__, __binary_index_of__,
- __binary_descendant__, __binary_descendant_at_index__,
- __binary_upper_bound__, and __binary_lower_bound__ algorithms.
- ]
- [
- Removed `tree_node_equal`, `tree_node_strictly_equal`,
- `tree_node_lexicographical_compare`, and
- `tree_node_strict_lexicographical_compare` algorithms.
- ]
-]
-
-[heading From 0.2 to 0.3]
-
-[itemized_list
- [
- Added the __Associative_Tree_Node__, __Non_Associative_Tree_Node__,
- __Binary_Tree_Node__, __N_ary_Tree_Node__, and [*Type Generator]
- concepts.
- ]
- [
- Added the __binary_node__ data structure, the corresponding
- __Base_Tree_Node__ model __binary_node_base__, and the corresponding
- [*Type Generator] model __binary_node_gen__.
- ]
- [
- Renamed `raw_node` to __nary_node__; added the corresponding
- __Base_Tree_Node__ model __nary_node_base__ and the corresponding
- [*Type Generator] model __nary_node_gen__.
- ]
- [
- Renamed `raw_associative_node` to __associative_node__; added the
- corresponding __Base_Tree_Node__ model __associative_node_base__ and
- the corresponding [*Type Generator] model __associative_node_gen__.
- ]
- [
- Added the __Base_Tree_Node__ model `with_depth_base` and the
- corresponding [*Type Generator] model `with_depth_gen`.
- ]
- [
- Added __tree_node_with_position__ adaptor class template,
- the corresponding __Base_Tree_Node__ model
- __tree_node_with_position_base__, and the corresponding
- [*Type Generator] model __tree_node_with_position_gen__.
- ]
- [
- Added the __tree_node_with_red_black_flag__ adaptor class template,
- the corresponding __Base_Tree_Node__ model
- __tree_node_with_red_black_flag_base__, and the corresponding
- [*Type Generator] model __tree_node_with_red_black_flag_gen__.
- ]
- [
- Added the __breadth_first_descendant_iterator__,
- __pre_order_descendant_iterator__, __post_order_descendant_iterator__,
- __in_order_iterator__, and __depth_first_descendant_iterator__ adaptor
- class templates.
- ]
- [
- Added the __dereference_iterator__, `tree_node_equal`,
- `tree_node_strictly_equal`, `tree_node_lexicographical_compare`, and
- `tree_node_strict_lexicographical_compare` algorithms.
- ]
- [
- Removed the [*Factory-Constructible Tree Node] and
- [*Cloneable Tree Node] concepts.
- ]
- [Removed the `tree_node_factory` facade.]
- [Removed the `shared_tree_node_base` `struct` template.]
- [Removed the `simple_node` and `simple_associative_node` data structures.]
- [
- Removed the `with_child_range_access` adaptor class template; the
- __Tree_Node__ concept now requires child range access for all models.
- ]
-]
-
-[heading From 0.1 to 0.2]
-
-[itemized_list
- [
- Added the __Base_Tree_Node__, [*Factory-Constructible Tree Node], and
- [*Cloneable Tree Node] concepts.
- ]
- [Added `tree_node_factory` facade.]
- [
- Added the __tree_node_base__ and `shared_tree_node_base` `struct`
- templates; each __Tree_Node__ model that is not a __Base_Tree_Node__
- now inherits from a corresponding __Base_Tree_Node__ which, in turn,
- inherits from one of these two types.
- ]
- [
- Added the `with_child_range_access` and `with_depth` adaptor class
- templates.
- ]
-]
-
-[endsect] [/ Changelog]
-
Added: sandbox/tree_node/libs/tree_node/doc/concept_assoc_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_assoc_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,337 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:associative_tree_node Associative Tree Node]
+
+[section Description]
+Models of this concept provide key-based access to their child nodes.
+[endsect]
+
+[section Refinement of]
+__Tree_Node__
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Associative Tree Node] concept.]]
+ [[`node`][An object of type `Node&`.]]
+ [[`const_node`][An object of type `Node const&`.]]
+ [[`source`][An object of type `Node&&`.]]
+ [[`key`][An object of type `Node::traits::key_type const&`.]]
+ [[`Args`][The type of `args`.]]
+ [
+ [`args`]
+ [
+ Arguments to be forwarded to the appropriate
+ `Node::traits::data_type` constructor.
+ ]
+ ]
+]
+
+[section:types Associated Types]
+Three new types are introduced.
+
+[table
+ [[Name][Expression][Description][Requirements]]
+ [
+ [Key type]
+ [`Node::traits::key_type`]
+ [The type of a key that a tree node will associate with a child node.]
+ []
+ ]
+ [
+ [Iterator range type]
+ [`Node::traits::iterator_range`]
+ [The type of a range of child nodes and their associated keys.]
+ [It must model a __Boost_Range__ concept.]
+ ]
+ [
+ [Immutable iterator range type]
+ [`Node::traits::const_iterator_range`]
+ [
+ The type of an immutable view of a range of child nodes and their
+ associated keys.
+ ]
+ [It must model a __Boost_Range__ concept.]
+ ]
+]
+
+In addition, the requirements for the iterator types are strengthened:
+
+[itemized_list
+ [The value type of `Node::iterator` must define a `first_type` type.]
+ [
+ The value type of `Node::iterator` must define a `first` member
+ variable of type `first_type`.
+ ]
+ [
+ Given an object `itr` of type `Node::iterator`, `itr->first` must be
+ convertible to `Node::traits::key_type const&`.
+ ]
+ [The value type of `Node::iterator` must define a `second_type` type.]
+ [
+ The value type of `Node::iterator` must define a `second` member
+ variable of type `second_type`.
+ ]
+ [
+ Given an object `itr` of type `Node::iterator`,
+ [^_dereference_iterator_(itr)] must be convertible to `Node&`.
+ ]
+ [The value type of `Node::const_iterator` must define a `first_type` type.]
+ [
+ The value type of `Node::const_iterator` must define a `first` member
+ variable of type `first_type`.
+ ]
+ [
+ Given an object `itr` of type `Node::const_iterator`, `itr->first` must
+ be convertible to `Node::traits::key_type const&`.
+ ]
+ [
+ The value type of `Node::const_iterator` must define a `second_type`
+ type.
+ ]
+ [
+ The value type of `Node::const_iterator` must define a `second` member
+ variable of type `second_type`.
+ ]
+ [
+ Given an object `itr` of type `Node::const_iterator`,
+ [^_dereference_iterator_(itr)] must be convertible to `Node const&`.
+ ]
+]
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Tree_Node__ concept, the
+following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Child creation]
+ [``
+ node.emplace(
+ key
+ , _boost_forward_<Args>(args)...
+ );
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing to the child that `node` associates
+ with `key` if `node` allows only one such association to exist;
+ otherwise, creates a tree node to be associated with the specified
+ key in the range of children of the invoking node, then returns an
+ iterator pointing to the created node, which will initialize its
+ data with the specified arguments.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child copy creation]
+ [``
+ node.insert(key, const_node)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing to the child that `node` associates
+ with `key` if `node` allows only one such association to exist;
+ otherwise, creates a deep copy of `const_node` to be associated
+ with the specified key in the range of children of the invoking
+ node, then returns an iterator pointing to the created node.
+ ]
+ [
+ The data type must model the __Copy_Constructible__ and __Movable__
+ concepts.
+ ]
+ [Linear with respect to the number of descendants of `const_node`]
+ ]
+ [
+ [Child move insertion]
+ [``
+ node.insert(key, source)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing to the child that `node` associates
+ with `key` if `node` allows only one such association to exist;
+ otherwise, move-constructs a copy of `source` to be associated
+ with the specified key in the range of children of the invoking
+ node, then returns an iterator pointing to the created node.
+ ]
+ [The data type must model the __Movable__ concept.]
+ [Linear with respect to the number of children of `source`]
+ ]
+ [
+ [Child read-only search]
+ [``
+ const_node.find(key)
+ ``]
+ [``
+ Node::const_iterator
+ ``]
+ [
+ Returns an iterator pointing to a child node associated with the
+ specified key, or `const_node.end()` if no such child exists.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child search]
+ [``
+ node.find(key)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing to a child node associated with the
+ specified key, or `node.end()` if no such child exists.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child read-only search lower bound]
+ [``
+ const_node.lower_bound(key)
+ ``]
+ [``
+ Node::const_iterator
+ ``]
+ [
+ Returns an iterator pointing to a child node associated with the
+ lowest key not less than the specified key, or `const_node.end()`
+ if no such child exists.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child search lower bound]
+ [``
+ node.lower_bound(key)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing to a child node associated with the
+ lowest key not less than the specified key, or `node.end()` if no
+ such child exists.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child read-only search upper bound]
+ [``
+ const_node.upper_bound(key)
+ ``]
+ [``
+ Node::const_iterator
+ ``]
+ [
+ Returns an iterator pointing to a child node associated with the
+ lowest key that is strictly greater than the specified key, or
+ `const_node.end()` if no such child exists.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child search upper bound]
+ [``
+ node.upper_bound(key)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing to a child node associated with the
+ lowest key that is strictly greater than the specified key, or
+ `node.end()` if no such child exists.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child read-only search range]
+ [``
+ const_node.equal_range(key)
+ ``]
+ [``
+ Node::traits::const_iterator_range
+ ``]
+ [
+ Returns a __Boost_Range__ of all child nodes associated with the
+ specified key. The child nodes in the range returned cannot be
+ modified. If no such children exist, then the range will be empty.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child search range]
+ [``
+ node.equal_range(key)
+ ``]
+ [``
+ Node::traits::iterator_range
+ ``]
+ [
+ Returns a __Boost_Range__ of all child nodes associated with the
+ specified key. The child nodes in the range returned can be
+ modified. If no such children exist, then the range will be empty.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Remove children]
+ [``
+ node.erase(key)
+ ``]
+ [``
+ Node::size_type
+ ``]
+ [
+ Removes all child nodes associated with the specified key from the
+ tree node. Returns the number of children removed.
+ ]
+ []
+ [
+ Linear with respect to the number of children and their descendants
+ in the range to be removed, plus logarithmic
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+[itemized_list
+ [__associative_node__]
+ [__associative_node_base__]
+]
+[endsect]
+
+[endsect] [/ Associative Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_base_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_base_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,379 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:base_tree_node Base Tree Node]
+
+[section Description]
+Models of this concept allow the __Tree_Node__ adaptor types to parameterically
+inherit their functionality for greater reuse.
+
+In practice, each [*Base Tree Node] model must do the following:
+
+[itemized_list
+ [
+ Inherit from either __tree_node_base__ or the return type of a
+ __Base_Type_Generator__.
+ ]
+ [Take in the derived type and the data type as template parameters.]
+ [
+ Also take in the key type if the derived type is (possibly) an
+ __Associative_Tree_Node__ model.
+ ]
+ [
+ Declare a template instantiation of __tree_node_base__ with the derived
+ type as a `friend struct` if it overrides any of __tree_node_base__
+ implementation methods.
+ ]
+]
+
+[endsect]
+
+[section Refinement of]
+__Tree_Node__
+[endsect]
+
+[variablelist Notation
+ [[`Base`][A type that models the [*Base Tree Node] concept.]]
+ [[`base`][An object of type `Base&`.]]
+ [[`const_base`][An object of type `Base const&`.]]
+ [[`Node`][A __Tree_Node__ model that inherits from `Base`.]]
+ [[`copy`][An object of type `Node const&`.]]
+ [[`source`][An object of type `Node&&`.]]
+ [[`alloc`][An object of type `Node::traits::allocator_reference`.]]
+ [[`itr`][An object of type `Node::iterator`.]]
+ [[`BIC`][A type that models the __Boolean_Integral_Constant__ concept.]]
+ [[`bic`][An object of type `BIC`.]]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node__ concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Tree_Node__ concept, the
+following expressions must be valid.
+
+[table
+ [[Name][Expression][Return Type][Semantics][__Runtime_Complexity__]]
+ [
+ [Derived access]
+ [`base.get_derived()`]
+ [`Node::pointer`]
+ [Returns a pointer to the same `Node` object.]
+ [Constant]
+ ]
+ [
+ [Derived read-only access]
+ [`const_base.get_derived()`]
+ [`Node::const_pointer`]
+ [Returns a pointer to the same immutable `Node` object.]
+ [Constant]
+ ]
+]
+
+Also, the following expressions must be valid (unless the `Node` type does
+/not/ define the operation within which the expression can be invoked).
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Derived copy constructor]
+ [`Base(copy)`]
+ []
+ [Constructs a deep copy of the specified node.]
+ [
+ The initializer list of the `Node` copy constructor must be able
+ to call this constructor.
+ ]
+ [Linear with respect to the number of descendants]
+ ]
+ [
+ [Derived copy constructor with allocator]
+ [`Base(copy, alloc)`]
+ []
+ [
+ Constructs a deep copy of the specified node. The new node will
+ use the specified allocator (if the allocator reference type is
+ mutable) or a copy of it (if the allocator reference type is to
+ `const`) to construct its own parent node or its own child nodes
+ if and when invoking its respective creation methods.
+ ]
+ [
+ The initializer list of the `Node` copy constructor with allocator
+ must be able to call this constructor.
+ ]
+ [Linear with respect to the number of descendants]
+ ]
+ [
+ [Derived move constructor]
+ [`Base(source)`]
+ []
+ [Transfers the contents of the specified node to this one.]
+ [
+ The initializer list of the `Node` move constructor must be able
+ to call this constructor.
+ ]
+ [Linear with respect to the number of children]
+ ]
+ [
+ [Derived move constructor with allocator]
+ [`Base(source, alloc)`]
+ []
+ [
+ Transfers the contents of the specified node to this one. The new
+ node will use the specified allocator (if the allocator reference
+ type is mutable) or a copy of it (if the allocator reference type
+ is to `const`) to construct its own parent node or its own child
+ nodes if and when invoking its respective creation methods.
+ ]
+ [
+ The initializer list of the `Node` move constructor with allocator
+ must be able to call this constructor.
+ ]
+ [Linear with respect to the number of children]
+ ]
+ [
+ [Base descendant cloning]
+ [`base.clone_descendants(copy)`]
+ [`void`]
+ [
+ Structurally modifies the invoking node so that it is a deep copy
+ of the specified node.
+ ]
+ [
+ The body of the `Node` copy constructor must be able to call this
+ method.
+ ]
+ [Linear with respect to the number of descendants]
+ ]
+ [
+ [Base descendant movement]
+ [`base.move_descendants(source)`]
+ [`void`]
+ [
+ Structurally modifies the invoking node so that it stores the
+ contents of the specified node.
+ ]
+ [
+ The body of the `Node` move constructor must be able to call this
+ method.
+ ]
+ [Linear with respect to the number of children]
+ ]
+ [
+ [Base copy assignment]
+ [`base.copy_assign(copy)`]
+ [`void`]
+ [
+ Structurally modifies the invoking node so that it is a deep copy
+ of the specified node.
+ ]
+ [
+ The body of the `Node` copy assignment operator must be able
+ to call this method.
+ ]
+ [Linear with respect to the number of descendants]
+ ]
+ [
+ [Base move assignment]
+ [`base.move_assign(source)`]
+ [`void`]
+ [
+ Structurally modifies the invoking node so that it stores the
+ contents of the specified node.
+ ]
+ [
+ The body of the `Node` move assignment operator must be able
+ to call this method.
+ ]
+ [Linear with respect to the number of children]
+ ]
+ [
+ [Assignment notification]
+ [`base.on_post_assign()`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by `Base` copy
+ or move assignment. In practice, propagates `Base`-specific values
+ affected by the assignment up the tree node's chain of ancestors.
+ ]
+ [
+ The body of the `Node` copy or move assignment operator must be
+ able to call this method.
+ ]
+ [Linear with respect to the number of ancestors]
+ ]
+ [
+ [Key-value modified notification]
+ [`base.on_post_modify_value(Key())`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that modify the value that the tree node associates with the
+ specified key.
+ ]
+ [
+ The body of the `Node` key-value modification function must be able
+ to call this method, and [^_result_of__has_key_<Node,Key>] must be
+ equivalent to __mpl_true__.
+ ]
+ [Linear with respect to the number of ancestors]
+ ]
+ [
+ [Key-value propagated notification]
+ [`base.on_post_propagate_value(Key())`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that propagate the value that the tree node associates with the
+ specified key up the tree node's chain of ancestors.
+ ]
+ [
+ [^_result_of__has_key_<Node,Key>] must be equivalent to
+ __mpl_true__.
+ ]
+ [Linear with respect to the number of ancestors]
+ ]
+ [
+ [Key-value once-propagated notification]
+ [`base.on_post_propagate_value_once(Key())`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that propagate the value that the tree node associates with the
+ specified key up to the tree node's parent.
+ ]
+ [
+ [^_result_of__has_key_<Node,Key>] must be equivalent to
+ __mpl_true__.
+ ]
+ [Constant]
+ ]
+ [
+ [Insertion notification]
+ [`base.on_post_inserted(itr, bic)`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that insert or emplace the invoking node. The specified iterator
+ points to this node.
+ ]
+ [
+ The body of any `Node` insertion or emplacement member function
+ must be able to call this method.
+ ]
+ [
+ Amortized constant if `BIC::value == true`, linear with respect to
+ the number of siblings otherwise
+ ]
+ ]
+ [
+ [Range insertion notification]
+ [`base.on_post_insert(itr, itr_end, bic)`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that insert or emplace the nodes in the specified range.
+ ]
+ [
+ The body of any `Node` insertion or emplacement member function
+ must be able to call this method.
+ ]
+ [
+ Amortized constant if `BIC::value == true`, linear with respect to
+ the number of siblings otherwise
+ ]
+ ]
+ [
+ [Erasure notification]
+ [`base.on_post_erase(bic)`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that remove the specified children and their descendants from a
+ node.
+ ]
+ [
+ The body of any `Node` erasure member function must be able to call
+ this method.
+ ]
+ [
+ Linear with respect to the number of children plus the number of
+ ancestors
+ ]
+ ]
+ [
+ [Clear notification]
+ [`base.on_post_clear()`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that remove all descendants from a node.
+ ]
+ [
+ The body of the `Node::clear()` member function must be able
+ to call this method.
+ ]
+ [
+ Linear with respect to the number of children removed plus the
+ number of ancestors
+ ]
+ ]
+ [
+ [Left rotation notification]
+ [`base.on_post_rotate_left()`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that rotate a node to the left.
+ ]
+ [
+ The body of the `Node::rotate_left()` member function must be able
+ to call this method.
+ ]
+ [Linear with respect to the number of ancestors]
+ ]
+ [
+ [Right rotation notification]
+ [`base.on_post_rotate_right()`]
+ [`void`]
+ [
+ Updates any `Node`-specific information invalidated by operations
+ that rotate a node to the right.
+ ]
+ [
+ The body of the `Node::rotate_right()` member function must be able
+ to call this method.
+ ]
+ [Linear with respect to the number of ancestors]
+ ]
+]
+[endsect] [/ Valid Expressions and Semantics]
+
+[section Models]
+[itemized_list
+ [__binary_node_base__]
+ [__nary_node_base__]
+ [__associative_node_base__]
+ [__tree_node_with_accumulation_base__]
+ [__tree_node_with_count_base__]
+ [__tree_node_with_height_base__]
+ [__tree_node_with_position_base__]
+ [__tree_node_with_red_black_flag_base__]
+]
+[endsect]
+
+[endsect] [/ Base Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_base_type_generator.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_base_type_generator.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,75 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:base_type_generator Base Type Generator]
+
+[section Description]
+A [*Base Type Generator] is a __Metafunction_Class__ that returns a
+__Base_Tree_Node__ from which __Tree_Node__ adaptor types can inherit the
+necessary functionality.
+[endsect]
+
+[variablelist Notation
+ [
+ [`Generator`]
+ [A type that models the [*Base Type Generator] concept.]
+ ]
+ [
+ [`Derived`]
+ [
+ The most descendant type that will inherit from the return type of
+ `Generator`.
+ ]
+ ]
+ [
+ [`Key`]
+ [The key type of the __Associative_Tree_Node__ to be returned.]
+ ]
+ [
+ [`Data`]
+ [The data type of the __Tree_Node__ to be returned.]
+ ]
+]
+
+[section:expressions Valid Expressions and Semantics]
+[table
+ [[Name][Expression][Return Type]]
+ [
+ [Non-associative invocation]
+ [[^_mpl_apply_wrap2_<Generator,Derived,Data>::type]]
+ [
+ A __Non_Associative_Tree_Node__ model whose `traits::data_type` is
+ the same as `Data`.
+ ]
+ ]
+ [
+ [Associative invocation]
+ [[^_mpl_apply_wrap3_<Generator,Derived,Key,Data>::type]]
+ [
+ An __Associative_Tree_Node__ model whose `traits::key_type` is the
+ same as `Key` and whose `traits::data_type` is the same as `Data`.
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+[itemized_list
+ [__binary_node_base_gen__]
+ [__nary_node_base_gen__]
+ [__associative_node_base_gen__]
+ [__tree_node_with_accumulation_base_gen__]
+ [__tree_node_with_count_base_gen__]
+ [__tree_node_with_height_base_gen__]
+ [__tree_node_with_position_base_gen__]
+ [__tree_node_with_red_black_flag_base_gen__]
+]
+[endsect]
+
+[endsect] [/ Base Type Generator]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_binary_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_binary_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,315 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:binary_tree_node Binary Tree Node]
+
+[section Description]
+Models of this concept store at most two child nodes: left and right. The
+operations that this concept defines include access to these children and
+rotations that use the appropriate child as a pivot node.
+[endsect]
+
+[section Refinement of]
+[itemized_list
+ [__Non_Associative_Tree_Node__]
+ [__Reversible_Tree_Node__]
+]
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Binary Tree Node] concept.]]
+ [[`node`][An object of type `Node&`.]]
+ [[`const_node`][An object of type `Node const&`.]]
+ [[`rvalue_node`][An object of type `Node&&`.]]
+ [[`Args`][The type of `args`.]]
+ [
+ [`args`]
+ [
+ Arguments to be forwarded to the appropriate
+ `Node::traits::data_type` constructor.
+ ]
+ ]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Non_Associative_Tree_Node__
+and __Reversible_Tree_Node__ concepts.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Non_Associative_Tree_Node__
+and __Reversible_Tree_Node__ concepts, the following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Parent-of-left creation]
+ [``
+ node.emplace_parent_of_left(
+ _boost_forward_<Args>(args)...
+ )
+ ``]
+ [``
+ Node::pointer
+ ``]
+ [
+ Creates and returns a tree node to be stored as the parent of the
+ invoking node. The node returned will initialize its data with the
+ specified arguments. The invoking node will become the left child
+ of the new node.
+
+ If a parent existed previously, that node shall become the parent
+ of the new node, and the new node shall take the place of the
+ invoking node.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Parent-of-right creation]
+ [``
+ node.emplace_parent_of_right(
+ _boost_forward_<Args>(args)...
+ )
+ ``]
+ [``
+ Node::pointer
+ ``]
+ [
+ Creates and returns a tree node to be stored as the parent of the
+ invoking node. The node returned will initialize its data with the
+ specified arguments. The invoking node will become the right child
+ of the new node.
+
+ If a parent existed previously, that node shall become the parent
+ of the new node, and the new node shall take the place of the
+ invoking node.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Left child creation]
+ [``
+ node.emplace_left(
+ _boost_forward_<Args>(args)...
+ )
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Creates and returns a tree node to be stored as the left child of
+ the invoking node. The node returned will initialize its data with
+ the specified arguments.
+
+ If a left child existed previously, that node shall become the left
+ child of the new node.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Left child copy creation]
+ [``
+ node.insert_left(const_node)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Creates and returns a deep copy of `const_node` to be stored as the
+ left child of the invoking node.
+
+ If a left child existed previously, that node shall become the
+ left-most descendant of the new node, or the first node encountered
+ during a forward in-order traversal of the new node's descendants.
+ ]
+ [
+ The data type must model the __Copy_Constructible__ and __Movable__
+ concepts.
+ ]
+ [Linear with respect to the number of descendants of `const_node`]
+ ]
+ [
+ [Right child creation]
+ [``
+ node.emplace_right(
+ _boost_forward_<Args>(args)...
+ )
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Creates and returns a tree node to be stored as the right child of
+ the invoking node. The node returned will initialize its data with
+ the specified arguments.
+
+ If a right child existed previously, that node shall become the
+ right child of the new node.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Right child copy creation]
+ [``
+ node.insert_right(const_node)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Creates and returns a deep copy of `const_node` to be stored as the
+ right child of the invoking node.
+
+ If a right child existed previously, that node shall become the
+ right-most descendant of the new node, or the last node encountered
+ during a forward in-order traversal of the new node's descendants.
+ ]
+ [
+ The data type must model the __Copy_Constructible__ and __Movable__
+ concepts.
+ ]
+ [Linear with respect to the number of descendants of `const_node`]
+ ]
+ [
+ [Left child read-only access]
+ [``
+ const_node.get_left_child_ptr()
+ ``]
+ [``
+ Node::const_pointer
+ ``]
+ [
+ Returns the left child of the tree node, or a null pointer if no
+ such tree node exists.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Left child access]
+ [``
+ node.get_left_child_ptr()
+ ``]
+ [``
+ Node::pointer
+ ``]
+ [
+ Returns the left child of the tree node, or a null pointer if no
+ such tree node exists.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Right child read-only access]
+ [``
+ const_node.get_right_child_ptr()
+ ``]
+ [``
+ Node::const_pointer
+ ``]
+ [
+ Returns the right child of the tree node, or a null pointer if no
+ such tree node exists.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Right child access]
+ [``
+ node.get_right_child_ptr()
+ ``]
+ [``
+ Node::pointer
+ ``]
+ [
+ Returns the right child of the tree node, or a null pointer if no
+ such tree node exists.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Rotate left]
+ [``
+ node.rotate_left()
+ ``]
+ [``
+ Node::pointer
+ ``]
+ [
+ Rotates the tree node in its hierarchy so that its right child, the
+ pivot node, becomes its parent. The left child of the pivot node
+ becomes the right child of the tree node. Returns the pivot node.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Rotate right]
+ [``
+ node.rotate_right()
+ ``]
+ [``
+ Node::pointer
+ ``]
+ [
+ Rotates the tree node in its hierarchy so that its left child, the
+ pivot node, becomes its parent. The right child of the pivot node
+ becomes the left child of the tree node. Returns the pivot node.
+ ]
+ []
+ [Amortized constant]
+ ]
+ [
+ [Remove left child]
+ [``
+ node.erase_left()
+ ``]
+ [``
+ void
+ ``]
+ [Removes the left child from the tree node.]
+ []
+ [Linear with respect to the number of descendants of the left child]
+ ]
+ [
+ [Remove right child]
+ [``
+ node.erase_right()
+ ``]
+ [`void
+ ``]
+ [Removes the right child from the tree node.]
+ []
+ [Linear with respect to the number of descendants of the right child]
+ ]
+]
+[endsect]
+
+[section Models]
+[itemized_list
+ [__binary_node__]
+ [__binary_node_base__]
+]
+[endsect]
+
+[endsect] [/ Binary Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_copyable_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_copyable_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,134 @@
+[/=============================================================================
+ Copyright (C) 2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:copyable_tree_node Copyable Tree Node]
+
+[section Description]
+Models of this concept are meant for external usage by applications or by other
+data structures.
+
+In practice, each [*Copyable Tree Node] model must do the following:
+
+[itemized_list
+ [Inherit from the corresponding __Base_Tree_Node__ model.]
+ [Take in the data type as template parameters.]
+ [
+ Also take in the key type if (possibly) modeling the
+ __Associative_Tree_Node__ concept.
+ ]
+ [
+ Use the __TREE_NODE_COPYABLE_AND_MOVABLE__,
+ __TREE_NODE_EMPLACEMENT_CTOR_INLINE_DEF__, and
+ __TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_DEF__ macros to support
+ C++03 compilers.
+ ]
+]
+
+[endsect]
+
+[section Refinement of]
+[itemized_list
+ [__Tree_Node__]
+ [__Copy_Constructible__]
+]
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Copyable Tree Node] concept.]]
+ [[`node`][An object of type `Node&`.]]
+ [[`const_node`][An object of type `Node const&`.]]
+ [[`alloc`][An object of type `Node::traits::allocator_reference`.]]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node__ and
+__Copy_Constructible__ concepts.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Tree_Node__ and
+__Copy_Constructible__ concepts, the following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Copy constructor]
+ [``
+ Node(const_node)
+ ``]
+ []
+ [Constructs a deep copy of the specified node.]
+ [
+ The data type must be __Copy_Constructible__, the
+ __container_allocator_traits__ static method
+ `select_on_container_copy_construction` must be callable when
+ passed in the allocator of the specified node, and the allocator
+ reference type must be `Node::traits::allocator const&`.
+ ]
+ []
+ ]
+ [
+ [Copy constructor with allocator]
+ [``
+ Node(
+ boost::container::allocator_arg
+ , alloc
+ , const_node
+ )
+ ``]
+ []
+ [
+ Constructs a deep copy of the specified node. The new node will
+ use the specified allocator (if the allocator reference type is
+ mutable) or a copy of it (if the allocator reference type is to
+ `const`) to construct its own parent node or its own child nodes
+ if and when invoking its respective creation methods.
+ ]
+ [The data type must be __Copy_Constructible__.]
+ []
+ ]
+]
+[endsect] [/ Valid Expressions and Semantics]
+
+[section Models]
+[itemized_list
+ [__binary_node__ if `T` is __Copy_Constructible__]
+ [__nary_node__ if `T` is __Copy_Constructible__]
+ [__associative_node__ if `Data` is __Copy_Constructible__]
+ [
+ __tree_node_with_accumulation__ if `BaseGenerator` returns a [*Copyable
+ Tree Node] model
+ ]
+ [
+ __tree_node_with_count__ if `BaseGenerator` returns a [*Copyable Tree
+ Node] model
+ ]
+ [
+ __tree_node_with_height__ if `BaseGenerator` returns a [*Copyable Tree
+ Node] model
+ ]
+ [
+ __tree_node_with_position__ if `BaseGenerator` returns a [*Copyable
+ Tree Node] model
+ ]
+ [
+ __tree_node_with_red_black_flag__ if `BaseGenerator` returns a
+ [*Copyable Tree Node] model
+ ]
+]
+[endsect]
+
+[endsect] [/ Copyable Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_descendant_iterator.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_descendant_iterator.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,85 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:tree_node_desc_iterator Tree Node Descendant Iterator]
+
+[section Description]
+This concept may seem redundant at first, especially when iterating through
+__Non_Associative_Tree_Node__ objects; however, for __Associative_Tree_Node__
+objects, models of this concept provide the sole means of accessing the key
+associated with each node being traversed. (Root nodes are not associated with
+keys at the tree node level, so models of this concept do not traverse them.)
+[endsect]
+
+[section Refinement of]
+__Tree_Node_Iterator__
+[endsect]
+
+[variablelist Notation
+ [
+ [`Iterator`]
+ [A type that models the [*Tree Node Descendant Iterator] concept.]
+ ]
+ [
+ [`itr`]
+ [An object of type `Iterator`.]
+ ]
+ [
+ [`Node`]
+ [A type that models the __Tree_Node__ concept.]
+ ]
+ [
+ [`node`]
+ [An object of type `Node&`.]
+ ]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node_Iterator__ concept;
+however, the requirements for the value type are strengthened: it must be the
+appropriate iterator type of `Node`.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+None beyond those defined in the __Tree_Node_Iterator__ concept; however, the
+type requirements for the constructors are strengthened, and their semantics
+are clarified.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Type requirements]
+ [Semantics]
+ ]
+ [
+ [Constructor from node]
+ [``
+ Iterator(node)
+ Iterator itr(node)
+ ``]
+ []
+ [
+ Constructs an iterator that will iterate through the descendants of
+ the specified node.
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+[itemized_list
+ [__breadth_first_descendant_iterator__]
+ [__pre_order_descendant_iterator__]
+ [__post_order_descendant_iterator__]
+ [__depth_first_descendant_iterator__]
+]
+[endsect]
+
+[endsect] [/ Tree Node Descendant Iterator]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_full_iterator.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_full_iterator.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,71 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:full_tree_node_iterator Full Tree Node Iterator]
+
+[section Description]
+This concept specifies the requirement that models traverse the root node as
+well as its descendants.
+[endsect]
+
+[section Refinement of]
+__Tree_Node_Iterator__
+[endsect]
+
+[variablelist Notation
+ [[`Iterator`][A type that models the [*Full Tree Node Iterator] concept.]]
+ [[`itr`][An object of type `Iterator`.]]
+ [[`Node`][The value type of `Iterator`.]]
+ [[`node`][An object of type `Node&`.]]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node_Iterator__ concept;
+however, the requirements for the value type are strengthened: it must model
+the __Tree_Node__ concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+None beyond those defined in the __Tree_Node_Iterator__ concept; however, the
+type requirements for the constructors are strengthened, and their semantics
+are clarified.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Type requirements]
+ [Semantics]
+ ]
+ [
+ [Constructor from node]
+ [``
+ Iterator(node)
+ Iterator itr(node)
+ ``]
+ []
+ [
+ Constructs an iterator that will iterate through the specified node
+ and its descendants.
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+[itemized_list
+ [__breadth_first_iterator__]
+ [__pre_order_iterator__]
+ [__post_order_iterator__]
+ [__in_order_iterator__]
+ [__depth_first_iterator__]
+]
+[endsect]
+
+[endsect] [/ Full Tree Node Iterator]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_indexable_container.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_indexable_container.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,75 @@
+[/=============================================================================
+ Copyright (C) 2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:indexable_container Indexable Container]
+
+[section Description]
+An [*Indexable Container] is a __Reversible_Container__ whose iterator type is
+an __Indexable_Iterator__. It provides sub-linear time access to arbitrary
+elements.
+[endsect]
+
+[section Refinement of]
+__Reversible_Container__
+[endsect]
+
+[section:types Associated Types]
+None beyond those defined in __Reversible_Container__. However, the
+requirements for the iterator type are strengthened: it must be an
+__Indexable_Iterator__.
+[endsect]
+
+[variablelist Notation
+ [[`X`][A type that models the [*Indexable Container] concept.]]
+ [[`a`][An object of type `X`.]]
+]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Reversible_Container__ concept,
+the following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type Requirements]
+ [Precondition]
+ [Invariant]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Element access]
+ [`a[n]`]
+ [`reference` if `a` is mutable, `const_reference` otherwise]
+ [Returns the `n`th element from the beginning of the container.]
+ [`n` must be convertible to `size_type`]
+ [`0 < n <= a.size()`]
+ [Equivalent to `*(a.begin() + n)`.]
+ [Sublinear]
+ ]
+]
+[endsect] [/ Valid Expressions and Semantics]
+
+[section Models]
+[itemized_list
+ [
+ __deque__ if the value associated with __count_key__ exists for the
+ return type of `NodeGenerator`
+ ]
+ [__binode_associative_container__]
+ [__binode_set__]
+ [__binode_map__]
+ [__binode_multiset__]
+ [__binode_multimap__]
+]
+[endsect]
+
+[endsect] [/ Indexable Container]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_indexable_iterator.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_indexable_iterator.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,163 @@
+[/=============================================================================
+ Copyright (C) 2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:indexable_iterator Indexable Iterator]
+
+[section Description]
+An [*Indexable Iterator] is an iterator that provides both increment and
+decrement as well as sublinear-time operators for moving forward and backward
+in arbitrary-sized steps. The runtime complexity requirement is the only
+major difference between an [*Indexable Iterator] and a
+__Random_Access_Iterator__.
+[endsect]
+
+[section Refinement of]
+[itemized_list
+ [__Bidirectional_Iterator__]
+ [__Less_Than_Comparable__]
+]
+[endsect]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Bidirectional_Iterator__ and
+__Less_Than_Comparable__ concepts.
+[endsect]
+
+[variablelist Notation
+ [[`Iterator`][A type that models the [*Indexable Iterator] concept.]]
+ [[`i`, `j`][Objects of type `Iterator`.]]
+ [[`T`][The value type of `Iterator`.]]
+ [[`t`][An object of type `T`.]]
+ [[`Distance`][The distance type of `Iterator`.]]
+ [[`n`][An object of type `Distance`.]]
+]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Bidirectional_Iterator__
+concept, the following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type Requirements]
+ [Precondition]
+ [Postcondition]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Iterator addition assignment]
+ [`i += n`]
+ [`X&`]
+ [
+ If `n > 0`, equivalent to executing `++i` `n` times. If `n < 0`,
+ equivalent to executing `--i` `n` times. If `n == 0`, this is a
+ null operation.
+ ]
+ []
+ [
+ Including `i` itself, there must be `n` dereferenceable or
+ past-the-end iterators following or preceding `i`, depending on
+ whether `n` is positive or negative.
+ ]
+ [`i` is dereferenceable or past-the-end.]
+ [Sublinear]
+ ]
+ [
+ [Iterator addition]
+ [`i + n` or `n + i`]
+ [`X`]
+ [
+ Equivalent to `{ X tmp = i; return tmp += n; }`. The two forms
+ `i + n` and `n + i` are identical.
+ ]
+ []
+ [Same as for `i += n`]
+ [The result is dereferenceable or past-the-end.]
+ [Sublinear]
+ ]
+ [
+ [Iterator subtraction assignment]
+ [`i -= n`]
+ [`X&`]
+ [Equivalent to `i += (-n)`.]
+ []
+ [
+ Including `i` itself, there must be `n` dereferenceable or
+ past-the-end iterators preceding or following `i`, depending on
+ whether `n` is positive or negative.
+ ]
+ [`i` is dereferenceable or past-the-end.]
+ [Sublinear]
+ ]
+ [
+ [Iterator subtraction]
+ [`i - n`]
+ [`X`]
+ [Equivalent to `{ X tmp = i; return tmp -= n; }`.]
+ []
+ [Same as for `i -= n`]
+ [The result is dereferenceable or past-the-end.]
+ [Sublinear]
+ ]
+ [
+ [Difference]
+ [`i - j`]
+ [`Distance`]
+ [Returns a number `n` such that `i == j + n`.]
+ []
+ [
+ Either `i` is reachable from `j` or `j` is reachable from `i`, or
+ both.
+ ]
+ []
+ [Sublinear]
+ ]
+ [
+ [Element operator]
+ [`i[n]`]
+ [Convertible to `T`]
+ [Equivalent to `*(i + n)`.]
+ []
+ [`i + n` exists and is dereferenceable.]
+ []
+ [Sublinear]
+ ]
+ [
+ [Element assignment]
+ [`i[n] = t`]
+ [Convertible to `T`]
+ [Equivalent to `*(i + n)`.]
+ [`X` is mutable.]
+ [`i + n` exists and is dereferenceable.]
+ [`i[n]` is a copy of `t`.]
+ [Sublinear]
+ ]
+]
+
+In addition, the domain of the less-than comparison expression `i < j` is the
+group of iterators that are reachable from each other: that is, either `i` is
+reachable from `j` or `j` is reachable from `i`, or both.
+
+The __Forward_Iterator__ and __Reverse_Iterator__ requirements that the
+increment and decrement operators must exhibit constant time complexity have
+been relaxed; they now need only exhibit linear time complexity with respect
+to the number of descendants in the worst case.
+[endsect]
+
+[section Models]
+[itemized_list
+ [The iterator types of __deque__]
+ [The iterator types of __binode_associative_container__]
+]
+[endsect]
+
+[endsect] [/ Indexable Iterator]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_iterator.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_iterator.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,107 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:tree_node_iterator Tree Node Iterator]
+
+[section Description]
+Tree-traversing iterators at the __Tree_Node__ level must be created
+differently from iterators at the __Container__ level. Furthermore, tree node
+iterators typically store more stateful information than their __Container__
+counterparts; requiring two of them to check for dereferenceability may prove
+somewhat memory-inefficient. This concept provides an alternate means of
+checking for dereferenceability that requires the use of only the active
+iterator.
+[endsect]
+
+[section Refinement of]
+__Forward_Iterator__
+[endsect]
+
+[variablelist Notation
+ [[`Iterator`][A type that models the [*Tree Node Iterator] concept.]]
+ [[`itr`][An object of type `Iterator`.]]
+ [[`Node`][A type that models the __Tree_Node__ concept.]]
+ [[`node`][An object of type `Node&`.]]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Forward_Iterator__ concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Forward_Iterator__ concept, the
+following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Default constructor]
+ [``
+ Iterator()
+ Iterator itr
+ ``]
+ []
+ [Constructs a non-dereferenceable (past-the-end) iterator.]
+ [Constant]
+ ]
+ [
+ [Constructor from node]
+ [``
+ Iterator(node)
+ Iterator itr(node)
+ ``]
+ []
+ [Refinement-specific.]
+ [Amortized constant]
+ ]
+ [
+ [Dereferenceability]
+ [``
+ itr
+ ``]
+ [A type that can be used in a boolean context.]
+ [
+ Returns a value convertible to `true` if `itr` is dereferenceable,
+ a value convertible to `false` if it is past-the-end.
+ ]
+ [Constant]
+ ]
+ [
+ [Node dereference]
+ [``
+ _dereference_iterator_(itr)
+ ``]
+ [`Node&` or `Node const&`, depending on the mutability of `itr`.]
+ [
+ Returns a reference to the __Tree_Node__ to which `itr` currently
+ points.
+ ]
+ [Constant]
+ ]
+]
+
+The __Forward_Iterator__ requirement that the increment operators must exhibit
+constant time complexity has been relaxed; they now need only exhibit linear
+time complexity with respect to the number of descendants in the worst case.
+[endsect]
+
+[section Models]
+[itemized_list
+ [All models of the __Full_Tree_Node_Iterator__ concept.]
+ [All models of the __Tree_Node_Descendant_Iterator__ concept.]
+]
+[endsect]
+
+[endsect] [/ Tree Node Iterator]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_movable_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_movable_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,135 @@
+[/=============================================================================
+ Copyright (C) 2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:movable_tree_node Movable Tree Node]
+
+[section Description]
+Models of this concept are meant for external usage by applications or by other
+data structures.
+
+In practice, each [*Movable Tree Node] model must do the following:
+
+[itemized_list
+ [Inherit from the corresponding __Base_Tree_Node__ model.]
+ [Take in the data type as template parameters.]
+ [
+ Also take in the key type if (possibly) modeling the
+ __Associative_Tree_Node__ concept.
+ ]
+ [
+ Use the __TREE_NODE_COPYABLE_AND_MOVABLE__,
+ __TREE_NODE_EMPLACEMENT_CTOR_INLINE_DEF__, and
+ __TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_DEF__ macros to support
+ C++03 compilers.
+ ]
+]
+
+[endsect]
+
+[section Refinement of]
+[itemized_list
+ [__Tree_Node__]
+ [__Movable__]
+]
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Movable Tree Node] concept.]]
+ [[`node`][An object of type `Node&`.]]
+ [[`rvalue_node`][An object of type `Node&&`.]]
+ [[`alloc`][An object of type `Node::traits::allocator_reference`.]]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node__ and __Movable__
+concepts.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Tree_Node__ and __Movable__
+concepts, the following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Move constructor]
+ [``
+ Node(rvalue_node)
+ ``]
+ []
+ [Transfers the contents of the specified node to this one.]
+ [
+ The data type must be __Movable__, the
+ __container_allocator_traits__ static method
+ `select_on_container_copy_construction` must be callable when
+ passed in the allocator of the specified node, and the allocator
+ reference type must be `Node::traits::allocator const&`.
+ ]
+ []
+ ]
+ [
+ [Move constructor with allocator]
+ [``
+ Node(
+ boost::container::allocator_arg
+ , alloc
+ , rvalue_node
+ )
+ ``]
+ []
+ [
+ Transfers the contents of the specified node to this one. The
+ new node will use the specified allocator (if the allocator
+ reference type is mutable) or a copy of it (if the allocator
+ reference type is to `const`) to construct its own parent node or
+ its own child nodes if and when invoking its respective creation
+ methods.
+ ]
+ [The data type must be __Movable__.]
+ []
+ ]
+]
+[endsect] [/ Valid Expressions and Semantics]
+
+[section Models]
+[itemized_list
+ [__binary_node__ if `T` is __Movable__]
+ [__nary_node__ if `T` is __Movable__]
+ [__associative_node__ if `Data` is __Movable__]
+ [
+ __tree_node_with_accumulation__ if `BaseGenerator` returns a [*Movable
+ Tree Node] model
+ ]
+ [
+ __tree_node_with_count__ if `BaseGenerator` returns a [*Movable Tree
+ Node] model
+ ]
+ [
+ __tree_node_with_height__ if `BaseGenerator` returns a [*Movable Tree
+ Node] model
+ ]
+ [
+ __tree_node_with_position__ if `BaseGenerator` returns a [*Movable Tree
+ Node] model
+ ]
+ [
+ __tree_node_with_red_black_flag__ if `BaseGenerator` returns a
+ [*Movable Tree Node] model
+ ]
+]
+[endsect]
+
+[endsect] [/ Movable Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_nary_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_nary_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,182 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:nary_tree_node N-ary Tree Node]
+
+[section Description]
+Models of this concept store arbitrary numbers of children and provide simple
+child insertion expressions.
+[endsect]
+
+[section Refinement of]
+__Non_Associative_Tree_Node__
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*N-ary Tree Node] concept.]]
+ [[`dest_node`, `src_node`][Objects of type `Node&`.]]
+ [[`const_node`][An object of type `Node const&`.]]
+ [[`rvalue_node`][An object of type `Node&&`.]]
+ [[`pos`, `itr`, `itr_end`][Objects of type `Node::iterator`.]]
+ [[`Args`][The type of `args`.]]
+ [
+ [`args`]
+ [
+ Arguments to be forwarded to the appropriate
+ `Node::traits::data_type` constructor.
+ ]
+ ]
+]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Non_Associative_Tree_Node__
+concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Non_Associative_Tree_Node__
+concept, the following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Child creation]
+ [``
+ dest_node.emplace(
+ _boost_forward_<Args>(args)...
+ )
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Creates and returns a tree node to be stored in the range of
+ children of `dest_node`. The node returned will initialize
+ its data with the specified arguments.
+ ]
+ []
+ [Logarithmic]
+ ]
+ [
+ [Child copy creation]
+ [``
+ dest_node.insert(const_node)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Creates and returns a deep copy of `const_node` to be stored in the
+ range of children of `dest_node`.
+ ]
+ [
+ The data type must model the __Copy_Constructible__ and __Movable__
+ concepts.
+ ]
+ [Linear with respect to the number of descendants of `const_node`]
+ ]
+ [
+ [Child move insertion]
+ [``
+ dest_node.insert(rvalue_node)
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [Stores `rvalue_node` in the range of children of `dest_node`.]
+ [The data type must model the __Movable__ concept.]
+ [Logarithmic]
+ ]
+ [
+ [Splice node]
+ [``
+ dest_node.splice(pos, src_node)
+ ``]
+ [A __Boost_Range__ whose element type is `Node`]
+ [
+ Transfers all child nodes and their descendants from `src_node` to
+ `dest_node`, with `pos` as the insertion point. Returns the range
+ of child nodes inserted.
+ ]
+ [
+ `pos` must be dereferenceable or past-the-end of the range of
+ children of `dest_node`.
+ ]
+ [Linear with respect to the number of children of `src_node`]
+ ]
+ [
+ [Splice single child]
+ [``
+ dest_node.splice(pos, src_node, itr)
+ ``]
+ [A __Boost_Range__ whose element type is `Node`]
+ [
+ Transfers the child node to which `itr` points, along with its
+ descendants, from `src_node` to `dest_node`, with `pos` as the
+ insertion point. Returns a range containing the node inserted.
+ ]
+ [[itemized_list
+ [
+ `pos` must be dereferenceable or past-the-end of the range of
+ children of `dest_node`.
+ ]
+ [`itr` must point to a valid child node of `src_node`.]
+ ]]
+ []
+ ]
+ [
+ [Splice range]
+ [``
+ dest_node.splice(
+ pos
+ , src_node
+ , itr
+ , itr_end
+ )
+ ``]
+ [A __Boost_Range__ whose element type is `Node`]
+ [
+ Transfers all child nodes in the specified sub-range, along with
+ their descendants, from `src_node` to `dest_node`, with `pos` as
+ the insertion point. Returns the range of child nodes inserted.
+ ]
+ [[itemized_list
+ [
+ `pos` must be dereferenceable or past-the-end of the range of
+ children of `dest_node`.
+ ]
+ [
+ `itr` and `itr_end` must refer to a valid sub-range of the
+ range of children of `src_node`.
+ ]
+ [
+ `pos` must point outside the sub-range referred to by `itr` and
+ `itr_end`.
+ ]
+ ]]
+ [Linear with respect to the size of the specified sub-range]
+ ]
+]
+[endsect]
+
+[section Models]
+[itemized_list
+ [__nary_node__]
+ [__nary_node_base__]
+]
+[endsect]
+
+[endsect] [/ N-ary Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_node_type_generator.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_node_type_generator.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,67 @@
+[/=============================================================================
+ Copyright (C) 2011-2012 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:node_type_generator Node Type Generator]
+
+[section Description]
+A [*Node Type Generator] is a __Metafunction_Class__ that returns a
+__Tree_Node__ model of which objects can be instantiated.
+[endsect]
+
+[variablelist Notation
+ [
+ [`Generator`]
+ [A type that models the [*Node Type Generator] concept.]
+ ]
+ [
+ [`Key`]
+ [The key type of the __Associative_Tree_Node__ to be returned.]
+ ]
+ [
+ [`Data`]
+ [The data type of the __Tree_Node__ to be returned.]
+ ]
+]
+
+[section:expressions Valid Expressions and Semantics]
+[table
+ [[Name][Expression][Return Type]]
+ [
+ [Non-associative invocation]
+ [[^_mpl_apply_wrap1_<Generator,Data>::type]]
+ [
+ A __Non_Associative_Tree_Node__ model whose `traits::data_type` is
+ the same as `Data`.
+ ]
+ ]
+ [
+ [Associative invocation]
+ [[^_mpl_apply_wrap2_<Generator,Key,Data>::type]]
+ [
+ An __Associative_Tree_Node__ model whose `traits::key_type` is the
+ same as `Key` and whose `traits::data_type` is the same as `Data`.
+ ]
+ ]
+]
+[endsect]
+
+[section Models]
+[itemized_list
+ [__binary_node_gen__]
+ [__nary_node_gen__]
+ [__associative_node_gen__]
+ [__tree_node_with_accumulation_gen__]
+ [__tree_node_with_count_gen__]
+ [__tree_node_with_height_gen__]
+ [__tree_node_with_position_gen__]
+ [__tree_node_with_red_black_flag_gen__]
+]
+[endsect]
+
+[endsect] [/ Node Type Generator]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_non_assoc_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_non_assoc_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,44 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:non_assoc_tree_node Non-Associative Tree Node]
+
+[section Description]
+Models of this concept provide access to their child nodes via iterator
+dereferencing.
+[endsect]
+
+[section Refinement of]
+__Tree_Node__
+[endsect]
+
+[section:types Associated Types]
+No additional types beyond those defined in the __Tree_Node__ concept; however,
+the requirements for the child iterator types are strengthened:
+
+[itemized_list
+ [The value type of `Node::iterator` must be `Node&`.]
+ [The value type of `Node::const_iterator` must be `Node const&`.]
+]
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+None beyond those defined in the __Tree_Node__ concept.
+[endsect]
+
+[section Models]
+[itemized_list
+ [__binary_node__]
+ [__binary_node_base__]
+ [__nary_node__]
+ [__nary_node_base__]
+]
+[endsect]
+
+[endsect] [/ Non-Associative Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_rvrsible_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_rvrsible_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,196 @@
+[/=============================================================================
+ Copyright (C) 2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:reversible_tree_node Reversible Tree Node]
+
+[section Description]
+Objects of types that model both the __Tree_Node_Iterator__ and
+__Bidirectional_Iterator__ concepts can iterate over objects of types that
+model this concept.
+[endsect]
+
+[section Refinement of]
+__Tree_Node__
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Reversible Tree Node] concept.]]
+ [[`node`][An object of type `Node&`.]]
+ [[`const_node`][An object of type `Node const&`.]]
+]
+
+[section:types Associated Types]
+Two new types are introduced.
+
+[table
+ [[Name][Expression][Description][Requirements]]
+ [
+ [Reverse iterator type]
+ [`Node::reverse_iterator`]
+ [
+ The type of iterator used to iterate in reverse through the
+ children of a `Node` object.
+ ]
+ [
+ It must model the __Bidirectional_Iterator__ concept, and it must
+ be convertible to `Node::const_reverse_iterator`.
+ ]
+ ]
+ [
+ [Immutable reverse iterator type]
+ [`Node::const_reverse_iterator`]
+ [
+ The type of iterator used to iterate in reverse through the
+ children of a `Node const` object.
+ ]
+ [
+ It must model the __Bidirectional_Iterator__ concept, and it must
+ /not/ point to a mutable object.
+ ]
+ ]
+]
+
+In addition, the requirements for the iterator types are strengthened: they
+must also model the __Bidirectional_Iterator__ concept.
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+In addition to the expressions defined in the __Tree_Node__ concept, the
+following expressions must be valid.
+
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type Requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Children reverse range begin read-only access]
+ [``
+ const_node.crbegin()
+ const_node.rbegin()
+ ``]
+ [`Node::const_reverse_iterator`]
+ [
+ Returns an iterator pointing to the beginning of the reverse range
+ of children of the tree node. If the range is empty, then the
+ iterator points past-the-end.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children reverse range begin access]
+ [`node.rbegin()`]
+ [`Node::reverse_iterator`]
+ [
+ Returns an iterator pointing to the beginning of the reverse range
+ of children of the tree node. If the range is empty, then the
+ iterator points past-the-end.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children reverse range past-the-end read-only access]
+ [``
+ const_node.crend()
+ const_node.rend()
+ ``]
+ [`Node::const_reverse_iterator`]
+ [
+ Returns an iterator pointing past the end of the reverse range of
+ children of the tree node.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children reverse range past-the-end access]
+ [`node.rend()`]
+ [`Node::reverse_iterator`]
+ [
+ Returns an iterator pointing past the end of the reverse range of
+ children of the tree node.
+ ]
+ []
+ [Constant]
+ ]
+]
+[endsect] [/ Valid Expressions and Semantics]
+
+[section Models]
+[itemized_list
+ [__binary_node__]
+ [__binary_node_base__]
+ [
+ __nary_node__ if [^_container_gen_<Selector,_nary_node_>::type] returns
+ a __Reversible_Container__ model
+ ]
+ [
+ __nary_node_base__ if [^_container_gen_<Selector,Derived>::type]
+ returns a __Reversible_Container__ model
+ ]
+ [
+ __associative_node__ if
+ [^_container_gen_<Selector,Key,_associative_node_>::type] returns a
+ __Reversible_Container__ model
+ ]
+ [
+ __associative_node_base__ if
+ [^_container_gen_<Selector,Key,Derived>::type] returns a
+ __Reversible_Container__ model
+ ]
+ [
+ __tree_node_with_accumulation__ if `BaseGenerator` returns a
+ [*Reversible Tree Node] model
+ ]
+ [
+ __tree_node_with_accumulation_base__ if `BaseGenerator` returns a
+ [*Reversible Tree Node] model
+ ]
+ [
+ __tree_node_with_count__ if `BaseGenerator` returns a [*Reversible Tree
+ Node] model
+ ]
+ [
+ __tree_node_with_count_base__ if `BaseGenerator` returns a [*Reversible
+ Tree Node] model
+ ]
+ [
+ __tree_node_with_height__ if `BaseGenerator` returns a [*Reversible
+ Tree Node] model
+ ]
+ [
+ __tree_node_with_height_base__ if `BaseGenerator` returns a
+ [*Reversible Tree Node] model
+ ]
+ [
+ __tree_node_with_position__ if `BaseGenerator` returns a [*Reversible
+ Tree Node] model
+ ]
+ [
+ __tree_node_with_position_base__ if `BaseGenerator` returns a
+ [*Reversible Tree Node] model
+ ]
+ [
+ __tree_node_with_red_black_flag__ if `BaseGenerator` returns a
+ [*Reversible Tree Node] model
+ ]
+ [
+ __tree_node_with_red_black_flag_base__ if `BaseGenerator` returns a
+ [*Reversible Tree Node] model
+ ]
+]
+[endsect]
+
+[endsect] [/ Reversible Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concept_tree_node.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concept_tree_node.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,438 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section:tree_node Tree Node]
+
+[section Description]
+All tree node implementations that this library provides model this concept:
+a structure that maintains information about its data and its immediate
+parent-child relationships. However, in practice, a full-fledged tree node
+data structure or adaptor consists of four components: a __Base_Tree_Node__
+model that defines the functionality, a __Base_Type_Generator__ that returns
+the __Base_Tree_Node__ model from which adaptor types can also inherit, a
+[*Tree Node] model that inherits from the base type and is better suited for
+external usage, and a __Node_Type_Generator__ that returns the [*Tree Node]
+model.
+[endsect]
+
+[variablelist Notation
+ [[`Node`][A type that models the [*Tree Node] concept.]]
+ [[`node`][An object of type `Node&`.]]
+ [[`const_node`][An object of type `Node const&`.]]
+ [[`alloc`][An object of type `Node::traits::allocator_reference`.]]
+ [[`Args`][The type of `args`.]]
+ [
+ [`args`]
+ [
+ Arguments to be forwarded to the appropriate
+ `Node::traits::data_type` constructor.
+ ]
+ ]
+]
+
+[section:types Associated Types]
+[table
+ [[Name][Expression][Description][Requirements]]
+ [
+ [Super type]
+ [`Node::super_t`]
+ [The type from which `Node` inherits its functionality.]
+ [
+ It must either be [^_tree_node_base_<Node>] or model the
+ __Base_Tree_Node__ concept.
+ ]
+ ]
+ [
+ [Data type]
+ [`Node::traits::data_type`]
+ [The type of user data stored in a tree node.]
+ []
+ ]
+ [
+ [Allocator type]
+ [`Node::traits::allocator`]
+ [
+ The type that defines the memory model to be used by the child
+ creation methods for creating `Node` objects.
+ ]
+ [It must be a valid __container_allocator_traits__ template argument.]
+ ]
+ [
+ [Allocator reference type]
+ [`Node::traits::allocator_reference`]
+ [
+ The type to which `alloc` will be bound if passed to the
+ emplacement constructor.
+ ]
+ [
+ It must be either `Node::traits::allocator&` or
+ `Node::traits::allocator const&`.
+ ]
+ ]
+ [
+ [Pointer type]
+ [`Node::pointer`]
+ [The type of a pointer to a `Node` object.]
+ [
+ It must model the __Trivial_Iterator__ concept, it must point to
+ a mutable object, and it must be implicitly convertible to
+ `Node::const_pointer`.
+ ]
+ ]
+ [
+ [Pointer-to-const type]
+ [`Node::const_pointer`]
+ [The type of a pointer to a `Node const` object.]
+ [
+ It must model the __Trivial_Iterator__ concept, and it must /not/
+ point to a mutable object.
+ ]
+ ]
+ [
+ [Iterator type]
+ [`Node::iterator`]
+ [
+ The type of iterator used to iterate through the children of a
+ `Node` object.
+ ]
+ [
+ It must model the __Input_Iterator__ concept, and it must be
+ convertible to `Node::const_iterator`.
+ ]
+ ]
+ [
+ [Immutable iterator type]
+ [`Node::const_iterator`]
+ [
+ The type of iterator used to iterate through the children of a
+ `Node const` object.
+ ]
+ [
+ It must model the __Input_Iterator__ concept, and it must /not/
+ point to a mutable object.
+ ]
+ ]
+ [
+ [Size type]
+ [`Node::size_type`]
+ [
+ The type of unsigned integer used to represent the number of
+ children of a `Node const` object.
+ ]
+ []
+ ]
+]
+[endsect]
+
+[section:expressions Valid Expressions and Semantics]
+[table
+ [
+ [Name]
+ [Expression]
+ [Return Type]
+ [Semantics]
+ [Type Requirements]
+ [__Runtime_Complexity__]
+ ]
+ [
+ [Emplacement constructor]
+ [``
+ Node(_boost_forward_<Args>(args)...)
+ ``]
+ []
+ [
+ Constructs a `Node` object that initializes its user data with the
+ specified arguments.
+ ]
+ [
+ The allocator type must be __Default_Constructible__, and the
+ allocator reference type must be `Node::traits::allocator const&`.
+ ]
+ []
+ ]
+ [
+ [Emplacement constructor with allocator]
+ [``
+ Node(
+ boost::container::allocator_arg
+ , alloc
+ , _boost_forward_<Args>(args)...
+ )
+ ``]
+ []
+ [
+ Constructs a `Node` object that initializes its user data with the
+ specified arguments. The new node will use the specified allocator
+ (if the allocator reference type is mutable) or a copy of it (if
+ the allocator reference type is to `const`) to construct its own
+ parent node or its own child nodes if and when invoking its
+ respective creation methods.
+ ]
+ []
+ []
+ ]
+ [
+ [Data read-only access]
+ [``
+ get<_data_key_>(const_node)
+ get(const_node, _data_key_())
+ ``]
+ [``
+ Node::traits::data_type const&
+ ``]
+ [Returns the user data stored in the tree node.]
+ []
+ [Constant]
+ ]
+ [
+ [Data access]
+ [``
+ get<_data_key_>(node)
+ get(node, _data_key_())
+ ``]
+ [``
+ Node::traits::data_type&
+ ``]
+ [Returns the user data stored in the tree node.]
+ []
+ [Constant]
+ ]
+ [
+ [Data modification]
+ [``
+ put(node, _data_key_(), data)
+ ``]
+ [``
+ void
+ ``]
+ [Sets the user data to be stored in the tree node.]
+ [The type of `data` must be convertible to `Node::traits::data_type`.]
+ [Constant]
+ ]
+ [
+ [Key-value read-only access]
+ [``
+ get<Key>(const_node)
+ get(const_node, Key())
+ ``]
+ [``
+ _result_of__at_key_<
+ Node const
+ , Key
+ >::type
+ ``]
+ [
+ Returns the value that the tree node associates with the specified
+ key.
+ ]
+ [
+ [^_result_of__has_key_<Node,Key>] must be equivalent to
+ __mpl_true__.
+ ]
+ [Constant]
+ ]
+ [
+ [Key-value access]
+ [``
+ get<Key>(node)
+ get(node, Key())
+ ``]
+ [``
+ _result_of__at_key_<
+ Node
+ , Key
+ >::type
+ ``]
+ [
+ Returns the value that the tree node associates with the specified
+ key.
+ ]
+ [
+ [^_result_of__has_key_<Node,Key>] must be equivalent to
+ __mpl_true__.
+ ]
+ [Constant]
+ ]
+ [
+ [Key-value modification]
+ [``
+ put(node, Key(), value)
+ ``]
+ [``
+ void
+ ``]
+ [
+ Sets the value to be associated with the specified key type in the
+ tree node.
+ ]
+ [
+ [^_result_of__has_key_<Node,Key>] must be equivalent to
+ __mpl_true__, and the type of `value` must be convertible to
+ [^_result_of__value_at_key_<Node,Key>::type].
+ ]
+ [Constant]
+ ]
+ [
+ [Parent read-only access]
+ [``
+ const_node.get_parent_ptr()
+ ``]
+ [``
+ Node::const_pointer
+ ``]
+ [
+ Returns a pointer to the parent of the tree node, or a null pointer
+ if the node is the root.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Parent access]
+ [``
+ node.get_parent_ptr()
+ ``]
+ [``
+ Node::pointer
+ ``]
+ [
+ Returns a pointer to the parent of the tree node, or a null pointer
+ if the node is the root.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children range begin read-only access]
+ [``
+ const_node.cbegin()
+ const_node.begin()
+ ``]
+ [``
+ Node::const_iterator
+ ``]
+ [
+ Returns an iterator pointing to the beginning of the range of
+ children of the tree node. If the range is empty, then the
+ iterator points past-the-end.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children range begin access]
+ [``
+ node.begin()
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing to the beginning of the range of
+ children of the tree node. If the range is empty, then the
+ iterator points past-the-end.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children range past-the-end read-only access]
+ [``
+ const_node.cend()
+ const_node.end()
+ ``]
+ [``
+ Node::const_iterator
+ ``]
+ [
+ Returns an iterator pointing past the end of the range of children
+ of the tree node.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children range past-the-end access]
+ [``
+ node.end()
+ ``]
+ [``
+ Node::iterator
+ ``]
+ [
+ Returns an iterator pointing past the end of the range of children
+ of the tree node.
+ ]
+ []
+ [Constant]
+ ]
+ [
+ [Children range size query]
+ [``
+ const_node.size()
+ ``]
+ [``
+ Node::size_type
+ ``]
+ [Returns the number of children of the tree node.]
+ []
+ [Linear with respect to the number of children]
+ ]
+ [
+ [Leaf node query]
+ [``
+ const_node.empty()
+ ``]
+ [``
+ bool
+ ``]
+ [
+ Equivalent to `const_node.begin() == const_node.end()`, but may
+ be more efficient in certain cases.
+ ]
+ []
+ [Linear with respect to the number of children]
+ ]
+ [
+ [Remove all descendants]
+ [``
+ node.clear()
+ ``]
+ [``
+ void
+ ``]
+ [Removes all children and their descendants from the tree node.]
+ []
+ [Linear with respect to the number of children and their descendants]
+ ]
+]
+[endsect] [/ Valid Expressions and Semantics]
+
+[section Models]
+[itemized_list
+ [__binary_node__]
+ [__binary_node_base__]
+ [__nary_node__]
+ [__nary_node_base__]
+ [__associative_node__]
+ [__associative_node_base__]
+ [__tree_node_with_accumulation__]
+ [__tree_node_with_accumulation_base__]
+ [__tree_node_with_count__]
+ [__tree_node_with_count_base__]
+ [__tree_node_with_height__]
+ [__tree_node_with_height_base__]
+ [__tree_node_with_position__]
+ [__tree_node_with_position_base__]
+ [__tree_node_with_red_black_flag__]
+ [__tree_node_with_red_black_flag_base__]
+]
+[endsect]
+
+[endsect] [/ Tree Node]
+
Added: sandbox/tree_node/libs/tree_node/doc/concepts.qbk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/concepts.qbk 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,64 @@
+[/=============================================================================
+ Copyright (C) 2011-2013 Cromwell D. Enage
+
+ 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])
+=============================================================================/]
+
+[section Concepts]
+
+[include concept_tree_node.qbk]
+[include concept_copyable_tree_node.qbk]
+[include concept_movable_tree_node.qbk]
+[include concept_base_tree_node.qbk]
+[include concept_rvrsible_tree_node.qbk]
+[include concept_assoc_tree_node.qbk]
+[include concept_non_assoc_tree_node.qbk]
+[include concept_binary_tree_node.qbk]
+[include concept_nary_tree_node.qbk]
+[include concept_node_type_generator.qbk]
+[include concept_base_type_generator.qbk]
+[include concept_iterator.qbk]
+[include concept_full_iterator.qbk]
+[include concept_descendant_iterator.qbk]
+[include concept_indexable_container.qbk]
+[include concept_indexable_iterator.qbk]
+
+[heading Core Concepts]
+
+[itemized_list
+ [__Tree_Node__
+ [itemized_list
+ [__Copyable_Tree_Node__]
+ [__Movable_Tree_Node__]
+ [__Base_Tree_Node__]
+ [__Reversible_Tree_Node__]
+ [__Associative_Tree_Node__]
+ [__Non_Associative_Tree_Node__
+ [itemized_list
+ [__Binary_Tree_Node__]
+ [__N_ary_Tree_Node__]
+ ]
+ ]
+ ]
+ ]
+ [__Node_Type_Generator__]
+ [__Base_Type_Generator__]
+ [__Tree_Node_Iterator__
+ [itemized_list
+ [__Full_Tree_Node_Iterator__]
+ [__Tree_Node_Descendant_Iterator__]
+ ]
+ ]
+]
+
+[heading Auxiliary Concepts]
+
+[itemized_list
+ [__Indexable_Container__]
+ [__Indexable_Iterator__]
+]
+
+[endsect] [/ Concepts]
+
Added: sandbox/tree_node/libs/tree_node/doc/html/index.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/index.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,70 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Chapter 1. tree_node 0.6</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="index.html" title="Chapter 1. tree_node 0.6">
+<link rel="next" href="tree_node/concepts.html" title="Concepts">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="tree_node/concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a></div>
+<div class="chapter">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="tree_node"></a>Chapter 1. tree_node 0.6</h2></div>
+<div><div class="author"><h3 class="author">
+<span class="firstname">Cromwell D.</span> <span class="surname">Enage</span>
+</h3></div></div>
+<div><p class="copyright">Copyright © 2011-2013 Cromwell D. Enage</p></div>
+<div><div class="legalnotice">
+<a name="tree_node.legal"></a><p>
+ 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)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Concepts</span></dt>
+<dt><span class="section">Reference</span></dt>
+<dt><span class="section">Changelog</span></dt>
+</dl>
+</div>
+<h3>
+<a name="tree_node.h0"></a>
+ <span class="phrase"><a name="tree_node.rationale"></a></span><a class="link" href="index.html#tree_node.rationale">Rationale</a>
+ </h3>
+<p>
+ Over the course of reimplementing a decision tree learning algorithm to use modern
+ C++ techniques, the need for a generic tree library became evident. The in-house
+ data structures in use at the time were undergoing modification as well. It was
+ found that the core operations occurred at the node level rather than at the
+ tree level, which stored only high-level algorithms. Efforts went underway to
+ retrofit these algorithms to use iterators and to further factor out generic
+ data structures from the decision tree components and other application-specific
+ utilities. This library represents the Boostified culmination of these efforts.
+ </p>
+<div class="important"><table border="0" summary="Important">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Important]" src="http://www.boost.org/doc/libs/release/doc/src/images/important.png"></td>
+<th align="left">Important</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This library depends on Boost.ContainerGen, which is not yet a part
+ of Boost. For now, you must perform a Subversion checkout from the <a href="http://svn.boost.org/" target="_top">SVN
+ Trac</a>.
+ </p></td></tr>
+</table></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: July 13, 2013 at 17:46:19 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="tree_node/concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a></div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/changelog.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/changelog.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,289 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Changelog</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="prev" href="reference/can_use_fusion_with_typeof.html" title="BOOST_TREE_NODE_CAN_USE_FUSION_WITH_TYPEOF">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference/can_use_fusion_with_typeof.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="tree_node.changelog"></a><a class="link" href="changelog.html" title="Changelog">Changelog</a>
+</h2></div></div></div>
+<h4>
+<a name="tree_node.changelog.h0"></a>
+ <span class="phrase"><a name="tree_node.changelog.from_0_5_to_0_6"></a></span><a class="link" href="changelog.html#tree_node.changelog.from_0_5_to_0_6">From
+ 0.5 to 0.6</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Renamed <code class="computeroutput"><span class="identifier">binode_container</span></code>
+ to __deque__.
+ </p></li>
+<li class="listitem"><p>
+ Removed <code class="computeroutput"><span class="identifier">cartesian_sort_range</span><span class="special">()</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ Moved the <code class="computeroutput"><span class="identifier">cartesian_sort</span><span class="special">()</span></code> algorithm to <span class="bold"><strong>Boost.Algorithm</strong></span>.
+ </p></li>
+</ul></div>
+<h4>
+<a name="tree_node.changelog.h1"></a>
+ <span class="phrase"><a name="tree_node.changelog.from_0_4_to_0_5"></a></span><a class="link" href="changelog.html#tree_node.changelog.from_0_4_to_0_5">From
+ 0.4 to 0.5</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Added the <a class="link" href="concepts/copyable_tree_node.html" title="Copyable Tree Node"><span class="bold"><strong>Copyable Tree Node</strong></span></a> and <a class="link" href="concepts/movable_tree_node.html" title="Movable Tree Node"><span class="bold"><strong>Movable Tree Node</strong></span></a> concepts.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/compare_selector.html" title="compare_selector<Key>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">compare_selector</span></code></a> template.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/null_balancer.html" title="null_balancer"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">null_balancer</span></code></a> trait struct.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/at_key.html" title="at_key<Key>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">at_key</span></code></a>
+ intrinsic function object.
+ </p></li>
+<li class="listitem"><p>
+ Added the <code class="computeroutput"><span class="identifier">cartesian_sort</span><span class="special">()</span></code> and <code class="computeroutput"><span class="identifier">cartesian_sort_range</span><span class="special">()</span></code> algorithms.
+ </p></li>
+</ul></div>
+<h4>
+<a name="tree_node.changelog.h2"></a>
+ <span class="phrase"><a name="tree_node.changelog.from_0_3_to_0_4"></a></span><a class="link" href="changelog.html#tree_node.changelog.from_0_3_to_0_4">From
+ 0.3 to 0.4</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Added the <code class="computeroutput"><span class="identifier">binode_container</span></code>,
+ <a class="link" href="reference/binode_assoc_container.html" title="binode_associative_container< NodeGenerator , T1 , T2 , IsMultipleAssociative , CompareSelector , Balancer >"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_associative_container</span></code></a>,
+ <a class="link" href="reference/binode_set.html" title="binode_set<NodeGenerator,T,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_set</span></code></a>,
+ <a class="link" href="reference/binode_multiset.html" title="binode_multiset<NodeGenerator,T,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_multiset</span></code></a>,
+ <a class="link" href="reference/binode_map.html" title="binode_map<NodeGenerator,Key,Mapped,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_map</span></code></a>,
+ and <a class="link" href="reference/binode_multimap.html" title="binode_multimap<NodeGenerator,Key,Mapped,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_multimap</span></code></a>
+ data structures.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/red_black_balancer.html" title="red_black_balancer"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">red_black_balancer</span></code></a> and <a class="link" href="reference/avl_balancer.html" title="adelson_velskii_landis_balancer"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">adelson_velskii_landis_balancer</span></code></a>
+ trait structs.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="concepts/reversible_tree_node.html" title="Reversible Tree Node"><span class="bold"><strong>Reversible Tree Node</strong></span></a>, <a class="link" href="concepts/indexable_container.html" title="Indexable Container"><span class="bold"><strong>Indexable Container</strong></span></a>, and <a class="link" href="concepts/indexable_iterator.html" title="Indexable Iterator"><span class="bold"><strong>Indexable Iterator</strong></span></a> concepts.
+ </p></li>
+<li class="listitem"><p>
+ Refined the <span class="bold"><strong>Type Generator</strong></span> concept into
+ the <a class="link" href="concepts/node_type_generator.html" title="Node Type Generator"><span class="bold"><strong>Node
+ Type Generator</strong></span></a> and <a class="link" href="concepts/base_type_generator.html" title="Base Type Generator"><span class="bold"><strong>Base Type Generator</strong></span></a> concepts.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/copyable_and_movable.html" title="BOOST_TREE_NODE_COPYABLE_AND_MOVABLE"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_COPYABLE_AND_MOVABLE</span></code></a>,
+ <a class="link" href="reference/emplace_ctor_fwd_decl.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_FWD_DECL"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_FWD_DECL</span></code></a>,
+ <a class="link" href="reference/emplace_ctor_inline_hdr.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_INLINE_HDR"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_INLINE_HEADER</span></code></a>,
+ <a class="link" href="reference/emplace_ctor_inline_def.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_INLINE_DEF"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_INLINE_DEF</span></code></a>,
+ <a class="link" href="reference/emplace_ctor_w_alloc_f_dcl.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_FWD_DECL"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_FWD_DECL</span></code></a>,
+ <a class="link" href="reference/emplace_ctor_w_alloc_i_hdr.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_HEADER"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_HEADER</span></code></a>,
+ <a class="link" href="reference/emplace_ctor_w_alloc_i_def.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_DEF"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_DEF</span></code></a>,
+ <a class="link" href="reference/can_use_fusion.html" title="BOOST_TREE_NODE_CAN_USE_FUSION"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_CAN_USE_FUSION</span></code></a>,
+ and <a class="link" href="reference/can_use_fusion_with_typeof.html" title="BOOST_TREE_NODE_CAN_USE_FUSION_WITH_TYPEOF"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_CAN_USE_FUSION_WITH_TYPEOF</span></code></a>
+ preprocessor macros.
+ </p></li>
+<li class="listitem"><p>
+ Added size type and emplacement constructor and size method expressions
+ to the <a class="link" href="concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a> concept.
+ </p></li>
+<li class="listitem"><p>
+ Added <code class="computeroutput"><span class="identifier">on_post_</span><span class="special">*</span></code>
+ and <code class="computeroutput"><span class="identifier">on_post_</span><span class="special">*</span><span class="identifier">_impl</span></code> method expressions to the <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base
+ Tree Node</strong></span></a> concept.
+ </p></li>
+<li class="listitem"><p>
+ Added iterator range and immutable iterator range types to the <a class="link" href="concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a> models are now Movable.
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a> models are no longer Equality Comparable or Less-Than Comparable.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/with_accumulation.html" title="with_accumulation<BaseGenerator,T1,T2,AccumulationKey>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_accumulation</span></code></a> adaptor class
+ template, the corresponding <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model <a class="link" href="reference/with_accumulation_base.html" title="with_accumulation_base< Derived , BaseGenerator , T1 , T2 , Key , Tag , IncludesAllDescendants , IncludesRoot , Value >"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_accumulation_base</span></code></a>, the corresponding
+ <a class="link" href="concepts/node_type_generator.html" title="Node Type Generator"><span class="bold"><strong>Node
+ Type Generator</strong></span></a> model <a class="link" href="reference/with_accumulation_gen.html" title="with_accumulation_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_accumulation_gen</span></code></a>, and the
+ corresponding <a class="link" href="concepts/base_type_generator.html" title="Base Type Generator"><span class="bold"><strong>Base Type Generator</strong></span></a> model <a class="link" href="reference/with_accumulation_base_gen.html" title="with_accumulation_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_accumulation_base_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/with_count.html" title="with_count<BaseGenerator,T1,T2,Count>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count</span></code></a> adaptor class template,
+ the corresponding <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model <a class="link" href="reference/with_count_base.html" title="with_count_base<Derived,BaseGenerator,T1,T2,Count>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count_base</span></code></a>, the corresponding
+ <a class="link" href="concepts/node_type_generator.html" title="Node Type Generator"><span class="bold"><strong>Node
+ Type Generator</strong></span></a> model <a class="link" href="reference/with_count_gen.html" title="with_count_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count_gen</span></code></a>, and the corresponding
+ <a class="link" href="concepts/base_type_generator.html" title="Base Type Generator"><span class="bold"><strong>Base
+ Type Generator</strong></span></a> model <a class="link" href="reference/with_count_base_gen.html" title="with_count_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count_base_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Renamed <code class="computeroutput"><span class="identifier">with_depth</span></code> to
+ <a class="link" href="reference/with_height.html" title="with_height<BaseGenerator,T1,T2,Height>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_height</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Renamed <code class="computeroutput"><span class="identifier">with_depth_base</span></code>
+ to <a class="link" href="reference/with_height_base.html" title="with_height_base<Derived,BaseGenerator,T1,T2,Height>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_height_base</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Renamed <code class="computeroutput"><span class="identifier">with_depth_gen</span></code>
+ to <a class="link" href="reference/with_height_gen.html" title="with_height_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_height_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="concepts/base_type_generator.html" title="Base Type Generator"><span class="bold"><strong>Base Type Generator</strong></span></a> models <a class="link" href="reference/with_count_base_gen.html" title="with_count_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count_base_gen</span></code></a>, <a class="link" href="reference/with_height_base_gen.html" title="with_height_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_height_base_gen</span></code></a>, <a class="link" href="reference/with_position_base_gen.html" title="with_position_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_position_base_gen</
span></code></a>, and <a class="link" href="reference/with_rb_flag_base_gen.html" title="with_red_black_flag_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_red_black_flag_base_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/advance_binary.html" title="advance_binary()"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">advance_binary</span><span class="special">()</span></code></a>,
+ <a class="link" href="reference/binary_index_of.html" title="binary_index_of()"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_index_of</span><span class="special">()</span></code></a>, <a class="link" href="reference/binary_descendant.html" title="binary_descendant()"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_descendant</span><span class="special">()</span></code></a>,
+ <a class="link" href="reference/binary_descendant_at_index.html" title="binary_descendant_at_index()"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_descendant_at_index</span><span class="special">()</span></code></a>,
+ <a class="link" href="reference/binary_upper_bound.html" title="binary_upper_bound()"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_upper_bound</span><span class="special">()</span></code></a>, and <a class="link" href="reference/binary_lower_bound.html" title="binary_lower_bound()"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_lower_bound</span><span class="special">()</span></code></a>
+ algorithms.
+ </p></li>
+<li class="listitem"><p>
+ Removed <code class="computeroutput"><span class="identifier">tree_node_equal</span></code>,
+ <code class="computeroutput"><span class="identifier">tree_node_strictly_equal</span></code>,
+ <code class="computeroutput"><span class="identifier">tree_node_lexicographical_compare</span></code>,
+ and <code class="computeroutput"><span class="identifier">tree_node_strict_lexicographical_compare</span></code>
+ algorithms.
+ </p></li>
+</ul></div>
+<h4>
+<a name="tree_node.changelog.h3"></a>
+ <span class="phrase"><a name="tree_node.changelog.from_0_2_to_0_3"></a></span><a class="link" href="changelog.html#tree_node.changelog.from_0_2_to_0_3">From
+ 0.2 to 0.3</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Added the <a class="link" href="concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>, <a class="link" href="concepts/non_assoc_tree_node.html" title="Non-Associative Tree Node"><span class="bold"><strong>Non-Associative Tree Node</strong></span></a>, <a class="link" href="concepts/binary_tree_node.html" title="Binary Tree Node"><span class="bold"><strong>Binary Tree Node</strong></span></a>, <a class="link" href="concepts/nary_tree_node.html" title="N-ary Tree Node"><span class="bold"><strong>N-ary Tree Node</strong></span></a>, and <span class="bold"><strong>Type
+ Generator</strong></span> concepts.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/binary_node.html" title="binary_node<T,Size,AllocatorSelector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node</span></code></a> data structure, the
+ corresponding <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model <a class="link" href="reference/binary_node_base.html" title="binary_node_base<Derived,T,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node_base</span></code></a>, and the corresponding
+ <span class="bold"><strong>Type Generator</strong></span> model <a class="link" href="reference/binary_node_gen.html" title="binary_node_gen<Size,AllocatorSelector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Renamed <code class="computeroutput"><span class="identifier">raw_node</span></code> to <a class="link" href="reference/nary_node.html" title="nary_node<T,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">nary_node</span></code></a>;
+ added the corresponding <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model <a class="link" href="reference/nary_node_base.html" title="nary_node_base<Derived,T,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">nary_node_base</span></code></a> and the corresponding
+ <span class="bold"><strong>Type Generator</strong></span> model <a class="link" href="reference/nary_node_gen.html" title="nary_node_gen<Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">nary_node_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Renamed <code class="computeroutput"><span class="identifier">raw_associative_node</span></code>
+ to <a class="link" href="reference/associative_node.html" title="associative_node<Key,Data,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node</span></code></a>;
+ added the corresponding <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model <a class="link" href="reference/associative_node_base.html" title="associative_node_base<Derived,Key,Data,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node_base</span></code></a> and the
+ corresponding <span class="bold"><strong>Type Generator</strong></span> model <a class="link" href="reference/associative_node_gen.html" title="associative_node_gen<Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base
+ Tree Node</strong></span></a> model <code class="computeroutput"><span class="identifier">with_depth_base</span></code>
+ and the corresponding <span class="bold"><strong>Type Generator</strong></span> model
+ <code class="computeroutput"><span class="identifier">with_depth_gen</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ Added <a class="link" href="reference/with_position.html" title="with_position<BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_position</span></code></a>
+ adaptor class template, the corresponding <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model <a class="link" href="reference/with_position_base.html" title="with_position_base<Derived,BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_position_base</span></code></a>, and the corresponding
+ <span class="bold"><strong>Type Generator</strong></span> model <a class="link" href="reference/with_position_gen.html" title="with_position_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_position_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/with_rb_flag.html" title="with_red_black_flag<BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_red_black_flag</span></code></a> adaptor class
+ template, the corresponding <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model <a class="link" href="reference/with_rb_flag_base.html" title="with_red_black_flag_base<Derived,BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_red_black_flag_base</span></code></a>, and
+ the corresponding <span class="bold"><strong>Type Generator</strong></span> model
+ <a class="link" href="reference/with_rb_flag_gen.html" title="with_red_black_flag_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_red_black_flag_gen</span></code></a>.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/breadth_first_desc_iter.html" title="breadth_first_descendant_iterator<Node,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">breadth_first_descendant_iterator</span></code></a>,
+ <a class="link" href="reference/pre_order_desc_iter.html" title="pre_order_descendant_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">pre_order_descendant_iterator</span></code></a>,
+ <a class="link" href="reference/post_order_desc_iter.html" title="post_order_descendant_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">post_order_descendant_iterator</span></code></a>,
+ <a class="link" href="reference/in_order_iterator.html" title="in_order_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">in_order_iterator</span></code></a>,
+ and <a class="link" href="reference/depth_first_desc_iter.html" title="depth_first_descendant_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">depth_first_descendant_iterator</span></code></a>
+ adaptor class templates.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/dereference_iterator.html" title="dereference_iterator()"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">dereference_iterator</span><span class="special">()</span></code></a>,
+ <code class="computeroutput"><span class="identifier">tree_node_equal</span></code>, <code class="computeroutput"><span class="identifier">tree_node_strictly_equal</span></code>, <code class="computeroutput"><span class="identifier">tree_node_lexicographical_compare</span></code>, and
+ <code class="computeroutput"><span class="identifier">tree_node_strict_lexicographical_compare</span></code>
+ algorithms.
+ </p></li>
+<li class="listitem"><p>
+ Removed the <span class="bold"><strong>Factory-Constructible Tree Node</strong></span>
+ and <span class="bold"><strong>Cloneable Tree Node</strong></span> concepts.
+ </p></li>
+<li class="listitem"><p>
+ Removed the <code class="computeroutput"><span class="identifier">tree_node_factory</span></code>
+ facade.
+ </p></li>
+<li class="listitem"><p>
+ Removed the <code class="computeroutput"><span class="identifier">shared_tree_node_base</span></code>
+ <code class="computeroutput"><span class="keyword">struct</span></code> template.
+ </p></li>
+<li class="listitem"><p>
+ Removed the <code class="computeroutput"><span class="identifier">simple_node</span></code>
+ and <code class="computeroutput"><span class="identifier">simple_associative_node</span></code>
+ data structures.
+ </p></li>
+<li class="listitem"><p>
+ Removed the <code class="computeroutput"><span class="identifier">with_child_range_access</span></code>
+ adaptor class template; the <a class="link" href="concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept now requires child range
+ access for all models.
+ </p></li>
+</ul></div>
+<h4>
+<a name="tree_node.changelog.h4"></a>
+ <span class="phrase"><a name="tree_node.changelog.from_0_1_to_0_2"></a></span><a class="link" href="changelog.html#tree_node.changelog.from_0_1_to_0_2">From
+ 0.1 to 0.2</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Added the <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base
+ Tree Node</strong></span></a>, <span class="bold"><strong>Factory-Constructible
+ Tree Node</strong></span>, and <span class="bold"><strong>Cloneable Tree Node</strong></span>
+ concepts.
+ </p></li>
+<li class="listitem"><p>
+ Added <code class="computeroutput"><span class="identifier">tree_node_factory</span></code>
+ facade.
+ </p></li>
+<li class="listitem"><p>
+ Added the <a class="link" href="reference/tree_node_base.html" title="tree_node_base<Derived>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">tree_node_base</span></code></a> and <code class="computeroutput"><span class="identifier">shared_tree_node_base</span></code> <code class="computeroutput"><span class="keyword">struct</span></code>
+ templates; each <a class="link" href="concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> model that is not a <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> now inherits from a corresponding
+ <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base
+ Tree Node</strong></span></a> which, in turn, inherits from one of these
+ two types.
+ </p></li>
+<li class="listitem"><p>
+ Added the <code class="computeroutput"><span class="identifier">with_child_range_access</span></code>
+ and <code class="computeroutput"><span class="identifier">with_depth</span></code> adaptor
+ class templates.
+ </p></li>
+</ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reference/can_use_fusion_with_typeof.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,123 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Concepts</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="prev" href="../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="next" href="concepts/tree_node.html" title="Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="tree_node.concepts"></a><a class="link" href="concepts.html" title="Concepts">Concepts</a>
+</h2></div></div></div>
+<h4>
+<a name="tree_node.concepts.h0"></a>
+ <span class="phrase"><a name="tree_node.concepts.core_concepts"></a></span><a class="link" href="concepts.html#tree_node.concepts.core_concepts">Core
+ Concepts</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+<p>
+ <a class="link" href="concepts/tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
+<li class="listitem"><p>
+ <a class="link" href="concepts/copyable_tree_node.html" title="Copyable Tree Node"><span class="bold"><strong>Copyable
+ Tree Node</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/movable_tree_node.html" title="Movable Tree Node"><span class="bold"><strong>Movable
+ Tree Node</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base
+ Tree Node</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/reversible_tree_node.html" title="Reversible Tree Node"><span class="bold"><strong>Reversible
+ Tree Node</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a>
+ </p></li>
+<li class="listitem">
+<p>
+ <a class="link" href="concepts/non_assoc_tree_node.html" title="Non-Associative Tree Node"><span class="bold"><strong>Non-Associative
+ Tree Node</strong></span></a>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: square; ">
+<li class="listitem"><p>
+ <a class="link" href="concepts/binary_tree_node.html" title="Binary Tree Node"><span class="bold"><strong>Binary
+ Tree Node</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/nary_tree_node.html" title="N-ary Tree Node"><span class="bold"><strong>N-ary
+ Tree Node</strong></span></a>
+ </p></li>
+</ul></div>
+</li>
+</ul></div>
+</li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/node_type_generator.html" title="Node Type Generator"><span class="bold"><strong>Node
+ Type Generator</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/base_type_generator.html" title="Base Type Generator"><span class="bold"><strong>Base
+ Type Generator</strong></span></a>
+ </p></li>
+<li class="listitem">
+<p>
+ <a class="link" href="concepts/tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree
+ Node Iterator</strong></span></a>
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: circle; ">
+<li class="listitem"><p>
+ <a class="link" href="concepts/full_tree_node_iterator.html" title="Full Tree Node Iterator"><span class="bold"><strong>Full Tree Node Iterator</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/tree_node_desc_iterator.html" title="Tree Node Descendant Iterator"><span class="bold"><strong>Tree Node Descendant Iterator</strong></span></a>
+ </p></li>
+</ul></div>
+</li>
+</ul></div>
+<h4>
+<a name="tree_node.concepts.h1"></a>
+ <span class="phrase"><a name="tree_node.concepts.auxiliary_concepts"></a></span><a class="link" href="concepts.html#tree_node.concepts.auxiliary_concepts">Auxiliary
+ Concepts</a>
+ </h4>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="concepts/indexable_container.html" title="Indexable Container"><span class="bold"><strong>Indexable
+ Container</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="concepts/indexable_iterator.html" title="Indexable Iterator"><span class="bold"><strong>Indexable
+ Iterator</strong></span></a>
+ </p></li>
+</ul></div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="concepts/tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/associative_tree_node.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/associative_tree_node.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,701 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Associative Tree Node</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="reversible_tree_node.html" title="Reversible Tree Node">
+<link rel="next" href="non_assoc_tree_node.html" title="Non-Associative Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reversible_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="non_assoc_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.associative_tree_node"></a><a class="link" href="associative_tree_node.html" title="Associative Tree Node">Associative
+ Tree Node</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.description"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Models of this concept provide key-based access to their child nodes.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.refinement_of"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Associative Tree Node</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span> <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">source</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">&&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">key</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Args</span></code></span></dt>
+<dd><p>
+ The type of <code class="computeroutput"><span class="identifier">args</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">args</span></code></span></dt>
+<dd><p>
+ Arguments to be forwarded to the appropriate <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">data_type</span></code>
+ constructor.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.types"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ Three new types are introduced.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+<th>
+ <p>
+ Requirements
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Key type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">key_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a key that a tree node will associate with a child
+ node.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator range type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">iterator_range</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of a range of child nodes and their associated keys.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model a Boost.Range concept.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Immutable iterator range type
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">const_iterator_range</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The type of an immutable view of a range of child nodes and their
+ associated keys.
+ </p>
+ </td>
+<td>
+ <p>
+ It must model a Boost.Range concept.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ In addition, the requirements for the iterator types are strengthened:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">first_type</span></code>
+ type.
+ </p></li>
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">first</span></code>
+ member variable of type <code class="computeroutput"><span class="identifier">first_type</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ Given an object <code class="computeroutput"><span class="identifier">itr</span></code>
+ of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span></code>, <code class="computeroutput"><span class="identifier">itr</span><span class="special">-></span><span class="identifier">first</span></code>
+ must be convertible to <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">second_type</span></code>
+ type.
+ </p></li>
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">second</span></code>
+ member variable of type <code class="computeroutput"><span class="identifier">second_type</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ Given an object <code class="computeroutput"><span class="identifier">itr</span></code>
+ of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span></code>, <code class="literal"><a class="link" href="../reference/dereference_iterator.html" title="dereference_iterator()">tree_node::dereference_iterator</a>(itr)</code>
+ must be convertible to <code class="computeroutput"><span class="identifier">Node</span><span class="special">&</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">first_type</span></code>
+ type.
+ </p></li>
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">first</span></code>
+ member variable of type <code class="computeroutput"><span class="identifier">first_type</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ Given an object <code class="computeroutput"><span class="identifier">itr</span></code>
+ of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span></code>, <code class="computeroutput"><span class="identifier">itr</span><span class="special">-></span><span class="identifier">first</span></code>
+ must be convertible to <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">key_type</span>
+ <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">second_type</span></code>
+ type.
+ </p></li>
+<li class="listitem"><p>
+ The value type of <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span></code>
+ must define a <code class="computeroutput"><span class="identifier">second</span></code>
+ member variable of type <code class="computeroutput"><span class="identifier">second_type</span></code>.
+ </p></li>
+<li class="listitem"><p>
+ Given an object <code class="computeroutput"><span class="identifier">itr</span></code>
+ of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span></code>, <code class="literal"><a class="link" href="../reference/dereference_iterator.html" title="dereference_iterator()">tree_node::dereference_iterator</a>(itr)</code>
+ must be convertible to <code class="computeroutput"><span class="identifier">Node</span>
+ <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.expressions"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept, the following expressions
+ must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Child creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">emplace</span><span class="special">(</span>
+ <span class="identifier">key</span>
+ <span class="special">,</span> boost::forward<span class="special"><</span><span class="identifier">Args</span><span class="special">>(</span><span class="identifier">args</span><span class="special">)...</span>
+<span class="special">);</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to the child that <code class="computeroutput"><span class="identifier">node</span></code> associates with <code class="computeroutput"><span class="identifier">key</span></code> if <code class="computeroutput"><span class="identifier">node</span></code>
+ allows only one such association to exist; otherwise, creates
+ a tree node to be associated with the specified key in the range
+ of children of the invoking node, then returns an iterator pointing
+ to the created node, which will initialize its data with the
+ specified arguments.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child copy creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">key</span><span class="special">,</span> <span class="identifier">const_node</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to the child that <code class="computeroutput"><span class="identifier">node</span></code> associates with <code class="computeroutput"><span class="identifier">key</span></code> if <code class="computeroutput"><span class="identifier">node</span></code>
+ allows only one such association to exist; otherwise, creates
+ a deep copy of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ to be associated with the specified key in the range of children
+ of the invoking node, then returns an iterator pointing to the
+ created node.
+ </p>
+ </td>
+<td>
+ <p>
+ The data type must model the Copy Constructible and Movable
+ concepts.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child move insertion
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">key</span><span class="special">,</span> <span class="identifier">source</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to the child that <code class="computeroutput"><span class="identifier">node</span></code> associates with <code class="computeroutput"><span class="identifier">key</span></code> if <code class="computeroutput"><span class="identifier">node</span></code>
+ allows only one such association to exist; otherwise, move-constructs
+ a copy of <code class="computeroutput"><span class="identifier">source</span></code>
+ to be associated with the specified key in the range of children
+ of the invoking node, then returns an iterator pointing to the
+ created node.
+ </p>
+ </td>
+<td>
+ <p>
+ The data type must model the Movable concept.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children of <code class="computeroutput"><span class="identifier">source</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child read-only search
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">find</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the specified key, or <code class="computeroutput"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code> if no such child exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">find</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the specified key, or <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code> if no such child exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child read-only search lower bound
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the lowest key not less than the specified key, or <code class="computeroutput"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code>
+ if no such child exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search lower bound
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">lower_bound</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the lowest key not less than the specified key, or <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code>
+ if no such child exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child read-only search upper bound
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the lowest key that is strictly greater than the specified key,
+ or <code class="computeroutput"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code> if no such child exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search upper bound
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">upper_bound</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns an iterator pointing to a child node associated with
+ the lowest key that is strictly greater than the specified key,
+ or <code class="computeroutput"><span class="identifier">node</span><span class="special">.</span><span class="identifier">end</span><span class="special">()</span></code>
+ if no such child exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child read-only search range
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">const_iterator_range</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns a Boost.Range of all child nodes
+ associated with the specified key. The child nodes in the range
+ returned cannot be modified. If no such children exist, then
+ the range will be empty.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Child search range
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">equal_range</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">iterator_range</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns a Boost.Range of all child nodes
+ associated with the specified key. The child nodes in the range
+ returned can be modified. If no such children exist, then the
+ range will be empty.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Logarithmic
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove children
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">erase</span><span class="special">(</span><span class="identifier">key</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">size_type</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Removes all child nodes associated with the specified key from
+ the tree node. Returns the number of children removed.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children and their descendants
+ in the range to be removed, plus logarithmic
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.associative_tree_node.models"></a><a class="link" href="associative_tree_node.html#tree_node.concepts.associative_tree_node.models" title="Models">Models</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="../reference/associative_node.html" title="associative_node<Key,Data,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/associative_node_base.html" title="associative_node_base<Derived,Key,Data,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node_base</span></code></a>
+ </p></li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="reversible_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="non_assoc_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/base_tree_node.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/base_tree_node.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,953 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Base Tree Node</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="movable_tree_node.html" title="Movable Tree Node">
+<link rel="next" href="reversible_tree_node.html" title="Reversible Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="movable_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reversible_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.base_tree_node"></a><a class="link" href="base_tree_node.html" title="Base Tree Node">Base Tree Node</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_tree_node.description"></a><a class="link" href="base_tree_node.html#tree_node.concepts.base_tree_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Models of this concept allow the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> adaptor types to parameterically
+ inherit their functionality for greater reuse.
+ </p>
+<p>
+ In practice, each <span class="bold"><strong>Base Tree Node</strong></span> model
+ must do the following:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Inherit from either <a class="link" href="../reference/tree_node_base.html" title="tree_node_base<Derived>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">tree_node_base</span></code></a> or the return
+ type of a <a class="link" href="base_type_generator.html" title="Base Type Generator"><span class="bold"><strong>Base Type Generator</strong></span></a>.
+ </p></li>
+<li class="listitem"><p>
+ Take in the derived type and the data type as template parameters.
+ </p></li>
+<li class="listitem"><p>
+ Also take in the key type if the derived type is (possibly) an <a class="link" href="associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative
+ Tree Node</strong></span></a> model.
+ </p></li>
+<li class="listitem"><p>
+ Declare a template instantiation of <a class="link" href="../reference/tree_node_base.html" title="tree_node_base<Derived>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">tree_node_base</span></code></a> with the derived
+ type as a <code class="computeroutput"><span class="keyword">friend</span> <span class="keyword">struct</span></code>
+ if it overrides any of <a class="link" href="../reference/tree_node_base.html" title="tree_node_base<Derived>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">tree_node_base</span></code></a> implementation
+ methods.
+ </p></li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_tree_node.refinement_of"></a><a class="link" href="base_tree_node.html#tree_node.concepts.base_tree_node.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Base</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Base Tree Node</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">base</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Base</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_base</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Base</span> <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a> model that inherits from <code class="computeroutput"><span class="identifier">Base</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">copy</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span> <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">source</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">&&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">alloc</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">allocator_reference</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">itr</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">BIC</span></code></span></dt>
+<dd><p>
+ A type that models the Boolean Integral Constant concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">bic</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">BIC</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_tree_node.types"></a><a class="link" href="base_tree_node.html#tree_node.concepts.base_tree_node.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_tree_node.expressions"></a><a class="link" href="base_tree_node.html#tree_node.concepts.base_tree_node.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> concept, the following expressions
+ must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Derived access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">get_derived</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a pointer to the same <code class="computeroutput"><span class="identifier">Node</span></code>
+ object.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Derived read-only access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">const_base</span><span class="special">.</span><span class="identifier">get_derived</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a pointer to the same immutable <code class="computeroutput"><span class="identifier">Node</span></code>
+ object.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<p>
+ Also, the following expressions must be valid (unless the <code class="computeroutput"><span class="identifier">Node</span></code> type does <span class="emphasis"><em>not</em></span>
+ define the operation within which the expression can be invoked).
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Derived copy constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Base</span><span class="special">(</span><span class="identifier">copy</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs a deep copy of the specified node.
+ </p>
+ </td>
+<td>
+ <p>
+ The initializer list of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ copy constructor must be able to call this constructor.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Derived copy constructor with allocator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Base</span><span class="special">(</span><span class="identifier">copy</span><span class="special">,</span>
+ <span class="identifier">alloc</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs a deep copy of the specified node. The new node will
+ use the specified allocator (if the allocator reference type
+ is mutable) or a copy of it (if the allocator reference type
+ is to <code class="computeroutput"><span class="keyword">const</span></code>) to
+ construct its own parent node or its own child nodes if and when
+ invoking its respective creation methods.
+ </p>
+ </td>
+<td>
+ <p>
+ The initializer list of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ copy constructor with allocator must be able to call this constructor.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Derived move constructor
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Base</span><span class="special">(</span><span class="identifier">source</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Transfers the contents of the specified node to this one.
+ </p>
+ </td>
+<td>
+ <p>
+ The initializer list of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ move constructor must be able to call this constructor.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Derived move constructor with allocator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Base</span><span class="special">(</span><span class="identifier">source</span><span class="special">,</span>
+ <span class="identifier">alloc</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Transfers the contents of the specified node to this one. The
+ new node will use the specified allocator (if the allocator reference
+ type is mutable) or a copy of it (if the allocator reference
+ type is to <code class="computeroutput"><span class="keyword">const</span></code>)
+ to construct its own parent node or its own child nodes if and
+ when invoking its respective creation methods.
+ </p>
+ </td>
+<td>
+ <p>
+ The initializer list of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ move constructor with allocator must be able to call this constructor.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Base descendant cloning
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">clone_descendants</span><span class="special">(</span><span class="identifier">copy</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Structurally modifies the invoking node so that it is a deep
+ copy of the specified node.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ copy constructor must be able to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Base descendant movement
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">move_descendants</span><span class="special">(</span><span class="identifier">source</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Structurally modifies the invoking node so that it stores the
+ contents of the specified node.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ move constructor must be able to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Base copy assignment
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">copy_assign</span><span class="special">(</span><span class="identifier">copy</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Structurally modifies the invoking node so that it is a deep
+ copy of the specified node.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ copy assignment operator must be able to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Base move assignment
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">move_assign</span><span class="special">(</span><span class="identifier">source</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Structurally modifies the invoking node so that it stores the
+ contents of the specified node.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ move assignment operator must be able to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Assignment notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_assign</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by <code class="computeroutput"><span class="identifier">Base</span></code>
+ copy or move assignment. In practice, propagates <code class="computeroutput"><span class="identifier">Base</span></code>-specific values affected
+ by the assignment up the tree node's chain of ancestors.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ copy or move assignment operator must be able to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of ancestors
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Key-value modified notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_modify_value</span><span class="special">(</span><span class="identifier">Key</span><span class="special">())</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that modify the value that
+ the tree node associates with the specified key.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span></code>
+ key-value modification function must be able to call this method,
+ and <code class="literal"><a class="link" href="../reference/has_key.html#tree_node.reference.has_key.result_of" title="Return Type Metafunction Synopsis">tree_node::result_of::has_key</a><Node,Key></code>
+ must be equivalent to boost::mpl::true_
.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of ancestors
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Key-value propagated notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_propagate_value</span><span class="special">(</span><span class="identifier">Key</span><span class="special">())</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that propagate the value
+ that the tree node associates with the specified key up the tree
+ node's chain of ancestors.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal"><a class="link" href="../reference/has_key.html#tree_node.reference.has_key.result_of" title="Return Type Metafunction Synopsis">tree_node::result_of::has_key</a><Node,Key></code>
+ must be equivalent to boost::mpl::true_
.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of ancestors
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Key-value once-propagated notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_propagate_value_once</span><span class="special">(</span><span class="identifier">Key</span><span class="special">())</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that propagate the value
+ that the tree node associates with the specified key up to the
+ tree node's parent.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal"><a class="link" href="../reference/has_key.html#tree_node.reference.has_key.result_of" title="Return Type Metafunction Synopsis">tree_node::result_of::has_key</a><Node,Key></code>
+ must be equivalent to boost::mpl::true_
.
+ </p>
+ </td>
+<td>
+ <p>
+ Constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Insertion notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_inserted</span><span class="special">(</span><span class="identifier">itr</span><span class="special">,</span>
+ <span class="identifier">bic</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that insert or emplace
+ the invoking node. The specified iterator points to this node.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of any <code class="computeroutput"><span class="identifier">Node</span></code>
+ insertion or emplacement member function must be able to call
+ this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant if <code class="computeroutput"><span class="identifier">BIC</span><span class="special">::</span><span class="identifier">value</span>
+ <span class="special">==</span> <span class="keyword">true</span></code>,
+ linear with respect to the number of siblings otherwise
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Range insertion notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_insert</span><span class="special">(</span><span class="identifier">itr</span><span class="special">,</span>
+ <span class="identifier">itr_end</span><span class="special">,</span>
+ <span class="identifier">bic</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that insert or emplace
+ the nodes in the specified range.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of any <code class="computeroutput"><span class="identifier">Node</span></code>
+ insertion or emplacement member function must be able to call
+ this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Amortized constant if <code class="computeroutput"><span class="identifier">BIC</span><span class="special">::</span><span class="identifier">value</span>
+ <span class="special">==</span> <span class="keyword">true</span></code>,
+ linear with respect to the number of siblings otherwise
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Erasure notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_erase</span><span class="special">(</span><span class="identifier">bic</span><span class="special">)</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that remove the specified
+ children and their descendants from a node.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of any <code class="computeroutput"><span class="identifier">Node</span></code>
+ erasure member function must be able to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children plus the number
+ of ancestors
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Clear notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_clear</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that remove all descendants
+ from a node.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">clear</span><span class="special">()</span></code> member function must be able
+ to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of children removed plus the
+ number of ancestors
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Left rotation notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_rotate_left</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that rotate a node to the
+ left.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">rotate_left</span><span class="special">()</span></code> member function must be able
+ to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of ancestors
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Right rotation notification
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">base</span><span class="special">.</span><span class="identifier">on_post_rotate_right</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Updates any <code class="computeroutput"><span class="identifier">Node</span></code>-specific
+ information invalidated by operations that rotate a node to the
+ right.
+ </p>
+ </td>
+<td>
+ <p>
+ The body of the <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">rotate_right</span><span class="special">()</span></code> member function must be able
+ to call this method.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of ancestors
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_tree_node.models"></a><a class="link" href="base_tree_node.html#tree_node.concepts.base_tree_node.models" title="Models">Models</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="../reference/binary_node_base.html" title="binary_node_base<Derived,T,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node_base</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/nary_node_base.html" title="nary_node_base<Derived,T,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">nary_node_base</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/associative_node_base.html" title="associative_node_base<Derived,Key,Data,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node_base</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_accumulation_base.html" title="with_accumulation_base< Derived , BaseGenerator , T1 , T2 , Key , Tag , IncludesAllDescendants , IncludesRoot , Value >"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_accumulation_base</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_count_base.html" title="with_count_base<Derived,BaseGenerator,T1,T2,Count>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count_base</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_height_base.html" title="with_height_base<Derived,BaseGenerator,T1,T2,Height>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_height_base</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_position_base.html" title="with_position_base<Derived,BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_position_base</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_rb_flag_base.html" title="with_red_black_flag_base<Derived,BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_red_black_flag_base</span></code></a>
+ </p></li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="movable_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reversible_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/base_type_generator.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/base_type_generator.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,169 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Base Type Generator</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="node_type_generator.html" title="Node Type Generator">
+<link rel="next" href="tree_node_iterator.html" title="Tree Node Iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="node_type_generator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.base_type_generator"></a><a class="link" href="base_type_generator.html" title="Base Type Generator">Base Type Generator</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_type_generator.description"></a><a class="link" href="base_type_generator.html#tree_node.concepts.base_type_generator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ A <span class="bold"><strong>Base Type Generator</strong></span> is a Metafunction Class that returns a <a class="link" href="base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base
+ Tree Node</strong></span></a> from which <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> adaptor types can inherit the necessary
+ functionality.
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Generator</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Base Type Generator</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Derived</span></code></span></dt>
+<dd><p>
+ The most descendant type that will inherit from the return type of
+ <code class="computeroutput"><span class="identifier">Generator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Key</span></code></span></dt>
+<dd><p>
+ The key type of the <a class="link" href="associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> to be returned.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Data</span></code></span></dt>
+<dd><p>
+ The data type of the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> to be returned.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_type_generator.expressions"></a><a class="link" href="base_type_generator.html#tree_node.concepts.base_type_generator.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Non-associative invocation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">boost::mpl::apply_wrap2<Generator,Derived,Data>::type</code>
+ </p>
+ </td>
+<td>
+ <p>
+ A <a class="link" href="non_assoc_tree_node.html" title="Non-Associative Tree Node"><span class="bold"><strong>Non-Associative Tree Node</strong></span></a> model
+ whose <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">data_type</span></code>
+ is the same as <code class="computeroutput"><span class="identifier">Data</span></code>.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Associative invocation
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="literal">boost::mpl::apply_wrap3<Generator,Derived,Key,Data>::type</code>
+ </p>
+ </td>
+<td>
+ <p>
+ An <a class="link" href="associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> model whose
+ <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">key_type</span></code> is the same as <code class="computeroutput"><span class="identifier">Key</span></code> and whose <code class="computeroutput"><span class="identifier">traits</span><span class="special">::</span><span class="identifier">data_type</span></code> is the same as <code class="computeroutput"><span class="identifier">Data</span></code>.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.base_type_generator.models"></a><a class="link" href="base_type_generator.html#tree_node.concepts.base_type_generator.models" title="Models">Models</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="../reference/binary_node_base_gen.html" title="binary_node_base_gen<Size,AllocatorSelector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node_base_gen</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/nary_node_base_gen.html" title="nary_node_base_gen<Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">nary_node_base_gen</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/assoc_node_base_gen.html" title="associative_node_base_gen<Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node_base_gen</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_accumulation_base_gen.html" title="with_accumulation_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_accumulation_base_gen</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_count_base_gen.html" title="with_count_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count_base_gen</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_height_base_gen.html" title="with_height_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_height_base_gen</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_position_base_gen.html" title="with_position_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_position_base_gen</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_rb_flag_base_gen.html" title="with_red_black_flag_base_gen<BaseGenerator>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_red_black_flag_base_gen</span></code></a>
+ </p></li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="node_type_generator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/binary_tree_node.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/binary_tree_node.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,617 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Binary Tree Node</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="non_assoc_tree_node.html" title="Non-Associative Tree Node">
+<link rel="next" href="nary_tree_node.html" title="N-ary Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="non_assoc_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nary_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.binary_tree_node"></a><a class="link" href="binary_tree_node.html" title="Binary Tree Node">Binary Tree Node</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.binary_tree_node.description"></a><a class="link" href="binary_tree_node.html#tree_node.concepts.binary_tree_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Models of this concept store at most two child nodes: left and right. The
+ operations that this concept defines include access to these children and
+ rotations that use the appropriate child as a pivot node.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.binary_tree_node.refinement_of"></a><a class="link" href="binary_tree_node.html#tree_node.concepts.binary_tree_node.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="non_assoc_tree_node.html" title="Non-Associative Tree Node"><span class="bold"><strong>Non-Associative
+ Tree Node</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="reversible_tree_node.html" title="Reversible Tree Node"><span class="bold"><strong>Reversible
+ Tree Node</strong></span></a>
+ </p></li>
+</ul></div>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Binary Tree Node</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span> <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">rvalue_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">&&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Args</span></code></span></dt>
+<dd><p>
+ The type of <code class="computeroutput"><span class="identifier">args</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">args</span></code></span></dt>
+<dd><p>
+ Arguments to be forwarded to the appropriate <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">data_type</span></code>
+ constructor.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.binary_tree_node.types"></a><a class="link" href="binary_tree_node.html#tree_node.concepts.binary_tree_node.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the <a class="link" href="non_assoc_tree_node.html" title="Non-Associative Tree Node"><span class="bold"><strong>Non-Associative Tree Node</strong></span></a> and <a class="link" href="reversible_tree_node.html" title="Reversible Tree Node"><span class="bold"><strong>Reversible Tree Node</strong></span></a> concepts.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.binary_tree_node.expressions"></a><a class="link" href="binary_tree_node.html#tree_node.concepts.binary_tree_node.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the <a class="link" href="non_assoc_tree_node.html" title="Non-Associative Tree Node"><span class="bold"><strong>Non-Associative Tree Node</strong></span></a> and <a class="link" href="reversible_tree_node.html" title="Reversible Tree Node"><span class="bold"><strong>Reversible Tree Node</strong></span></a> concepts, the following
+ expressions must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Parent-of-left creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">emplace_parent_of_left</span><span class="special">(</span>
+ boost::forward<span class="special"><</span><span class="identifier">Args</span><span class="special">>(</span><span class="identifier">args</span><span class="special">)...</span>
+<span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be stored as the parent of
+ the invoking node. The node returned will initialize its data
+ with the specified arguments. The invoking node will become the
+ left child of the new node.
+ </p>
+ <p>
+ If a parent existed previously, that node shall become the parent
+ of the new node, and the new node shall take the place of the
+ invoking node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Parent-of-right creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">emplace_parent_of_right</span><span class="special">(</span>
+ boost::forward<span class="special"><</span><span class="identifier">Args</span><span class="special">>(</span><span class="identifier">args</span><span class="special">)...</span>
+<span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be stored as the parent of
+ the invoking node. The node returned will initialize its data
+ with the specified arguments. The invoking node will become the
+ right child of the new node.
+ </p>
+ <p>
+ If a parent existed previously, that node shall become the parent
+ of the new node, and the new node shall take the place of the
+ invoking node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Left child creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">emplace_left</span><span class="special">(</span>
+ boost::forward<span class="special"><</span><span class="identifier">Args</span><span class="special">>(</span><span class="identifier">args</span><span class="special">)...</span>
+<span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be stored as the left child
+ of the invoking node. The node returned will initialize its data
+ with the specified arguments.
+ </p>
+ <p>
+ If a left child existed previously, that node shall become the
+ left child of the new node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Left child copy creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">insert_left</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Creates and returns a deep copy of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ to be stored as the left child of the invoking node.
+ </p>
+ <p>
+ If a left child existed previously, that node shall become the
+ left-most descendant of the new node, or the first node encountered
+ during a forward in-order traversal of the new node's descendants.
+ </p>
+ </td>
+<td>
+ <p>
+ The data type must model the Copy Constructible and Movable
+ concepts.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Right child creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">emplace_right</span><span class="special">(</span>
+ boost::forward<span class="special"><</span><span class="identifier">Args</span><span class="special">>(</span><span class="identifier">args</span><span class="special">)...</span>
+<span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Creates and returns a tree node to be stored as the right child
+ of the invoking node. The node returned will initialize its data
+ with the specified arguments.
+ </p>
+ <p>
+ If a right child existed previously, that node shall become the
+ right child of the new node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Right child copy creation
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">insert_right</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">iterator</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Creates and returns a deep copy of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ to be stored as the right child of the invoking node.
+ </p>
+ <p>
+ If a right child existed previously, that node shall become the
+ right-most descendant of the new node, or the last node encountered
+ during a forward in-order traversal of the new node's descendants.
+ </p>
+ </td>
+<td>
+ <p>
+ The data type must model the Copy Constructible and Movable
+ concepts.
+ </p>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants of <code class="computeroutput"><span class="identifier">const_node</span></code>
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Left child read-only access
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">get_left_child_ptr</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns the left child of the tree node, or a null pointer if
+ no such tree node exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Left child access
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">get_left_child_ptr</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns the left child of the tree node, or a null pointer if
+ no such tree node exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Right child read-only access
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">const_node</span><span class="special">.</span><span class="identifier">get_right_child_ptr</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">const_pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns the right child of the tree node, or a null pointer if
+ no such tree node exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Right child access
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">get_right_child_ptr</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Returns the right child of the tree node, or a null pointer if
+ no such tree node exists.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Rotate left
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">rotate_left</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Rotates the tree node in its hierarchy so that its right child,
+ the pivot node, becomes its parent. The left child of the pivot
+ node becomes the right child of the tree node. Returns the pivot
+ node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Rotate right
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">rotate_right</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">pointer</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Rotates the tree node in its hierarchy so that its left child,
+ the pivot node, becomes its parent. The right child of the pivot
+ node becomes the left child of the tree node. Returns the pivot
+ node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Amortized constant
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove left child
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">erase_left</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="keyword">void</span>
+</pre>
+ </td>
+<td>
+ <p>
+ Removes the left child from the tree node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants of the left
+ child
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Remove right child
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">node</span><span class="special">.</span><span class="identifier">erase_right</span><span class="special">()</span>
+</pre>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">void</span> </code>`
+ </p>
+ </td>
+<td>
+ <p>
+ Removes the right child from the tree node.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Linear with respect to the number of descendants of the right
+ child
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.binary_tree_node.models"></a><a class="link" href="binary_tree_node.html#tree_node.concepts.binary_tree_node.models" title="Models">Models</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="../reference/binary_node.html" title="binary_node<T,Size,AllocatorSelector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/binary_node_base.html" title="binary_node_base<Derived,T,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node_base</span></code></a>
+ </p></li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="non_assoc_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nary_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/copyable_tree_node.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/copyable_tree_node.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,272 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Copyable Tree Node</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="tree_node.html" title="Tree Node">
+<link rel="next" href="movable_tree_node.html" title="Movable Tree Node">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="movable_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.copyable_tree_node"></a><a class="link" href="copyable_tree_node.html" title="Copyable Tree Node">Copyable Tree
+ Node</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.copyable_tree_node.description"></a><a class="link" href="copyable_tree_node.html#tree_node.concepts.copyable_tree_node.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ Models of this concept are meant for external usage by applications or
+ by other data structures.
+ </p>
+<p>
+ In practice, each <span class="bold"><strong>Copyable Tree Node</strong></span> model
+ must do the following:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Inherit from the corresponding <a class="link" href="base_tree_node.html" title="Base Tree Node"><span class="bold"><strong>Base Tree Node</strong></span></a> model.
+ </p></li>
+<li class="listitem"><p>
+ Take in the data type as template parameters.
+ </p></li>
+<li class="listitem"><p>
+ Also take in the key type if (possibly) modeling the <a class="link" href="associative_tree_node.html" title="Associative Tree Node"><span class="bold"><strong>Associative Tree Node</strong></span></a> concept.
+ </p></li>
+<li class="listitem"><p>
+ Use the <a class="link" href="../reference/copyable_and_movable.html" title="BOOST_TREE_NODE_COPYABLE_AND_MOVABLE"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_COPYABLE_AND_MOVABLE</span></code></a>,
+ <a class="link" href="../reference/emplace_ctor_inline_def.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_INLINE_DEF"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_INLINE_DEF</span></code></a>,
+ and <a class="link" href="../reference/emplace_ctor_w_alloc_i_def.html" title="BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_DEF"><code class="computeroutput"><span class="identifier">BOOST_TREE_NODE_EMPLACEMENT_CTOR_W_ALLOC_INLINE_DEF</span></code></a>
+ macros to support C++03 compilers.
+ </p></li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.copyable_tree_node.refinement_of"></a><a class="link" href="copyable_tree_node.html#tree_node.concepts.copyable_tree_node.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree
+ Node</strong></span></a>
+ </p></li>
+<li class="listitem"><p>
+ <a href="http://www.boost.org/libs/utility/CopyConstructible.html" target="_top"><span class="bold"><strong>Copy
+ Constructible</strong></span></a>
+ </p></li>
+</ul></div>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Copyable Tree Node</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">const_node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span> <span class="keyword">const</span><span class="special">&</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">alloc</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">allocator_reference</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.copyable_tree_node.types"></a><a class="link" href="copyable_tree_node.html#tree_node.concepts.copyable_tree_node.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> and Copy Constructible concepts.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.copyable_tree_node.expressions"></a><a class="link" href="copyable_tree_node.html#tree_node.concepts.copyable_tree_node.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a> and Copy Constructible concepts, the following
+ expressions must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Copy constructor
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">(</span><span class="identifier">const_node</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs a deep copy of the specified node.
+ </p>
+ </td>
+<td>
+ <p>
+ The data type must be Copy Constructible, the boost::container::allocator_traits
+ static method <code class="computeroutput"><span class="identifier">select_on_container_copy_construction</span></code>
+ must be callable when passed in the allocator of the specified
+ node, and the allocator reference type must be <code class="computeroutput"><span class="identifier">Node</span><span class="special">::</span><span class="identifier">traits</span><span class="special">::</span><span class="identifier">allocator</span> <span class="keyword">const</span><span class="special">&</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Copy constructor with allocator
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Node</span><span class="special">(</span>
+ <span class="identifier">boost</span><span class="special">::</span><span class="identifier">container</span><span class="special">::</span><span class="identifier">allocator_arg</span>
+ <span class="special">,</span> <span class="identifier">alloc</span>
+ <span class="special">,</span> <span class="identifier">const_node</span>
+<span class="special">)</span>
+</pre>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs a deep copy of the specified node. The new node will
+ use the specified allocator (if the allocator reference type
+ is mutable) or a copy of it (if the allocator reference type
+ is to <code class="computeroutput"><span class="keyword">const</span></code>) to
+ construct its own parent node or its own child nodes if and when
+ invoking its respective creation methods.
+ </p>
+ </td>
+<td>
+ <p>
+ The data type must be Copy Constructible.
+ </p>
+ </td>
+<td>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.copyable_tree_node.models"></a><a class="link" href="copyable_tree_node.html#tree_node.concepts.copyable_tree_node.models" title="Models">Models</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="../reference/binary_node.html" title="binary_node<T,Size,AllocatorSelector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binary_node</span></code></a>
+ if <code class="computeroutput"><span class="identifier">T</span></code> is Copy Constructible
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/nary_node.html" title="nary_node<T,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">nary_node</span></code></a>
+ if <code class="computeroutput"><span class="identifier">T</span></code> is Copy Constructible
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/associative_node.html" title="associative_node<Key,Data,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">associative_node</span></code></a> if <code class="computeroutput"><span class="identifier">Data</span></code> is Copy Constructible
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_accumulation.html" title="with_accumulation<BaseGenerator,T1,T2,AccumulationKey>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_accumulation</span></code></a> if <code class="computeroutput"><span class="identifier">BaseGenerator</span></code> returns a <span class="bold"><strong>Copyable Tree Node</strong></span> model
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_count.html" title="with_count<BaseGenerator,T1,T2,Count>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_count</span></code></a>
+ if <code class="computeroutput"><span class="identifier">BaseGenerator</span></code> returns
+ a <span class="bold"><strong>Copyable Tree Node</strong></span> model
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_height.html" title="with_height<BaseGenerator,T1,T2,Height>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_height</span></code></a>
+ if <code class="computeroutput"><span class="identifier">BaseGenerator</span></code> returns
+ a <span class="bold"><strong>Copyable Tree Node</strong></span> model
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_position.html" title="with_position<BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_position</span></code></a>
+ if <code class="computeroutput"><span class="identifier">BaseGenerator</span></code> returns
+ a <span class="bold"><strong>Copyable Tree Node</strong></span> model
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/with_rb_flag.html" title="with_red_black_flag<BaseGenerator,T1,T2>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">with_red_black_flag</span></code></a>
+ if <code class="computeroutput"><span class="identifier">BaseGenerator</span></code> returns
+ a <span class="bold"><strong>Copyable Tree Node</strong></span> model
+ </p></li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="movable_tree_node.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/full_tree_node_iterator.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/full_tree_node_iterator.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,172 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Full Tree Node Iterator</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="tree_node_iterator.html" title="Tree Node Iterator">
+<link rel="next" href="tree_node_desc_iterator.html" title="Tree Node Descendant Iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_desc_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator"></a><a class="link" href="full_tree_node_iterator.html" title="Full Tree Node Iterator">Full Tree
+ Node Iterator</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.description"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ This concept specifies the requirement that models traverse the root node
+ as well as its descendants.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.refinement_of"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree
+ Node Iterator</strong></span></a>
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Iterator</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Full Tree Node Iterator</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">itr</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Node</span></code></span></dt>
+<dd><p>
+ The value type of <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">node</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Node</span><span class="special">&</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.types"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept; however, the
+ requirements for the value type are strengthened: it must model the <a class="link" href="tree_node.html" title="Tree Node"><span class="bold"><strong>Tree Node</strong></span></a>
+ concept.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.expressions"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ None beyond those defined in the <a class="link" href="tree_node_iterator.html" title="Tree Node Iterator"><span class="bold"><strong>Tree Node Iterator</strong></span></a> concept; however, the
+ type requirements for the constructors are strengthened, and their semantics
+ are clarified.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Type requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ Constructor from node
+ </p>
+ </td>
+<td>
+<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"><span class="identifier">Iterator</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+<span class="identifier">Iterator</span> <span class="identifier">itr</span><span class="special">(</span><span class="identifier">node</span><span class="special">)</span>
+</pre>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Constructs an iterator that will iterate through the specified
+ node and its descendants.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.full_tree_node_iterator.models"></a><a class="link" href="full_tree_node_iterator.html#tree_node.concepts.full_tree_node_iterator.models" title="Models">Models</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ <a class="link" href="../reference/breadth_first_iterator.html" title="breadth_first_iterator<Node,Selector>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">breadth_first_iterator</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/pre_order_iterator.html" title="pre_order_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">pre_order_iterator</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/post_order_iterator.html" title="post_order_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">post_order_iterator</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/in_order_iterator.html" title="in_order_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">in_order_iterator</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/depth_first_iterator.html" title="depth_first_iterator<Node,IsReverse>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">depth_first_iterator</span></code></a>
+ </p></li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tree_node_desc_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/indexable_container.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/indexable_container.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,221 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Indexable Container</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="tree_node_desc_iterator.html" title="Tree Node Descendant Iterator">
+<link rel="next" href="indexable_iterator.html" title="Indexable Iterator">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node_desc_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="indexable_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.indexable_container"></a><a class="link" href="indexable_container.html" title="Indexable Container">Indexable Container</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_container.description"></a><a class="link" href="indexable_container.html#tree_node.concepts.indexable_container.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ An <span class="bold"><strong>Indexable Container</strong></span> is a Reversible Container whose iterator type
+ is an <a class="link" href="indexable_iterator.html" title="Indexable Iterator"><span class="bold"><strong>Indexable
+ Iterator</strong></span></a>. It provides sub-linear time access to arbitrary
+ elements.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_container.refinement_of"></a><a class="link" href="indexable_container.html#tree_node.concepts.indexable_container.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<p>
+ Reversible Container
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_container.types"></a><a class="link" href="indexable_container.html#tree_node.concepts.indexable_container.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ None beyond those defined in Reversible Container. However, the requirements
+ for the iterator type are strengthened: it must be an <a class="link" href="indexable_iterator.html" title="Indexable Iterator"><span class="bold"><strong>Indexable Iterator</strong></span></a>.
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">X</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Indexable Container</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">a</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">X</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_container.expressions"></a><a class="link" href="indexable_container.html#tree_node.concepts.indexable_container.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the Reversible Container concept, the following
+ expressions must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Type Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Precondition
+ </p>
+ </th>
+<th>
+ <p>
+ Invariant
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ Element access
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">a</span><span class="special">[</span><span class="identifier">n</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">reference</span></code> if
+ <code class="computeroutput"><span class="identifier">a</span></code> is mutable,
+ <code class="computeroutput"><span class="identifier">const_reference</span></code>
+ otherwise
+ </p>
+ </td>
+<td>
+ <p>
+ Returns the <code class="computeroutput"><span class="identifier">n</span></code>th
+ element from the beginning of the container.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">n</span></code> must be convertible
+ to <code class="computeroutput"><span class="identifier">size_type</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="number">0</span> <span class="special"><</span>
+ <span class="identifier">n</span> <span class="special"><=</span>
+ <span class="identifier">a</span><span class="special">.</span><span class="identifier">size</span><span class="special">()</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="special">*(</span><span class="identifier">a</span><span class="special">.</span><span class="identifier">begin</span><span class="special">()</span>
+ <span class="special">+</span> <span class="identifier">n</span><span class="special">)</span></code>.
+ </p>
+ </td>
+<td>
+ <p>
+ Sublinear
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_container.models"></a><a class="link" href="indexable_container.html#tree_node.concepts.indexable_container.models" title="Models">Models</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ __deque__ if the value associated with <a class="link" href="../reference/count_key.html" title="count_key"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">count_key</span></code></a> exists for the return
+ type of <code class="computeroutput"><span class="identifier">NodeGenerator</span></code>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/binode_assoc_container.html" title="binode_associative_container< NodeGenerator , T1 , T2 , IsMultipleAssociative , CompareSelector , Balancer >"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_associative_container</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/binode_set.html" title="binode_set<NodeGenerator,T,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_set</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/binode_map.html" title="binode_map<NodeGenerator,Key,Mapped,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_map</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/binode_multiset.html" title="binode_multiset<NodeGenerator,T,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_multiset</span></code></a>
+ </p></li>
+<li class="listitem"><p>
+ <a class="link" href="../reference/binode_multimap.html" title="binode_multimap<NodeGenerator,Key,Mapped,CompareSelector,Balancer>"><code class="computeroutput"><span class="identifier">tree_node</span><span class="special">::</span><span class="identifier">binode_multimap</span></code></a>
+ </p></li>
+</ul></div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2011-2013 Cromwell D. Enage<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="tree_node_desc_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="indexable_iterator.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/indexable_iterator.html
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ sandbox/tree_node/libs/tree_node/doc/html/tree_node/concepts/indexable_iterator.html 2013-07-13 14:05:43 EDT (Sat, 13 Jul 2013) (r85024)
@@ -0,0 +1,509 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Indexable Iterator</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter 1. tree_node 0.6">
+<link rel="up" href="../concepts.html" title="Concepts">
+<link rel="prev" href="indexable_container.html" title="Indexable Container">
+<link rel="next" href="../reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="C++ Boost" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="indexable_container.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reference.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="tree_node.concepts.indexable_iterator"></a><a class="link" href="indexable_iterator.html" title="Indexable Iterator">Indexable Iterator</a>
+</h3></div></div></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_iterator.description"></a><a class="link" href="indexable_iterator.html#tree_node.concepts.indexable_iterator.description" title="Description">Description</a>
+</h4></div></div></div>
+<p>
+ An <span class="bold"><strong>Indexable Iterator</strong></span> is an iterator that
+ provides both increment and decrement as well as sublinear-time operators
+ for moving forward and backward in arbitrary-sized steps. The runtime complexity
+ requirement is the only major difference between an <span class="bold"><strong>Indexable
+ Iterator</strong></span> and a Random Access Iterator.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_iterator.refinement_of"></a><a class="link" href="indexable_iterator.html#tree_node.concepts.indexable_iterator.refinement_of" title="Refinement of">Refinement
+ of</a>
+</h4></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem"><p>
+ Bidirectional Iterator
+ </p></li>
+<li class="listitem"><p>
+ Less-Than Comparable
+ </p></li>
+</ul></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_iterator.types"></a><a class="link" href="indexable_iterator.html#tree_node.concepts.indexable_iterator.types" title="Associated Types">Associated
+ Types</a>
+</h4></div></div></div>
+<p>
+ No additional types beyond those defined in the Bidirectional Iterator and Less-Than Comparable concepts.
+ </p>
+</div>
+<div class="variablelist">
+<p class="title"><b>Notation</b></p>
+<dl class="variablelist">
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Iterator</span></code></span></dt>
+<dd><p>
+ A type that models the <span class="bold"><strong>Indexable Iterator</strong></span>
+ concept.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">i</span></code>, <code class="computeroutput"><span class="identifier">j</span></code></span></dt>
+<dd><p>
+ Objects of type <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">T</span></code></span></dt>
+<dd><p>
+ The value type of <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">t</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">T</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">Distance</span></code></span></dt>
+<dd><p>
+ The distance type of <code class="computeroutput"><span class="identifier">Iterator</span></code>.
+ </p></dd>
+<dt><span class="term"><code class="computeroutput"><span class="identifier">n</span></code></span></dt>
+<dd><p>
+ An object of type <code class="computeroutput"><span class="identifier">Distance</span></code>.
+ </p></dd>
+</dl>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="tree_node.concepts.indexable_iterator.expressions"></a><a class="link" href="indexable_iterator.html#tree_node.concepts.indexable_iterator.expressions" title="Valid Expressions and Semantics">Valid
+ Expressions and Semantics</a>
+</h4></div></div></div>
+<p>
+ In addition to the expressions defined in the Bidirectional Iterator concept, the following
+ expressions must be valid.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Expression
+ </p>
+ </th>
+<th>
+ <p>
+ Return Type
+ </p>
+ </th>
+<th>
+ <p>
+ Semantics
+ </p>
+ </th>
+<th>
+ <p>
+ Type Requirements
+ </p>
+ </th>
+<th>
+ <p>
+ Precondition
+ </p>
+ </th>
+<th>
+ <p>
+ Postcondition
+ </p>
+ </th>
+<th>
+ <p>
+ <a href="http://en.wikipedia.org/wiki/Amortized_analysis" target="_top">Runtime
+ Complexity</a>
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ Iterator addition assignment
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span> <span class="special">+=</span>
+ <span class="identifier">n</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span><span class="special">&</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ If <code class="computeroutput"><span class="identifier">n</span> <span class="special">></span>
+ <span class="number">0</span></code>, equivalent to executing
+ <code class="computeroutput"><span class="special">++</span><span class="identifier">i</span></code>
+ <code class="computeroutput"><span class="identifier">n</span></code> times. If
+ <code class="computeroutput"><span class="identifier">n</span> <span class="special"><</span>
+ <span class="number">0</span></code>, equivalent to executing
+ <code class="computeroutput"><span class="special">--</span><span class="identifier">i</span></code>
+ <code class="computeroutput"><span class="identifier">n</span></code> times. If
+ <code class="computeroutput"><span class="identifier">n</span> <span class="special">==</span>
+ <span class="number">0</span></code>, this is a null operation.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Including <code class="computeroutput"><span class="identifier">i</span></code> itself,
+ there must be <code class="computeroutput"><span class="identifier">n</span></code>
+ dereferenceable or past-the-end iterators following or preceding
+ <code class="computeroutput"><span class="identifier">i</span></code>, depending
+ on whether <code class="computeroutput"><span class="identifier">n</span></code>
+ is positive or negative.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span></code> is dereferenceable
+ or past-the-end.
+ </p>
+ </td>
+<td>
+ <p>
+ Sublinear
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator addition
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span> <span class="special">+</span>
+ <span class="identifier">n</span></code> or <code class="computeroutput"><span class="identifier">n</span> <span class="special">+</span>
+ <span class="identifier">i</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="special">{</span> <span class="identifier">X</span> <span class="identifier">tmp</span>
+ <span class="special">=</span> <span class="identifier">i</span><span class="special">;</span> <span class="keyword">return</span>
+ <span class="identifier">tmp</span> <span class="special">+=</span>
+ <span class="identifier">n</span><span class="special">;</span>
+ <span class="special">}</span></code>. The two forms <code class="computeroutput"><span class="identifier">i</span> <span class="special">+</span>
+ <span class="identifier">n</span></code> and <code class="computeroutput"><span class="identifier">n</span> <span class="special">+</span>
+ <span class="identifier">i</span></code> are identical.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Same as for <code class="computeroutput"><span class="identifier">i</span> <span class="special">+=</span> <span class="identifier">n</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The result is dereferenceable or past-the-end.
+ </p>
+ </td>
+<td>
+ <p>
+ Sublinear
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator subtraction assignment
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span> <span class="special">-=</span>
+ <span class="identifier">n</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span><span class="special">&</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="identifier">i</span> <span class="special">+=</span> <span class="special">(-</span><span class="identifier">n</span><span class="special">)</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Including <code class="computeroutput"><span class="identifier">i</span></code> itself,
+ there must be <code class="computeroutput"><span class="identifier">n</span></code>
+ dereferenceable or past-the-end iterators preceding or following
+ <code class="computeroutput"><span class="identifier">i</span></code>, depending
+ on whether <code class="computeroutput"><span class="identifier">n</span></code>
+ is positive or negative.
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span></code> is dereferenceable
+ or past-the-end.
+ </p>
+ </td>
+<td>
+ <p>
+ Sublinear
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Iterator subtraction
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span> <span class="special">-</span>
+ <span class="identifier">n</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">X</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="special">{</span> <span class="identifier">X</span> <span class="identifier">tmp</span>
+ <span class="special">=</span> <span class="identifier">i</span><span class="special">;</span> <span class="keyword">return</span>
+ <span class="identifier">tmp</span> <span class="special">-=</span>
+ <span class="identifier">n</span><span class="special">;</span>
+ <span class="special">}</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Same as for <code class="computeroutput"><span class="identifier">i</span> <span class="special">-=</span> <span class="identifier">n</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The result is dereferenceable or past-the-end.
+ </p>
+ </td>
+<td>
+ <p>
+ Sublinear
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Difference
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span> <span class="special">-</span>
+ <span class="identifier">j</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Distance</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Returns a number <code class="computeroutput"><span class="identifier">n</span></code>
+ such that <code class="computeroutput"><span class="identifier">i</span> <span class="special">==</span> <span class="identifier">j</span>
+ <span class="special">+</span> <span class="identifier">n</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Either <code class="computeroutput"><span class="identifier">i</span></code> is reachable
+ from <code class="computeroutput"><span class="identifier">j</span></code> or <code class="computeroutput"><span class="identifier">j</span></code> is reachable from <code class="computeroutput"><span class="identifier">i</span></code>, or both.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Sublinear
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Element operator
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span><span class="special">[</span><span class="identifier">n</span><span class="special">]</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Convertible to <code class="computeroutput"><span class="identifier">T</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Equivalent to <code class="computeroutput"><span class="special">*(</span><span class="identifier">i</span> <span class="special">+</span>
+ <span class="identifier">n</span><span class="special">)</span></code>.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">i</span> <span class="special">+</span>
+ <span class="identifier">n</span></code> exists and is dereferenceable.
+ </p>
+ </td>
+<td>
+ </td>
+<td>
+ <p>
+ Sublinear
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ Element assignment
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><sp