Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55636 - in sandbox/SOC/2009/fusion: . boost boost/fusion boost/fusion/adapted boost/fusion/adapted/detail boost/fusion/adapted/detail/array boost/fusion/adapted/detail/boost_tuple boost/fusion/adapted/detail/mpl boost/fusion/adapted/detail/struct boost/fusion/adapted/struct boost/fusion/algorithm boost/fusion/algorithm/iteration boost/fusion/algorithm/iteration/detail boost/fusion/algorithm/query boost/fusion/algorithm/query/detail boost/fusion/algorithm/transformation boost/fusion/algorithm/transformation/detail boost/fusion/algorithm/transformation/detail/filter_key_view boost/fusion/algorithm/transformation/detail/pp boost/fusion/algorithm/transformation/detail/variadic_templates boost/fusion/container boost/fusion/container/detail boost/fusion/container/detail/pp boost/fusion/container/detail/variadic_templates boost/fusion/container/generation boost/fusion/container/generation/detail boost/fusion/container/generation/detail/pp boost/fusion/container/generation/detail/variadic_templates boost/fusion/container/list boost/fusion/container/list/detail boost/fusion/container/list/detail/cons boost/fusion/container/list/detail/list boost/fusion/container/map boost/fusion/container/map/detail boost/fusion/container/set boost/fusion/container/set/detail boost/fusion/container/vector boost/fusion/container/vector/detail boost/fusion/container/vector/detail/pp boost/fusion/container/vector/detail/variadic_templates boost/fusion/functional boost/fusion/functional/adapter boost/fusion/functional/adapter/detail boost/fusion/functional/adapter/detail/0x boost/fusion/functional/adapter/detail/no_0x boost/fusion/functional/generation boost/fusion/functional/generation/detail boost/fusion/functional/invocation boost/fusion/functional/invocation/detail boost/fusion/functional/invocation/detail/0x boost/fusion/functional/invocation/detail/no_0x boost/fusion/include boost/fusion/iterator boost/fusion/iterator/detail boost/fusion/mpl boost/fusion/sequence boost/fusion/sequence/comparison boost/fusion/sequence/comparison/detail boost/fusion/sequence/intrinsic boost/fusion/sequence/io boost/fusion/sequence/io/detail boost/fusion/support boost/fusion/support/internal boost/fusion/support/internal/variadic_templates boost/fusion/support/internal/variadic_templates/detail boost/fusion/tuple boost/fusion/view boost/fusion/view/detail boost/fusion/view/filter_view boost/fusion/view/filter_view/detail boost/fusion/view/iterator_range boost/fusion/view/iterator_range/detail boost/fusion/view/joint_view boost/fusion/view/joint_view/detail boost/fusion/view/reverse_view boost/fusion/view/reverse_view/detail boost/fusion/view/single_view boost/fusion/view/single_view/detail boost/fusion/view/transform_view boost/fusion/view/transform_view/detail boost/fusion/view/zip_view boost/fusion/view/zip_view/detail libs libs/fusion libs/fusion/doc libs/fusion/doc/html libs/fusion/doc/html/images libs/fusion/example libs/fusion/example/cookbook libs/fusion/example/extension libs/fusion/example/extension/detail libs/fusion/example/performance libs/fusion/example/test libs/fusion/test libs/fusion/test/algorithm libs/fusion/test/functional libs/fusion/test/sequence
From: mr.chr.schmidt_at_[hidden]
Date: 2009-08-17 19:48:18


Author: cschmidt
Date: 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
New Revision: 55636
URL: http://svn.boost.org/trac/boost/changeset/55636

Log:
total recommit as subclipse messed the repository up (2)
Added:
   sandbox/SOC/2009/fusion/LICENSE_1_0.txt (contents, props changed)
   sandbox/SOC/2009/fusion/boost/
   sandbox/SOC/2009/fusion/boost-build.jam (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/
   sandbox/SOC/2009/fusion/boost/fusion/adapted/
   sandbox/SOC/2009/fusion/boost/fusion/adapted.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/array.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_array.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/category_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/is_sequence_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/is_view_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/size_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/tag_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/category_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/is_sequence_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/is_view_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/size_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/tag_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/advance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/category_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/distance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/empty_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/get_mpl_it.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/has_key_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_iterator_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_sequence_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_view_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/mpl_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/prior_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/size_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/tag_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_assoc_struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_base.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/category_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/deref_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/extension.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/is_sequence_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/is_view_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/key_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/size_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_of_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/mpl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/std_array.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/std_pair.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/struct/
   sandbox/SOC/2009/fusion/boost/fusion/adapted/struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/struct/adapt_assoc_struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/adapted/struct/adapt_struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/for_each.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/all.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/none.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/clear.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/at_key_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/filter_key_view_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/has_key_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/value_at_key_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/is_in_seq.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/pp/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/pp/zip.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/variadic_templates/zip.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/zip.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/
   sandbox/SOC/2009/fusion/boost/fusion/container.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/convert_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_ctor.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/as_seq.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_ctor.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/as_seq.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_ctor.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/
   sandbox/SOC/2009/fusion/boost/fusion/container/generation.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/cons_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/make_seq.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_seq.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/map_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/seq_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/seq_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/make_map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/make_seq.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/map_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/seq_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/ignore.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/list_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_cons.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_list.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_set.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/map_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/pair_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/generation/vector_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/
   sandbox/SOC/2009/fusion/boost/fusion/container/list.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/convert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/build_cons.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/cons_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/cons_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/convert_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/empty_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/limits.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/list/list_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/
   sandbox/SOC/2009/fusion/boost/fusion/container/map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/convert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/deref_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/key_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/value_of_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/limits.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/map/map_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/
   sandbox/SOC/2009/fusion/boost/fusion/container/set.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/convert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/deref_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/key_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/value_of_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/limits.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/set/set_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/
   sandbox/SOC/2009/fusion/boost/fusion/container/vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/convert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n_chooser.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/limits.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector10.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector20.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector30.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector40.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector50.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/
   sandbox/SOC/2009/fusion/boost/fusion/functional.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/0x/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/0x/fused_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/0x/unfused_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/access.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/unfused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/unfused_typed.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/0x/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/0x/invoke_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/0x/invoke_impl_detail.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/ (props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/accumulate.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/adapt_struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/adapted.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/adapter.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/advance.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/advance_c.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/algorithm.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/all.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/any.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/array.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/as_list.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/as_map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/as_set.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/as_vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/at.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/at_c.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/at_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/begin.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/boost_array.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/boost_tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/category_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/clear.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/comparison.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/cons.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/cons_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/container.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/convert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/count.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/count_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/deduce_sequence.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/deref.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/deref_data.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/distance.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/empty.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/end.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/equal_to.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/erase.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/erase_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/filter.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/filter_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/filter_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/find.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/find_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/find_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/fold.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/for_each.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/functional.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/fused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/fused_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/fused_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/generation.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/greater.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/greater_equal.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/has_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/ignore.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/in.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/insert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/insert_range.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/intrinsic.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/invocation.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/invoke.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/invoke_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/invoke_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/io.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/is_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/is_sequence.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/is_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/iteration.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/iterator_base.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/iterator_facade.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/iterator_range.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/join.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/joint_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/key_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/less.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/less_equal.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/list.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/list_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/list_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_cons.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_fused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_fused_function_object.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_fused_procedure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_list.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_set.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/make_vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/map.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/map_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/map_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/mpl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/next.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/none.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/not_equal_to.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/out.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/pair.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/pair_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/pop_back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/pop_front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/prior.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/push_back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/push_front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/query.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/remove.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/remove_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/replace.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/replace_if.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/reverse.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/reverse_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/sequence.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/sequence_base.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/sequence_facade.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/set.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/set_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/single_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/size.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/std_array.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/std_pair.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/support.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/swap.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/tag_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/tag_of_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/transform.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/transform_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/transformation.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/tuple_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/tuple_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/unfused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/unfused_typed.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/unused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/value_at.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/value_at_c.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/value_at_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/value_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/value_of_data.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector10.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector20.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector30.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector40.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector50.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/vector_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/zip.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/include/zip_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/
   sandbox/SOC/2009/fusion/boost/fusion/iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/advance.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/advance_c.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/basic_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/deref.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/deref_data.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/detail/
   sandbox/SOC/2009/fusion/boost/fusion/iterator/detail/advance.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/detail/distance.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/distance.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/equal_to.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/iterator_facade.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/key_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/next.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/prior.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/value_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/iterator/value_of_data.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/
   sandbox/SOC/2009/fusion/boost/fusion/mpl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/at.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/begin.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/clear.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/empty.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/end.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/erase.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/erase_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/fusion_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/has_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/insert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/insert_range.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/pop_back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/pop_front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/push_back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/push_front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/mpl/size.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/
   sandbox/SOC/2009/fusion/boost/fusion/sequence.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/enable_comparison.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/equal_to.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/greater.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/greater_equal.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/less.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/less_equal.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/not_equal_to.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/equal_to.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/greater.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/greater_equal.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/less.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/less_equal.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/not_equal_to.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/convert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_c.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/back.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/empty.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/front.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/has_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/size.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/swap.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_c.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_key.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io/
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/in.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/manip.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/out.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io/in.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/io/out.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/sequence/sequence_facade.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/
   sandbox/SOC/2009/fusion/boost/fusion/support.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/deduce.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/deduce_sequence.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/as_fusion_element.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/assert.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/assign_tags.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/ref.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/result_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/sequence_assign.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/template.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/detail/
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_n.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_quote.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/is_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/is_sequence.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/is_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/iterator_base.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/pair.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/sequence_base.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/tag_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/tag_of_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/support/unused.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/tuple/
   sandbox/SOC/2009/fusion/boost/fusion/tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/tuple/make_tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple_tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/
   sandbox/SOC/2009/fusion/boost/fusion/view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/detail/strictest_traversal.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/deref_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/filter_view_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/filter_view_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/key_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/size_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/iterator_range_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/iterator_range.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/joint_view_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/joint_view_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/key_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/advance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/distance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/key_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/prior_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/advance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/distance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/prior_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/distance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/size_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/zip_view_fwd.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/zip_view_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/build.bat (contents, props changed)
   sandbox/SOC/2009/fusion/libs/
   sandbox/SOC/2009/fusion/libs/fusion/
   sandbox/SOC/2009/fusion/libs/fusion/doc/
   sandbox/SOC/2009/fusion/libs/fusion/doc/Jamfile (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/acknowledgements.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/adapted.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/algorithm.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/changelog.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/container.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/extension.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/functional.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/fusion.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/alert.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/caution.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/fusion_org.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/home.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/important.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/next.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/note.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/prev.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/smiley.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/tip.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/up.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/warning.png (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/introduction.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/iterator.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/notes.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/organization.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/preface.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/quick_start.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/references.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/sequence.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/support.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/tuple.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/doc/view.qbk (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/
   sandbox/SOC/2009/fusion/libs/fusion/example/cookbook/
   sandbox/SOC/2009/fusion/libs/fusion/example/cookbook/do_the_bind.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/cookbook/fill_em_up.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/Jamfile (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/advance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/at_key_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/begin_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/category_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/deref_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/distance_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/end_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/equal_to_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/has_key_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/is_sequence_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/is_view_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/next_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/prior_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/size_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_at_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_at_key_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_of_impl.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct_iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct_type.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/tag_of.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/test_example.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/extension/triple.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/Jamfile (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/accumulate.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/functional.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product2.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/measure.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/sequence_efficiency.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/timings.txt (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/performance/zip_efficiency.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/test/
   sandbox/SOC/2009/fusion/libs/fusion/example/test/Jamfile.v2 (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/module.cmake (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/
   sandbox/SOC/2009/fusion/libs/fusion/test/CMakeLists.txt (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/all.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/any.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/clear.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/count.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/count_if.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/erase.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/erase_key.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/filter.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/filter_if.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/find.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/find_if.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/for_each.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/insert.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/insert_range.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/join.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/none.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/pop_back.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/pop_front.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/push_back.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/push_front.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/remove.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/remove_if.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/replace.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/replace_if.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/reverse.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/transform.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip2.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip_ignore.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused_function_object.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused_procedure.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_function_object.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_procedure.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused_function_object.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused_procedure.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_unfused.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/unfused.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/functional/unfused_typed.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/adapt_assoc_struct.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/adapt_struct.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/array.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_list.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_map.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_set.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_vector.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/boost_tuple.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/comparison.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/cons.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/construction.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/copy.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/deduce_sequence.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/filter_view.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/io.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/iterator.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/iterator_range.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/joint_view.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_comparison.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_construction.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_copy.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_iterator.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_make.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_misc.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_mutate.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_tie.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/make.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/map.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/map_tie.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/misc.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/mutate.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/reverse_view.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/set.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/single_view.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/std_pair.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/swap.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tie.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/transform_view.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_comparison.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_construction.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_copy.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_element.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_make.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_misc.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_mutate.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_tie.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/value_at.hpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_comparison.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_construction.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_copy.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_iterator.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_make.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_misc.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_mutate.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_n.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_tie.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_value_at.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view2.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view_ignore.cpp (contents, props changed)
   sandbox/SOC/2009/fusion/libs/fusion/todo.txt (contents, props changed)
   sandbox/SOC/2009/fusion/project-root.jam (contents, props changed)

Added: sandbox/SOC/2009/fusion/LICENSE_1_0.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/LICENSE_1_0.txt 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,23 @@
+Boost Software License - Version 1.0 - August 17th, 2003
+
+Permission is hereby granted, free of charge, to any person or organization
+obtaining a copy of the software and accompanying documentation covered by
+this license (the "Software") to use, reproduce, display, distribute,
+execute, and transmit the Software, and to prepare derivative works of the
+Software, and to permit third-parties to whom the Software is furnished to
+do so, all subject to the following:
+
+The copyright notices in the Software and this entire statement, including
+the above license grant, this restriction and the following disclaimer,
+must be included in all copies of the Software, in whole or in part, and
+all derivative works of the Software, unless such copies or derivative
+works are solely in the form of machine-executable object code generated by
+a source language processor.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
+SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
+FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

Added: sandbox/SOC/2009/fusion/boost-build.jam
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost-build.jam 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,6 @@
+# Copyright Christopher Schmidt 2009.
+# 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)
+
+boost-build $(BOOST_ROOT)/tools/build/v2 ;

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_HPP
+#define BOOST_FUSION_ADAPTED_HPP
+
+#include <boost/fusion/adapted/array.hpp>
+#include <boost/fusion/adapted/boost_array.hpp>
+#include <boost/fusion/adapted/boost_tuple.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+//TODO!!!
+//#include <boost/fusion/adapted/std_array.hpp>
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/adapted/struct.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/array.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/array.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_ARRAY_HPP
+#define BOOST_FUSION_ADAPTED_ARRAY_HPP
+
+#include <boost/fusion/adapted/boost_array.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_array.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_BOOST_ARRAY_HPP
+#define BOOST_FUSION_ADAPTED_BOOST_ARRAY_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#define BOOST_FUSION_ADAPTED_ARRAY_TYPE class
+#define BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE boost
+#include <boost/fusion/adapted/detail/array/tag_of.hpp>
+#undef BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE
+#undef BOOST_FUSION_ADAPTED_ARRAY_TYPE
+
+#include <boost/fusion/adapted/detail/array/is_view_impl.hpp>
+#include <boost/fusion/adapted/detail/array/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/detail/array/category_of_impl.hpp>
+#include <boost/fusion/adapted/detail/array/begin_impl.hpp>
+#include <boost/fusion/adapted/detail/array/end_impl.hpp>
+#include <boost/fusion/adapted/detail/array/size_impl.hpp>
+#include <boost/fusion/adapted/detail/array/at_impl.hpp>
+#include <boost/fusion/adapted/detail/array/value_at_impl.hpp>
+#include <boost/fusion/adapted/detail/array/deref_impl.hpp>
+#include <boost/fusion/adapted/detail/array/value_of_impl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/boost_tuple.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_BOOST_TUPLE_HPP
+#define BOOST_FUSION_ADAPTED_BOOST_TUPLE_HPP
+
+//TODO adapt std::(tr1::)tuple
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/tuple/tuple.hpp>
+
+#include <boost/fusion/adapted/detail/boost_tuple/tag_of.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/is_view_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/category_of_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/size_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/at_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/value_at_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/begin_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/end_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/deref_impl.hpp>
+#include <boost/fusion/adapted/detail/boost_tuple/value_of_impl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,39 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_AT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct at_impl;
+
+ template<>
+ struct at_impl<array_tag>
+ {
+ template<typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::forward_as<
+ SeqRef
+ , typename detail::remove_reference<SeqRef>::type::value_type
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return seq[N::value];
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_BEGIN_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<array_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ array_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/category_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/category_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_CATEGORY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_CATEGORY_OF_IMPL_HPP
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ namespace extension
+ {
+ template<typename SeqRef>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<array_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ typedef random_access_traversal_tag type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_ARRAY_DEREF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_DEREF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<array_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ detail::forward_as<
+ typename it::seq_type
+ , typename detail::remove_reference<
+ typename it::seq_type
+ >::type::value_type
+ >::type
+ type;
+
+ static type
+ call(ItRef it_)
+ {
+ return (*it_.seq)[it::index::value];
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_END_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<array_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ array_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , detail::remove_reference<SeqRef>::type::static_size
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/is_sequence_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/is_sequence_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_IS_SEQUENCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_IS_SEQUENCE_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<array_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::true_
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/is_view_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/is_view_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_IS_VIEW_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_IS_VIEW_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+//TODO doc!!!
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<array_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::false_
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/size_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/size_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,27 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_SIZE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_SIZE_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct size_impl;
+
+ template<>
+ struct size_impl<array_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::int_<detail::remove_reference<SeqRef>::type::static_size>
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/tag_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/tag_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#include <cstddef>
+
+namespace BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE
+{
+ template<typename T, std::size_t N>
+ BOOST_FUSION_ADAPTED_ARRAY_TYPE array;
+}
+
+namespace boost { namespace fusion
+{
+ struct array_tag;
+ struct array_iterator_tag;
+ struct random_access_traversal_tag;
+
+ namespace traits
+ {
+#define BOOST_FUSION_TAG_OF_SPECIALIZATION(COMBINATION,_)\
+ template<typename T, std::size_t N>\
+ struct tag_of<\
+ BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE::array<T,N> COMBINATION>\
+ {\
+ typedef array_tag type;\
+ };
+
+ BOOST_FUSION_ALL_CV_REF_NON_REF_COMBINATIONS(
+ BOOST_FUSION_TAG_OF_SPECIALIZATION,_)
+
+#undef BOOST_FUSION_TAG_OF_SPECIALIZATION
+ }
+}}

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_ARRAY_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_VALUE_AT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<array_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename SeqRef::value_type type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/array/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_ARRAY_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_ARRAY_VALUE_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<array_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<
+ typename detail::remove_reference<ItRef>::type::seq_type
+ >::type::value_type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_AT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<boost_tuple_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::forward_as<
+ SeqRef
+ , typename tuples::element<
+ N::value
+ , typename detail::identity<SeqRef>::type
+ >::type
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return tuples::get<N::value>(
+ BOOST_FUSION_FORWARD(SeqRef,seq));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_BEGIN_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<boost_tuple_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ boost_tuple_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/category_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/category_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_CATEGORY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_CATEGORY_OF_IMPL_HPP
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<boost_tuple_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ typedef random_access_traversal_tag type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_DEREF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_DEREF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<boost_tuple_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ detail::forward_as<
+ typename it::seq_type
+ , typename tuples::element<
+ it::index::value
+ , typename detail::remove_reference<
+ typename it::seq_type
+ >::type
+ >::type
+ >::type
+ type;
+
+ static type
+ call(ItRef it_)
+ {
+ return get<it::index::value>(*it_.seq);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_END_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<boost_tuple_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ boost_tuple_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , tuples::length<
+ typename detail::identity<SeqRef>::type
+ >::value
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/is_sequence_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/is_sequence_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_IS_SEQUENCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_IS_SEQUENCE_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<boost_tuple_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::true_
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/is_view_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/is_view_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_IS_VIEW_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_IS_VIEW_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<boost_tuple_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::false_
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/size_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/size_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_SIZE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_SIZE_IMPL_HPP
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<boost_tuple_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : mpl::int_<
+ tuples::length<
+ typename detail::identity<SeqRef>::type
+ >::value
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/tag_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/tag_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,51 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_TAG_OF_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_TAG_OF_HPP
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+namespace boost { namespace fusion
+{
+ struct boost_tuple_tag;
+ struct boost_tuple_iterator_tag;
+
+ namespace traits
+ {
+#define BOOST_FUSION_TAG_OF_SPECIALIZATION(COMBINATION,_)\
+ template <\
+ class T0, class T1, class T2, class T3, class T4, \
+ class T5, class T6, class T7, class T8, class T9\
+ >\
+ struct tag_of<\
+ tuples::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> COMBINATION\
+ >\
+ {\
+ typedef boost_tuple_tag type;\
+ };\
+ \
+ template <class Head, class Tail>\
+ struct tag_of<tuples::cons<Head, Tail> COMBINATION>\
+ {\
+ typedef boost_tuple_tag type;\
+ };\
+ \
+ template <>\
+ struct tag_of<tuples::null_type COMBINATION>\
+ {\
+ typedef boost_tuple_tag type;\
+ };
+
+ BOOST_FUSION_ALL_CV_REF_NON_REF_COMBINATIONS(
+ BOOST_FUSION_TAG_OF_SPECIALIZATION,_)
+
+#undef BOOST_FUSION_TAG_OF_SPECIALIZATION
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_VALUE_AT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<boost_tuple_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ : tuples::element<
+ N::value
+ , typename detail::identity<SeqRef>::type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/boost_tuple/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_BOOST_TUPLE_VALUE_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<boost_tuple_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ tuples::element<
+ it::index::value
+ , typename detail::remove_reference<
+ typename it::seq_type
+ >::type
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/advance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/advance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_ADVANCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_ADVANCE_IMPL_HPP
+
+#include <boost/mpl/advance.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct advance_impl;
+
+ template <>
+ struct advance_impl<mpl_iterator_tag>
+ {
+ template <typename ItRef, typename N>
+ struct apply
+ {
+ typedef
+ mpl_iterator<
+ typename mpl::advance<
+ typename detail::identity<ItRef>::type
+ , N
+ >::type
+ >
+ type;
+
+ template<typename ItRef2>
+ static type
+ call(ItRef2)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_AT_IMPL_HPP
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<mpl_sequence_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ mpl::at<typename detail::identity<SeqRef>::type, N>::type
+ type;
+
+ static type
+ call(SeqRef)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_BEGIN_IMPL_HPP
+
+#include <boost/mpl/begin.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<mpl_sequence_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ mpl_iterator<
+ typename mpl::begin<
+ typename detail::identity<SeqRef>::type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/category_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/category_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_CATEGORY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_CATEGORY_OF_IMPL_HPP
+
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/mpl/iterator_category.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+
+namespace boost { namespace fusion
+{
+ struct forward_traversal_tag;
+ struct bidirectional_traversal_tag;
+ struct random_access_traversal_tag;
+
+ namespace detail
+ {
+ template <typename Category>
+ struct mpl_iterator_category;
+
+ template <>
+ struct mpl_iterator_category<mpl::forward_iterator_tag>
+ {
+ typedef forward_traversal_tag type;
+ };
+
+ template <>
+ struct mpl_iterator_category<mpl::bidirectional_iterator_tag>
+ {
+ typedef bidirectional_traversal_tag type;
+ };
+
+ template <>
+ struct mpl_iterator_category<mpl::random_access_iterator_tag>
+ {
+ typedef random_access_traversal_tag type;
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<mpl_sequence_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ typedef typename
+ detail::mpl_iterator_category<
+ typename mpl::iterator_category<
+ typename mpl::begin<
+ typename detail::identity<SeqRef>::type
+ >::type
+ >::type
+ >::type
+ type;
+ };
+ };
+
+ template<>
+ struct category_of_impl<mpl_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::mpl_iterator_category<
+ typename mpl::iterator_category<
+ typename detail::identity<ItRef>::type
+ >::type
+ >::type
+ type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_DEREF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_DEREF_IMPL_HPP
+
+#include <boost/mpl/deref.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<mpl_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ mpl::deref<typename detail::identity<ItRef>::type>::type
+ type;
+
+ template<typename ItRef2>
+ static type
+ call(ItRef2)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/distance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/distance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_DISTANCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_DISTANCE_IMPL_HPP
+
+#include <boost/fusion/adapted/detail/mpl/get_mpl_it.hpp>
+
+#include <boost/mpl/distance.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct distance_to_impl;
+
+ template <>
+ struct distance_to_impl<mpl_iterator_tag>
+ {
+ template <typename It1Ref, typename It2Ref>
+ struct apply
+ : mpl::distance<
+ typename detail::identity<It1Ref>::type
+ , typename detail::get_mpl_it<
+ typename detail::identity<It2Ref>::type
+ >::type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/empty_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/empty_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_EMPTY_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_EMPTY_IMPL_HPP
+
+#include <boost/mpl/empty.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct empty_impl;
+
+ template <>
+ struct empty_impl<mpl_sequence_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : mpl::empty<typename detail::identity<SeqRef>::type>
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_END_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_END_IMPL_HPP
+
+#include <boost/mpl/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<mpl_sequence_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ mpl_iterator<
+ typename mpl::end<
+ typename detail::identity<SeqRef>::type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_EQUAL_TO_IMPL_HPP
+
+#include <boost/fusion/adapted/detail/mpl/get_mpl_it.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct equal_to_impl;
+
+ template <>
+ struct equal_to_impl<mpl_iterator_tag>
+ {
+ template <typename It1Ref, typename It2Ref>
+ struct apply
+ : is_same<
+ typename detail::identity<It1Ref>::type
+ , typename detail::get_mpl_it<
+ typename detail::identity<It2Ref>::type
+ >::type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/get_mpl_it.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/get_mpl_it.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,24 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_MPL_GET_MPL_IT_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_GET_MPL_IT_HPP
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename It, typename Active = void>
+ struct get_mpl_it
+ {
+ typedef It type;
+ };
+
+ template <typename It>
+ struct get_mpl_it<It, typename It::void_>
+ {
+ typedef typename It::it_type type;
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/has_key_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/has_key_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_HAS_KEY_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_HAS_KEY_IMPL_HPP
+
+#include <boost/mpl/has_key.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct has_key_impl;
+
+ template <>
+ struct has_key_impl<mpl_sequence_tag>
+ {
+ template <typename SeqRef, typename Key>
+ struct apply
+ : mpl::has_key<typename detail::identity<SeqRef>::type, Key>
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_iterator_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_iterator_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_IS_ITERATOR_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_IS_ITERATOR_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_iterator_impl;
+
+ template<>
+ struct is_iterator_impl<mpl_iterator_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::true_
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_sequence_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_sequence_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_IS_SEQUENCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_IS_SEQUENCE_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<mpl_sequence_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::true_
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_view_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/is_view_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_IS_VIEW_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_IS_VIEW_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<mpl_sequence_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::true_
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/mpl_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/mpl_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,116 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_MPL_ITERATOR_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_MPL_ITERATOR_HPP
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+//TODO doc no assoc iterator!
+
+namespace boost { namespace fusion
+{
+ struct mpl_iterator_tag;
+ struct mpl_sequence_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <typename Tag>
+ struct equal_to_impl;
+
+ template <typename Tag>
+ struct deref_impl;
+
+ template <typename Tag>
+ struct next_impl;
+
+ template <typename Tag>
+ struct prior_impl;
+
+ template <typename Tag>
+ struct advance_impl;
+
+ template <typename Tag>
+ struct distance_impl;
+ }
+
+ namespace detail
+ {
+ template<typename>
+ struct get_mpl_iterator_tag
+ {
+ typedef mpl_iterator_tag type;
+ };
+ }
+
+ template <typename It>
+ struct mpl_iterator
+ : iterator_facade<
+ mpl_iterator<It>
+ , typename traits::category_of<It>::type
+ >
+ {
+ //cschmidt: void typedef to enable fast SFINAE in get_mpl_it.hpp!
+ typedef void void_;
+ typedef It it_type;
+
+ template <typename ItRef>
+ struct value_of
+ : extension::value_of_impl<
+ typename detail::get_mpl_iterator_tag<ItRef>::type
+ >::template apply<It&>
+ {};
+
+ template <typename It1Ref, typename It2Ref>
+ struct equal_to
+ : extension::equal_to_impl<
+ typename detail::get_mpl_iterator_tag<It1Ref>::type
+ >:: template apply<It&,It2Ref>
+ {};
+
+ template <typename ItRef>
+ struct deref
+ : extension::deref_impl<
+ typename detail::get_mpl_iterator_tag<ItRef>::type
+ >::template apply<It&>
+ {};
+
+ template <typename ItRef>
+ struct next
+ : extension::next_impl<
+ typename detail::get_mpl_iterator_tag<ItRef>::type
+ >::template apply<It&>
+ {};
+
+ template <typename ItRef>
+ struct prior
+ : extension::prior_impl<
+ typename detail::get_mpl_iterator_tag<ItRef>::type
+ >::template apply<It&>
+ {};
+
+ template <typename ItRef, typename N>
+ struct advance
+ : extension::advance_impl<
+ typename detail::get_mpl_iterator_tag<ItRef>::type
+ >::template apply<It&,N>
+ {};
+
+ template <typename It1Ref, typename It2Ref>
+ struct distance
+ : extension::distance_impl<
+ typename detail::get_mpl_iterator_tag<It1Ref>::type
+ >::template apply<It&,It2Ref>
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_NEXT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_NEXT_IMPL_HPP
+
+#include <boost/mpl/next.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<mpl_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef
+ mpl_iterator<
+ typename mpl::next<
+ typename detail::identity<ItRef>::type
+ >::type
+ >
+ type;
+
+ template<typename ItRef2>
+ static type
+ call(ItRef2)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/prior_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/prior_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_PRIOR_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_PRIOR_IMPL_HPP
+
+#include <boost/mpl/prior.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct prior_impl;
+
+ template <>
+ struct prior_impl<mpl_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef
+ mpl_iterator<
+ typename mpl::prior<
+ typename detail::identity<ItRef>::type
+ >::type
+ >
+ type;
+
+ template<typename ItRef2>
+ static type
+ call(ItRef2)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/size_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/size_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_SIZE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_SIZE_IMPL_HPP
+
+#include <boost/mpl/size.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<mpl_sequence_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : mpl::size<typename detail::identity<SeqRef>::type>
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/tag_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/tag_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,83 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_MPL_TAG_OF_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_TAG_OF_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/is_sequence.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost
+{
+ namespace fusion
+ {
+ struct mpl_sequence_tag;
+ struct mpl_iterator_tag;
+
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(category);
+
+ template<typename T, typename Category>
+ struct category_is
+ : mpl::equal_to<typename T::category, Category>
+ {};
+ }
+
+ namespace traits
+ {
+ template<typename T>
+ struct tag_of<
+ T
+ , typename disable_if<
+ typename detail::has_fusion_tag<
+ typename detail::identity<T>::type
+ >::type
+ >::type
+ >
+ {
+ typedef typename detail::identity<T>::type identity_t;
+
+ typedef typename
+ mpl::eval_if<
+ mpl::is_sequence<identity_t>
+ , mpl::identity<mpl_sequence_tag>
+ , mpl::eval_if<
+ mpl::and_<
+ detail::has_category<identity_t>
+ , mpl::or_<
+ detail::category_is<
+ identity_t
+ , mpl::forward_iterator_tag
+ >
+ , detail::category_is<
+ identity_t
+ , mpl::bidirectional_iterator_tag
+ >
+ , detail::category_is<
+ identity_t
+ , mpl::random_access_iterator_tag
+ >
+ >
+ >
+ , mpl::identity<mpl_iterator_tag>
+ , tag_of<T, bool>
+ >
+ >::type
+ type;
+ };
+ }
+ }
+}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_VALUE_AT_IMPL_HPP
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<mpl_sequence_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ : mpl::at<typename detail::identity<SeqRef>::type, N>
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/mpl/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ADAPTED_DETAIL_MPL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_MPL_VALUE_OF_IMPL_HPP
+
+#include <boost/mpl/deref.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<mpl_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : mpl::deref<typename detail::identity<ItRef>::type>
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_assoc_struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_assoc_struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_STRUCT_ADAPT_ASSOC_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_ADAPT_ASSOC_STRUCT_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(X, Y, Z)\
+ ((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1(X, Y, Z)\
+ ((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0_END
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1_END
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT(NAME, SEQ)\
+ BOOST_FUSION_ADAPT_STRUCT_BASE(\
+ NAME,\
+ assoc_struct_tag,\
+ BOOST_PP_CAT(BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 SEQ,_END),\
+ BOOST_FUSION_ADAPT_ASSOC_STRUCT_C)
+
+#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C(R, NAME, I, XYZ) \
+ BOOST_FUSION_ADAPT_STRUCT_C_BASE(NAME, I, XYZ, 3) \
+ \
+namespace boost { namespace fusion { namespace extension \
+{ \
+ template<> \
+ struct struct_assoc_key<NAME, I> \
+ { \
+ typedef BOOST_PP_TUPLE_ELEM(3, 2, XYZ) type; \
+ }; \
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_base.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2009 Dan Christopher Schmidt
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_ADAPT_BASE_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_ADAPT_BASE_HPP
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION(COMBINATION, DATA) \
+ template <> \
+ struct tag_of<BOOST_PP_TUPLE_ELEM(2,0,DATA) COMBINATION> \
+ { \
+ typedef BOOST_PP_TUPLE_ELEM(2,1,DATA) type; \
+ };
+
+#define BOOST_FUSION_ADAPT_STRUCT_BASE(NAME,TAG,TUPLE_SEQ,CALLBACK) \
+ BOOST_PP_SEQ_FOR_EACH_I(CALLBACK,NAME,TUPLE_SEQ) \
+ \
+namespace boost { namespace fusion \
+{ \
+ namespace traits \
+ { \
+ BOOST_FUSION_ALL_CV_REF_NON_REF_COMBINATIONS( \
+ BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION,(NAME,TAG)) \
+ } \
+ \
+ namespace extension \
+ { \
+ template <> \
+ struct struct_size<NAME> \
+ : mpl::int_<BOOST_PP_SEQ_SIZE(TUPLE_SEQ)> \
+ {}; \
+ } \
+}}
+
+#define BOOST_FUSION_ADAPT_STRUCT_C_BASE(NAME, I, TUPLE, MAX_SIZE) \
+namespace boost { namespace fusion { namespace extension \
+{ \
+ template <> \
+ struct struct_member<NAME, I> \
+ { \
+ typedef BOOST_PP_TUPLE_ELEM(MAX_SIZE, 0, TUPLE) type; \
+ \
+ template<typename Seq> \
+ static typename detail::forward_as<Seq&,type>::type \
+ call(Seq& seq) \
+ { \
+ return seq.BOOST_PP_TUPLE_ELEM(MAX_SIZE, 1, TUPLE); \
+ } \
+ }; \
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/adapt_struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_STRUCT_ADAPT_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_ADAPT_STRUCT_HPP
+
+#include <boost/preprocessor/cat.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0(X, Y)\
+ ((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_1
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1(X, Y)\
+ ((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_0
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0_END
+#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1_END
+
+#define BOOST_FUSION_ADAPT_STRUCT(NAME, SEQ)\
+ BOOST_FUSION_ADAPT_STRUCT_BASE(\
+ NAME,\
+ assoc_struct_tag,\
+ BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 SEQ,_END),\
+ BOOST_FUSION_ADAPT_STRUCT_C)
+
+#define BOOST_FUSION_ADAPT_STRUCT_C(R, NAME, I, XY)\
+ BOOST_FUSION_ADAPT_STRUCT_C_BASE(NAME, I, XY, 2)
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_AT_IMPL_HPP
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<struct_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::forward_as<
+ SeqRef
+ , typename struct_member<
+ typename detail::identity<SeqRef>::type
+ , N::value
+ >::type
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return
+ struct_member<
+ typename detail::identity<SeqRef>::type
+ , N::value
+ >::call(seq);
+ }
+ };
+ };
+
+ template <>
+ struct at_impl<assoc_struct_tag>
+ : at_impl<struct_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,66 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_BEGIN_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<struct_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ struct_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+
+ template <>
+ struct begin_impl<assoc_struct_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ assoc_struct_iterator_tag
+ , assoc_struct_category
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/category_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/category_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_CATEGORY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_CATEGORY_OF_IMPL_HPP
+
+#include <boost/fusion/support/category_of.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template<typename Tag>
+ struct category_of_impl;
+
+ template<>
+ struct category_of_impl<struct_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ typedef random_access_traversal_tag type;
+ };
+ };
+
+ template<>
+ struct category_of_impl<assoc_struct_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ struct type
+ : random_access_traversal_tag, associative_sequence_tag
+ {};
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/deref_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/deref_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_DATA_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_data_impl;
+
+ template <>
+ struct deref_data_impl<assoc_struct_iterator_tag>
+ : deref_impl<assoc_struct_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_DEREF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<struct_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+ typedef typename
+ detail::identity<typename it::seq_type>::type
+ identity_struct;
+
+ typedef typename
+ detail::forward_as<
+ typename it::seq_type
+ , typename extension::struct_member<
+ identity_struct
+ , it::index::value
+ >::type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return
+ extension::struct_member<
+ identity_struct
+ , it::index::value
+ >::call(*it.seq);
+ }
+ };
+ };
+
+ template <>
+ struct deref_impl<assoc_struct_iterator_tag>
+ : deref_impl<struct_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,66 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_END_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<struct_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ struct_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , struct_size<typename detail::identity<SeqRef>::type>::value
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+
+ template <>
+ struct end_impl<assoc_struct_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ assoc_struct_iterator_tag
+ , assoc_struct_category
+ , SeqRef
+ , struct_size<typename detail::identity<SeqRef>::type>::value
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/extension.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/extension.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_EXTENSION_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_EXTENSION_HPP
+
+#include <boost/fusion/support/category_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct struct_tag;
+ struct struct_iterator_tag;
+ struct assoc_struct_tag;
+ struct assoc_struct_iterator_tag;
+
+ struct assoc_struct_category
+ : bidirectional_traversal_tag, associative_sequence_tag
+ {};
+
+ namespace extension
+ {
+ struct no_such_member;
+
+ template<typename Seq, int N>
+ struct struct_member;
+
+ template<typename Seq, int N>
+ struct struct_assoc_key;
+
+ template<typename Seq>
+ struct struct_size;
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/is_sequence_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/is_sequence_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_IS_SEQUENCE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_IS_SEQUENCE_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<struct_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::true_
+ {};
+ };
+
+ template <>
+ struct is_sequence_impl<assoc_struct_tag>
+ : is_sequence_impl<struct_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/is_view_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/is_view_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_IS_VIEW_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_IS_VIEW_IMPL_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<struct_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : mpl::false_
+ {};
+ };
+
+ template <>
+ struct is_view_impl<assoc_struct_tag>
+ : is_view_impl<struct_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/key_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/key_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_STRUCT_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_KEY_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <>
+ struct key_of_impl<assoc_struct_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ extension::struct_assoc_key<
+ typename detail::identity<typename it::seq_type>::type
+ , it::index::value
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/size_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/size_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_SIZE_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_SIZE_IMPL_HPP
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<struct_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : struct_size<typename detail::identity<SeqRef>::type>
+ {};
+ };
+
+ template <>
+ struct size_impl<assoc_struct_tag>
+ : size_impl<struct_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_AT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<struct_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ : struct_member<typename detail::identity<SeqRef>::type, N::value>
+ {};
+ };
+
+ template <>
+ struct value_at_impl<assoc_struct_tag>
+ : value_at_impl<struct_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_of_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_of_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_DATA_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <>
+ struct value_of_data_impl<assoc_struct_iterator_tag>
+ : value_of_impl<assoc_struct_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/detail/struct/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,37 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_ADAPTED_DETAIL_STRUCT_VALUE_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<struct_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ extension::struct_member<
+ typename detail::identity<typename it::seq_type>::type
+ , it::index::value
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct value_of_impl<assoc_struct_iterator_tag>
+ : value_of_impl<struct_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/mpl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/mpl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_MPL_HPP
+#define BOOST_FUSION_ADAPTED_MPL_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/fusion/adapted/detail/mpl/mpl_iterator.hpp>
+#include <boost/fusion/adapted/detail/mpl/advance_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/at_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/begin_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/category_of_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/deref_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/distance_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/empty_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/end_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/equal_to_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/has_key_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/is_iterator_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/is_view_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/next_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/prior_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/size_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/tag_of.hpp>
+#include <boost/fusion/adapted/detail/mpl/value_at_impl.hpp>
+#include <boost/fusion/adapted/detail/mpl/value_of_impl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/std_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/std_array.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_STD_ARRAY_HPP
+#define BOOST_FUSION_ADAPTED_STD_ARRAY_HPP
+
+#include <boost/config.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#define BOOST_FUSION_ADAPTED_ARRAY_TYPE struct
+//TODO!!!
+#ifdef BOOST_HAS_TR1_ARRAY
+# define BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE std::tr1
+#else
+# define BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE std
+#endif
+#include <boost/fusion/adapted/detail/array/tag_of.hpp>
+#undef BOOST_FUSION_ADAPTED_ARRAY_NAMESPACE
+#undef BOOST_FUSION_ADAPTED_ARRAY_TYPE
+
+#include <boost/fusion/adapted/detail/array/is_view_impl.hpp>
+#include <boost/fusion/adapted/detail/array/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/detail/array/category_of_impl.hpp>
+#include <boost/fusion/adapted/detail/array/begin_impl.hpp>
+#include <boost/fusion/adapted/detail/array/end_impl.hpp>
+#include <boost/fusion/adapted/detail/array/size_impl.hpp>
+#include <boost/fusion/adapted/detail/array/at_impl.hpp>
+#include <boost/fusion/adapted/detail/array/value_at_impl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/std_pair.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/std_pair.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,65 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_STD_PAIR_HPP
+#define BOOST_FUSION_ADAPTED_STD_PAIR_HPP
+
+#include <boost/fusion/adapted/struct.hpp>
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/config/no_tr1/utility.hpp>
+
+#define BOOST_FUSION_STD_PAIR_TAG_OF_SPECIALIZATION(COMBINATION, _) \
+ template <typename T1, typename T2> \
+ struct tag_of<std::pair<T1, T2> COMBINATION> \
+ { \
+ typedef struct_tag type; \
+ };
+
+namespace boost { namespace fusion { namespace traits \
+{ \
+ BOOST_FUSION_ALL_CV_REF_NON_REF_COMBINATIONS( \
+ BOOST_FUSION_STD_PAIR_TAG_OF_SPECIALIZATION,name) \
+}}} \
+
+#undef BOOST_FUSION_STD_PAIR_TAG_OF_SPECIALIZATION
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename T1, typename T2>
+ struct struct_member<std::pair<T1, T2>, 0>
+ {
+ typedef T1 type;
+
+ template<typename Pair>
+ static typename detail::forward_as<Pair&, type>::type
+ call(Pair& pair)
+ {
+ return pair.first;
+ }
+ };
+
+ template <typename T1, typename T2>
+ struct struct_member<std::pair<T1, T2>, 1>
+ {
+ typedef T2 type;
+
+ template<typename Pair>
+ static typename detail::forward_as<Pair&, type>::type
+ call(Pair& pair)
+ {
+ return pair.second;
+ }
+ };
+
+ template <typename T1, typename T2>
+ struct struct_size<std::pair<T1, T2> >
+ : mpl::int_<2>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,15 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ADAPTED_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/struct/adapt_assoc_struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/struct/adapt_assoc_struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_ASSOC_STRUCT_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/fusion/adapted/detail/struct/extension.hpp>
+#include <boost/fusion/adapted/detail/struct/adapt_base.hpp>
+#include <boost/fusion/adapted/detail/struct/adapt_assoc_struct.hpp>
+
+#include <boost/fusion/adapted/detail/struct/at_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/is_view_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/value_at_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/category_of_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/size_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/begin_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/end_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/value_of_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/deref_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/deref_data_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/key_of_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/value_of_data_impl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/adapted/struct/adapt_struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/adapted/struct/adapt_struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,26 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/fusion/adapted/detail/struct/extension.hpp>
+#include <boost/fusion/adapted/detail/struct/adapt_base.hpp>
+#include <boost/fusion/adapted/detail/struct/adapt_struct.hpp>
+
+#include <boost/fusion/adapted/detail/struct/at_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/is_view_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/value_at_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/category_of_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/size_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/begin_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/end_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/value_of_impl.hpp>
+#include <boost/fusion/adapted/detail/struct/deref_impl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,15 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_HPP
+#define BOOST_FUSION_ALGORITHM_HPP
+
+#include <boost/fusion/algorithm/iteration.hpp>
+#include <boost/fusion/algorithm/query.hpp>
+#include <boost/fusion/algorithm/transformation.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,15 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_ITERATION_HPP
+#define BOOST_FUSION_ALGORITHM_ITERATION_HPP
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/accumulate.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,55 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_ITERATION_ACCUMULATE_HPP
+#define BOOST_FUSION_ALGORITHM_ITERATION_ACCUMULATE_HPP
+
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename State, typename F>
+ struct accumulate
+ : fold<Seq, State, F>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ };
+ }
+
+ template <typename Seq, typename State, typename F>
+ inline typename result_of::accumulate<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(State)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ accumulate(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return fusion::fold(
+ BOOST_FUSION_FORWARD(Seq,seq),
+ BOOST_FUSION_FORWARD(State,state),
+ BOOST_FUSION_FORWARD(F,f));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename State, typename F>
+ inline typename
+ result_of::accumulate<Seq&, State const&, F const&>::type
+ accumulate(Seq& seq,State const& state,F const& f)
+ {
+ return fusion::fold(seq,state,f);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/fold.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,254 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_ALGORITHM_ITERATION_DETAIL_FOLD_HPP
+#define BOOST_FUSION_ALGORITHM_ITERATION_DETAIL_FOLD_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<int N>
+ struct unrolled_fold
+ {
+ template<typename Result,typename It0, typename State, typename F>
+ static Result
+ call(It0 const& it0,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1 = fusion::next(it0);
+ typedef typename result_of::next<It1&>::type It2;
+ It2 it2 = fusion::next(it1);
+ typedef typename result_of::next<It2&>::type It3;
+ It3 it3 = fusion::next(it2);
+
+ return unrolled_fold<N-4>::template call<Result>(
+ fusion::next(it3),
+ f(fusion::deref(it3),
+ f(fusion::deref(it2),
+ f(fusion::deref(it1),
+ f(fusion::deref(it0),
+ BOOST_FUSION_FORWARD(State,state)
+ )
+ )
+ )
+ ),
+ BOOST_FUSION_FORWARD(F,f));
+ }
+ };
+
+ template<>
+ struct unrolled_fold<3>
+ {
+ template<typename Result,typename It0, typename State, typename F>
+ static Result
+ call(It0 const& it0,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1 = fusion::next(it0);
+ typedef typename result_of::next<It1&>::type It2;
+ It2 it2 = fusion::next(it1);
+
+ return f(fusion::deref(it2),
+ f(fusion::deref(it1),
+ f(
+ fusion::deref(it0),
+ BOOST_FUSION_FORWARD(State,state)
+ )
+ )
+ );
+ }
+ };
+
+ template<>
+ struct unrolled_fold<2>
+ {
+ template<typename Result,typename It0, typename State, typename F>
+ static Result
+ call(It0 const& it0,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return f(fusion::deref(fusion::next(it0)),
+ f(fusion::deref(it0),
+ BOOST_FUSION_FORWARD(State,state)));
+ }
+ };
+
+ template<>
+ struct unrolled_fold<1>
+ {
+ template<typename Result,typename It0, typename State, typename F>
+ static Result
+ call(It0 const& it0,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return f(fusion::deref(it0), BOOST_FUSION_FORWARD(State,state));
+ }
+ };
+
+ template<>
+ struct unrolled_fold<0>
+ {
+ template<typename Result,typename It0, typename State, typename F>
+ static Result
+ call(It0 const&,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(F))
+ {
+ return state;
+ }
+ };
+
+ template <typename It, typename StateRef, typename FRef>
+ struct fold_apply
+ {
+ typedef typename result_of::deref<It>::type deref_type;
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ typedef typename
+ internal::result_of<
+ typename get_func_base<FRef>::type(deref_type, StateRef)
+ >::type
+ type;
+#else
+ typedef typename
+ mpl::eval_if<
+ typename is_lrref<deref_type>::type
+ , internal::result_of<
+ typename get_func_base<FRef>::type(deref_type, StateRef)
+ >
+ , internal::result_of<
+ typename get_func_base<FRef>::type(deref_type&&, StateRef)
+ >
+ >::type
+ type;
+#endif
+ };
+
+ template <typename It, typename State, typename FRef>
+ struct fold_apply_r_else_clref
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ : fold_apply<
+ It
+ , typename add_lref<typename add_const<State>::type>::type
+ , FRef
+ >
+#else
+ : fold_apply<It,State&&,FRef>
+#endif
+ {};
+
+ template<typename It0, typename StateRef, typename FRef, int N>
+ struct result_of_unrolled_fold
+ {
+ typedef typename fold_apply<It0, StateRef, FRef>::type rest1;
+ typedef typename result_of::next<It0>::type it1;
+ typedef typename fold_apply_r_else_clref<it1, rest1, FRef>::type rest2;
+ typedef typename result_of::next<it1>::type it2;
+ typedef typename fold_apply_r_else_clref<it2, rest2, FRef>::type rest3;
+ typedef typename result_of::next<it2>::type it3;
+ typedef typename fold_apply_r_else_clref<it3, rest3, FRef>::type rest4;
+ typedef typename result_of::next<it3>::type it4;
+
+ typedef typename
+ mpl::eval_if_c<
+ !(N-4)
+ , mpl::identity<rest4>
+ , result_of_unrolled_fold<
+ it4
+ , BOOST_FUSION_R_ELSE_CLREF(rest4)
+ , FRef
+ , N-4
+ >
+ >::type
+ type;
+ };
+
+ template<typename It0, typename StateRef, typename FRef>
+ struct result_of_unrolled_fold<It0, StateRef, FRef, 3>
+ {
+ typedef typename fold_apply<It0, StateRef, FRef>::type rest1;
+ typedef typename result_of::next<It0>::type it1;
+ typedef typename fold_apply_r_else_clref<it1, rest1, FRef>::type rest2;
+ typedef typename result_of::next<it1>::type it2;
+
+ typedef typename fold_apply_r_else_clref<it2, rest2, FRef>::type type;
+ };
+
+ template<typename It0, typename StateRef, typename FRef>
+ struct result_of_unrolled_fold<It0, StateRef, FRef, 2>
+ {
+ typedef typename fold_apply<It0, StateRef, FRef>::type rest;
+ typedef typename result_of::next<It0>::type it1;
+
+ typedef typename fold_apply_r_else_clref<it1, rest, FRef>::type type;
+ };
+
+ template<typename It0, typename StateRef, typename FRef>
+ struct result_of_unrolled_fold<It0, StateRef, FRef, 1>
+ {
+ typedef typename
+ fold_apply_r_else_clref<It0, StateRef, FRef>::type
+ type;
+ };
+
+ template<int SeqSize, typename It0, typename StateRef, typename FRef>
+ struct fold_impl
+ {
+ typedef typename
+ mpl::eval_if<
+ typename is_preevaluable<FRef>::type
+ , preevaluate<FRef>
+ , result_of_unrolled_fold<It0, StateRef, FRef, SeqSize>
+ >::type
+ type;
+
+ static type
+ call(It0 const& it0, StateRef state, FRef f)
+ {
+ return unrolled_fold<SeqSize>::template call<type>(
+ it0,
+ BOOST_FUSION_FORWARD(StateRef,state),
+ BOOST_FUSION_FORWARD(FRef,f));
+ }
+ };
+
+ template<typename It0, typename StateRef, typename FRef>
+ struct fold_impl<0,It0,StateRef,FRef>
+ {
+ typedef StateRef type;
+
+ static StateRef
+ call(It0 const&, StateRef state, FRef)
+ {
+ return state;
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/detail/for_each.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,99 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_ITERATION_DETAIL_FOR_EACH_HPP
+#define BOOST_FUSION_ALGORITHM_ITERATION_DETAIL_FOR_EACH_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<int N>
+ struct for_each_unrolled
+ {
+ template<typename It0, typename F>
+ static void call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1(fusion::next(it0));
+ typedef typename result_of::next<It1&>::type It2;
+ It2 it2(fusion::next(it1));
+ typedef typename result_of::next<It2&>::type It3;
+ It3 it3(fusion::next(it2));
+
+ f(fusion::deref(it0));
+ f(fusion::deref(it1));
+ f(fusion::deref(it2));
+ f(fusion::deref(it3));
+
+ for_each_unrolled<N-4>::call(
+ fusion::next(it3)
+ , BOOST_FUSION_FORWARD(F,f));
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<3>
+ {
+ template<typename It0, typename F>
+ static void call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1(fusion::next(it0));
+ typedef typename result_of::next<It1&>::type It2;
+ It2 it2(fusion::next(it1));
+
+ f(fusion::deref(it0));
+ f(fusion::deref(it1));
+ f(fusion::deref(it2));
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<2>
+ {
+ template<typename It0, typename F>
+ static void call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1(fusion::next(it0));
+
+ f(fusion::deref(it0));
+ f(fusion::deref(it1));
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<1>
+ {
+ template<typename It0, typename F>
+ static void call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ f(fusion::deref(it0));
+ }
+ };
+
+ template<>
+ struct for_each_unrolled<0>
+ {
+ template<typename It, typename F>
+ static void call(It const&, BOOST_FUSION_R_ELSE_CLREF(F))
+ {
+ }
+ };
+}}}
+
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/fold.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,82 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_ITERATION_FOLD_HPP
+#define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/algorithm/iteration/detail/fold.hpp>
+
+namespace boost { namespace fusion {
+
+ struct random_access_traversal_tag;
+
+ namespace result_of
+ {
+ template <typename Seq, typename State, typename F>
+ struct fold
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ detail::fold_impl<
+ size<Seq>::value
+ , typename begin<Seq>::type
+ , typename detail::add_lref<State>::type
+ , typename detail::add_lref<F>::type
+ >
+ gen;
+
+ typedef typename gen::type type;
+ };
+ }
+
+ template <typename Seq, typename State, typename F>
+ inline typename
+ result_of::fold<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(State)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ fold(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ BOOST_FUSION_R_ELSE_CLREF(State) state,
+ BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return
+ result_of::fold<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(State)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::gen::call(fusion::begin(seq), state, f);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename State, typename F>
+ inline typename result_of::fold<Seq&,State const&,F const&>::type
+ fold(Seq& seq,
+ State const& state,
+ F const& f)
+ {
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4180)
+#endif
+ return result_of::fold<Seq&,State const&,F const&>::gen::call(
+ fusion::begin(seq), state, f);
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/for_each.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/iteration/for_each.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,60 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_ITERATION_FOR_EACH_HPP
+#define BOOST_FUSION_ALGORITHM_ITERATION_FOR_EACH_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+
+ namespace result_of
+ {
+ template <typename Seq, typename>
+ struct for_each
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef void type;
+ };
+ }
+
+ template <typename Seq, typename F>
+ inline typename
+ result_of::for_each<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ for_each(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ detail::for_each_unrolled<
+ result_of::size<BOOST_FUSION_R_ELSE_CLREF(Seq)>::value
+ >::call(fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)),
+ BOOST_FUSION_FORWARD(F,f));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename F>
+ inline typename result_of::for_each<Seq&,F const&>::type
+ for_each(Seq& seq,F const& f)
+ {
+ detail::for_each_unrolled<result_of::size<Seq&>::value>::call(
+ fusion::begin(seq),f);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_QUERY_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_HPP
+
+#include <boost/fusion/algorithm/query/all.hpp>
+#include <boost/fusion/algorithm/query/any.hpp>
+#include <boost/fusion/algorithm/query/count_if.hpp>
+#include <boost/fusion/algorithm/query/count.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/fusion/algorithm/query/find_key.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
+#include <boost/fusion/algorithm/query/none.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/all.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/all.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,62 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_QUERY_ALL_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_ALL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/algorithm/query/detail/all.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename>
+ struct all
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef bool type;
+ };
+ }
+
+ template <typename Seq, typename F>
+ inline typename
+ result_of::all<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ all(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return
+ detail::unrolled_all<
+ result_of::size<BOOST_FUSION_R_ELSE_CLREF(Seq)>::value
+ >::call(
+ fusion::begin(BOOST_FUSION_FORWARD(Seq,seq))
+ , BOOST_FUSION_FORWARD(F,f));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename F>
+ inline typename result_of::all<Seq&, F const&>::type
+ all(Seq& seq, F const& f)
+ {
+ return
+ detail::unrolled_all<
+ result_of::size<Seq const&>::value
+ >::call(fusion::begin(seq), f);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/any.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,76 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_QUERY_ANY_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_ANY_HPP
+
+#include <boost/fusion/algorithm/query/all.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename FRef>
+ struct any_helper
+ {
+ typedef bool result_type;
+
+ any_helper(FRef f)
+ : f(f)
+ {}
+
+ template<typename E>
+ inline bool
+ operator()(BOOST_FUSION_R_ELSE_CLREF(E) e)const
+ {
+ return !f(BOOST_FUSION_FORWARD(E,e));
+ }
+
+ FRef f;
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename>
+ struct any
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef bool type;
+ };
+ }
+
+ template <typename Seq, typename F>
+ inline typename
+ result_of::any<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ any(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return !fusion::all(
+ BOOST_FUSION_FORWARD(Seq,seq),
+ detail::any_helper<BOOST_FUSION_R_ELSE_CLREF(F)>(f));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename F>
+ inline typename result_of::any<Seq&,F const&>::type
+ any(Seq& seq, F const& f)
+ {
+ return !fusion::all(seq,detail::any_helper<F const&>(f));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,55 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007
+
+ 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_FUSION_ALGORITHM_QUERY_COUNT_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_COUNT_HPP
+
+#include <boost/fusion/algorithm/query/count_if.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/algorithm/query/detail/count.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename>
+ struct count
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef int type;
+ };
+ }
+
+ template <typename Seq, typename T>
+ inline typename
+ result_of::count<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type
+ count(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(T) x)
+ {
+ return fusion::count_if(
+ BOOST_FUSION_FORWARD(Seq,seq),
+ detail::count_helper<BOOST_FUSION_R_ELSE_CLREF(T)>(x));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename T>
+ inline typename result_of::count<Seq&, T const&>::type
+ count(Seq& seq, T const& x)
+ {
+ return fusion::count_if(seq,detail::count_helper<T const&>(x));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/count_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,77 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_QUERY_COUNT_IF_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_COUNT_IF_HPP
+
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename FRef>
+ struct count_if_helper
+ {
+ typedef int result_type;
+
+ count_if_helper(FRef f)
+ : f(f)
+ {}
+
+ template<typename E>
+ inline int
+ operator()(BOOST_FUSION_R_ELSE_CLREF(E) e, int count)const
+ {
+ return f(BOOST_FUSION_FORWARD(E,e)) ? ++count : count;
+ }
+
+ FRef f;
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename>
+ struct count_if
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef int type;
+ };
+ }
+
+ template <typename Seq, typename F>
+ inline typename
+ result_of::count_if<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ count_if(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return fold(BOOST_FUSION_FORWARD(Seq,seq),
+ 0,
+ detail::count_if_helper<BOOST_FUSION_R_ELSE_CLREF(F)>(f));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename F>
+ inline typename result_of::count_if<Seq&,F const&>::type
+ count_if(Seq& seq, F const& f)
+ {
+ return fold(seq,
+ 0,
+ detail::count_if_helper<F const&>(f));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/all.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,126 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_QUERY_DETAIL_ALL_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_DETAIL_ALL_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<int N>
+ struct unrolled_all
+ {
+ template <typename It0, typename F>
+ static bool
+ call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ if(!f(fusion::deref(it0)))
+ {
+ return false;
+ }
+
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1 = fusion::next(it0);
+ if(!f(fusion::deref(it1)))
+ {
+ return false;
+ }
+
+ typedef typename result_of::next<It1&>::type It2;
+ It2 it2 = fusion::next(it1);
+ if(!f(fusion::deref(it2)))
+ {
+ return false;
+ }
+
+ typedef typename result_of::next<It2&>::type It3;
+ It3 it3 = fusion::next(it3);
+ if(!f(fusion::deref(it3)))
+ {
+ return false;
+ }
+
+ return unrolled_all<N-4>::call(
+ fusion::next(it3)
+ , BOOST_FUSION_FORWARD(F,f));
+ }
+ };
+
+ template<>
+ struct unrolled_all<3>
+ {
+ template <typename It0, typename F>
+ static bool
+ call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ if(!f(fusion::deref(it0)))
+ {
+ return false;
+ }
+
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1 = fusion::next(it0);
+ if(!f(fusion::deref(it1)))
+ {
+ return false;
+ }
+
+ typedef typename result_of::next<It1&>::type It2;
+ It2 it2 = fusion::next(it1);
+ return f(fusion::deref(it2));
+ }
+ };
+
+ template<>
+ struct unrolled_all<2>
+ {
+ template <typename It0, typename F>
+ static bool
+ call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ if(!f(fusion::deref(it0)))
+ {
+ return false;
+ }
+
+ typedef typename result_of::next<It0 const&>::type It1;
+ It1 it1 = fusion::next(it0);
+ return f(fusion::deref(it1));
+ }
+ };
+
+ template<>
+ struct unrolled_all<1>
+ {
+ template <typename It0, typename F>
+ static bool
+ call(It0 const& it0, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return f(fusion::deref(it0));
+ }
+ };
+
+ template<>
+ struct unrolled_all<0>
+ {
+ template <typename It0, typename F>
+ static bool
+ call(It0 const& it0, F const& f)
+ {
+ return false;
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/count.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_QUERY_DETAIL_COUNT_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_DETAIL_COUNT_HPP
+
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <bool is_convertible>
+ struct compare_convertible;
+
+ // T1 is convertible to T2 or vice versa
+ template <>
+ struct compare_convertible<true>
+ {
+ template <typename T1, typename T2>
+ static bool
+ call(BOOST_FUSION_R_ELSE_CLREF(T1) x, BOOST_FUSION_R_ELSE_CLREF(T2) y)
+ {
+ return BOOST_FUSION_FORWARD(T1,x) == BOOST_FUSION_FORWARD(T2,y);
+ }
+ };
+
+ // T1 is NEITHER convertible to T2 NOR vice versa
+ template <>
+ struct compare_convertible<false>
+ {
+ template <typename T1, typename T2>
+ static bool
+ call(BOOST_FUSION_R_ELSE_CLREF(T1) x, BOOST_FUSION_R_ELSE_CLREF(T2) y)
+ {
+ return false;
+ }
+ };
+
+ template <typename T1Ref>
+ struct count_helper
+ {
+ count_helper(T1Ref x)
+ : x(x)
+ {}
+
+ template <typename T2>
+ bool
+ operator()(BOOST_FUSION_R_ELSE_CLREF(T2) y)const
+ {
+ typedef typename remove_reference<T1Ref>::type T1_nonref;
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ typedef T2 T2_nonref;
+#else
+ typedef typename remove_reference<T2>::type T2_nonref;
+#endif
+
+ typedef
+ compare_convertible<
+ mpl::or_<
+ is_convertible<T1_nonref, T2_nonref>
+ , is_convertible<T2_nonref, T1_nonref>
+ >::value
+ >
+ gen;
+
+ return gen::call(
+ BOOST_FUSION_FORWARD(T1Ref,x),
+ BOOST_FUSION_FORWARD(T2,y));
+ }
+
+ T1Ref x;
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/detail/find_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,223 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_QUERY_DETAIL_FIND_IF_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_DETAIL_FIND_IF_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/advance_c.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion {
+ struct random_access_traversal_tag;
+
+ namespace detail
+ {
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if;
+
+ template <typename First, typename Last, typename Pred>
+ struct recursive_find_if
+ {
+ typedef typename
+ main_find_if<
+ typename result_of::next<First>::type
+ , Last
+ , Pred
+ >::type
+ type;
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct main_find_if
+ {
+ typedef typename
+ mpl::eval_if<
+ mpl::or_<
+ result_of::equal_to<First, Last>
+ , mpl::apply1<Pred,First>
+ >
+ , mpl::identity<First>
+ , recursive_find_if<First, Last, Pred>
+ >::type
+ type;
+ };
+
+ template<typename First, typename Last, typename Pred, bool>
+ struct choose_find_if;
+
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, false>
+ : main_find_if<First, Last, Pred>
+ {};
+
+ template<typename It, typename Pred, int N>
+ struct unroll_again;
+
+ template <typename It, typename Pred, int Offset>
+ struct apply_offset_filter
+ : mpl::apply1<
+ Pred
+ , typename result_of::advance_c<It, Offset>::type
+ >::type
+ {};
+
+ template<typename It, typename Pred, int N>
+ struct unrolled_find_if
+ {
+ typedef typename
+ mpl::eval_if<
+ typename mpl::apply1<Pred,It>::type
+ , mpl::identity<It>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 1>
+ , result_of::next<It>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 2>
+ , result_of::advance_c<It, 2>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 3>
+ , result_of::advance_c<It, 3>
+ , unroll_again<
+ It
+ , Pred
+ , N
+ >
+ >
+ >
+ >
+ >::type
+ type;
+ };
+
+ template<typename It, typename Pred, int n>
+ struct unroll_again
+ {
+ typedef typename
+ unrolled_find_if<
+ typename result_of::advance_c<It, 4>::type
+ , Pred
+ , n-4
+ >::type
+ type;
+ };
+
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 3>
+ {
+ typedef typename
+ mpl::eval_if<
+ typename mpl::apply1<Pred,It>::type
+ , mpl::identity<It>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 1>
+ , result_of::next<It>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 2>
+ , result_of::advance_c<It, 2>
+ , result_of::advance_c<It, 3>
+ >
+ >
+ >::type
+ type;
+ };
+
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 2>
+ {
+ typedef typename
+ mpl::eval_if<
+ typename mpl::apply1<Pred,It>::type
+ , mpl::identity<It>
+ , mpl::eval_if<
+ apply_offset_filter<It, Pred, 1>
+ , result_of::next<It>
+ , result_of::advance_c<It, 2>
+ >
+ >::type
+ type;
+ };
+
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 1>
+ {
+ typedef typename
+ mpl::eval_if<
+ typename mpl::apply1<Pred,It>::type
+ , mpl::identity<It>
+ , result_of::next<It>
+ >::type
+ type;
+ };
+
+ template<typename It, typename Pred>
+ struct unrolled_find_if<It, Pred, 0>
+ {
+ typedef It type;
+ };
+
+ template<typename First, typename Last, typename Pred>
+ struct choose_find_if<First, Last, Pred, true>
+ {
+ typedef typename
+ unrolled_find_if<
+ First
+ , Pred
+ , result_of::distance<First, Last>::value
+ >::type
+ type;
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct static_find_if
+ {
+ typedef typename
+ choose_find_if<
+ First
+ , Last
+ , Pred
+ , traits::is_random_access<First>::type::value
+ >::type
+ type;
+
+ template <typename It>
+ static type
+ call(It const& it)
+ {
+ return
+ fusion::advance<
+ typename result_of::distance<It, type>::type
+ >(it);
+ }
+ };
+
+ template <typename First, typename Last, typename Pred>
+ struct static_seq_find_if
+ : static_find_if<First, Last, Pred>
+ {
+ template <typename Seq>
+ static typename static_find_if<First, Last, Pred>::type
+ call(BOOST_FUSION_R_ELSE_LREF(Seq) seq)
+ {
+ return static_find_if<First, Last, Pred>::call(
+ fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)));
+ }
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_QUERY_FIND_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_FIND_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/mpl/placeholders.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename T>
+ struct find
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ detail::static_seq_find_if<
+ typename begin<Seq>::type
+ , typename end<Seq>::type
+ , is_same<value_of<mpl::_1>, T>
+ >
+ filter;
+
+ typedef typename filter::type type;
+ };
+ }
+
+ template <typename T, typename Seq>
+ inline typename
+ result_of::find<BOOST_FUSION_R_ELSE_CLREF(Seq), T>::type const
+ find(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return
+ result_of::find<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , T
+ >::filter::call(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename T, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::find<,Seq,&, T>) const
+ find(Seq& seq)
+ {
+ return result_of::find<Seq&, T>::filter::call(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,72 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_QUERY_FIND_IF_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_FIND_IF_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/mpl/quote.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/bind.hpp>
+#include <boost/mpl/placeholders.hpp>
+
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename Pred>
+ struct find_if
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ detail::static_find_if<
+ typename begin<Seq>::type
+ , typename end<Seq>::type
+ , mpl::bind1<
+ typename mpl::lambda<Pred>::type
+ , mpl::bind1<mpl::quote1<value_of>,mpl::_1>
+ >
+ >
+ gen;
+
+ typedef typename gen::type type;
+ };
+ }
+
+ template <typename Pred, typename Seq>
+ inline typename
+ result_of::find_if<BOOST_FUSION_R_ELSE_CLREF(Seq), Pred>::type
+ find_if(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return
+ result_of::find_if<
+ BOOST_FUSION_R_ELSE_CLREF(Seq), Pred
+ >::gen::call(fusion::begin(seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Pred, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::find_if<,Seq,&,Pred>)
+ find_if(Seq& seq)
+ {
+ return result_of::find_if<Seq&, Pred>::gen::call(fusion::begin(seq));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/find_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,67 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_QUERY_FIND_KEY_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_FIND_KEY_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/key_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename T>
+ struct find_key
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ detail::static_seq_find_if<
+ typename begin<Seq>::type
+ , typename end<Seq>::type
+ , is_same<key_of<mpl::_1>, T>
+ >
+ filter;
+
+ typedef typename filter::type type;
+ };
+ }
+
+ template <typename T, typename Seq>
+ inline typename
+ result_of::find_key<BOOST_FUSION_R_ELSE_CLREF(Seq), T>::type const
+ find_key(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return
+ result_of::find_key<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , T
+ >::filter::call(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename T, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::find_key<,Seq,&, T>) const
+ find_key(Seq& seq)
+ {
+ return result_of::find_key<Seq&, T>::filter::call(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/none.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/query/none.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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_FUSION_ALGORITHM_QUERY_NONE_HPP
+#define BOOST_FUSION_ALGORITHM_QUERY_NONE_HPP
+
+#include <boost/fusion/algorithm/query/any.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename F>
+ struct none
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef bool type;
+ };
+ }
+
+ template <typename Seq, typename F>
+ inline typename
+ result_of::none<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ none(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return !fusion::any(
+ BOOST_FUSION_FORWARD(Seq,seq),
+ BOOST_FUSION_FORWARD(F,f));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename F>
+ inline typename result_of::none<Seq&, F const&>::type
+ none(Seq& seq, F const& f)
+ {
+ return !fusion::any(seq,f);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,31 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_HPP
+
+#include <boost/fusion/algorithm/transformation/clear.hpp>
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+#include <boost/fusion/algorithm/transformation/filter_if.hpp>
+#include <boost/fusion/algorithm/transformation/filter.hpp>
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+#include <boost/fusion/algorithm/transformation/insert.hpp>
+#include <boost/fusion/algorithm/transformation/join.hpp>
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/algorithm/transformation/push_front.hpp>
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+#include <boost/fusion/algorithm/transformation/remove.hpp>
+#include <boost/fusion/algorithm/transformation/replace_if.hpp>
+#include <boost/fusion/algorithm/transformation/replace.hpp>
+#include <boost/fusion/algorithm/transformation/reverse.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/clear.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/clear.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,49 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_CLEAR_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_CLEAR_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/vector/vector.hpp>
+#else
+# include <boost/fusion/container/vector/vector10.hpp>
+#endif
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ //TODO doc!!!
+ template <typename Seq>
+ struct clear
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+ : convert<typename traits::tag_of<Seq>::type, vector0<> >
+#else
+ : convert<typename traits::tag_of<Seq>::type, vector<> >
+#endif
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::clear<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ clear(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename
+ result_of::clear<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type();
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,80 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+#include <boost/fusion/algorithm/transformation/detail/filter_key_view/filter_key_view_fwd.hpp>
+#include <boost/fusion/algorithm/transformation/detail/filter_key_view/has_key_impl.hpp>
+#include <boost/fusion/algorithm/transformation/detail/filter_key_view/at_key_impl.hpp>
+#include <boost/fusion/algorithm/transformation/detail/filter_key_view/value_at_key_impl.hpp>
+
+//TODO: test
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ namespace detail
+ {
+ template <typename Seq, typename Pred>
+ struct filter_key_view
+ : sequence_base<filter_key_view<Seq, Pred> >
+ {
+ typedef view_storage<Seq> storage_type;
+ typedef typename storage_type::type seq_type;
+ typedef Pred pred_type;
+
+ typedef associative_sequence_tag category;
+ typedef filter_key_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+
+#define BOOST_FUSION_FILTER_KEY_VIEW_CTOR(COMBINATION,_)\
+ template<typename OtherSeq>\
+ filter_key_view(filter_key_view<OtherSeq,Pred> COMBINATION view)\
+ : seq(static_cast<filter_key_view<OtherSeq,Pred>COMBINATION>(\
+ view).seq)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(
+ BOOST_FUSION_FILTER_KEY_VIEW_CTOR,_)
+
+#undef BOOST_FUSION_FILTER_KEY_VIEW_CTOR
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ explicit
+ filter_key_view(typename storage_type::call_param seq)
+ : seq(seq)
+ {}
+#else
+ template<typename OtherSeq>
+ explicit
+ filter_key_view(OtherSeq&& seq)
+ : seq(std::forward<OtherSeq>(seq))
+ {}
+#endif
+
+ template<typename OtherFilterKeyView>
+ filter_key_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherFilterKeyView) other_view)
+ {
+ seq=BOOST_FUSION_FORWARD(OtherFilterKeyView,other_view).seq;
+ return *this;
+ }
+
+ detail::view_storage<Seq> seq;
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/at_key_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/at_key_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,41 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_AT_KEY_IMPL_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_AT_KEY_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct at_key_impl;
+
+ template <>
+ struct at_key_impl<detail::filter_key_view_tag>
+ {
+ template <typename SeqRef,typename Key>
+ struct apply
+ {
+ typedef typename
+ result_of::at_key<
+ typename detail::forward_as<
+ SeqRef
+ , typename detail::remove_reference<SeqRef>::type_seq_type
+ >::type
+ , Key
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return at_key<Key>(seq.seq.get());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/filter_key_view_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/filter_key_view_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_FILTER_KEY_VIEW_FWD_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_FILTER_KEY_VIEW_FWD_HPP
+
+namespace boost { namespace fusion { namespace detail
+{
+ struct filter_key_view_tag;
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/has_key_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/has_key_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_HAS_KEY_IMPL_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_HAS_KEY_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct has_key;
+
+ template <>
+ struct has_key<detail::filter_key_view_tag>
+ {
+ template <typename SeqRef,typename Key>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef typename
+ mpl::eval_if<
+ mpl::apply1<typename seq::pred_type,Key>
+ , mpl::identity<mpl::false_>
+ , result_of::has_key<typename seq::storage_type,Key>
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/value_at_key_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/filter_key_view/value_at_key_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_VALUE_AT_KEY_IMPL_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_FILTER_KEY_VIEW_VALUE_AT_KEY_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_at_key;
+
+ template <>
+ struct value_at_key<detail::filter_key_view_tag>
+ {
+ template <typename SeqRef,typename Key>
+ struct apply
+ {
+ typedef typename
+ result_of::value_at_key<
+ typename detail::remove_reference<SeqRef>::type_seq_type
+ , Key
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/is_in_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/is_in_seq.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,54 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_DETAIL_IS_IN_SEQ_HPP
+#define BOOST_FUSION_SUPPORT_DETAIL_IS_IN_SEQ_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/begin.hpp>
+# include <boost/fusion/sequence/intrinsic/end.hpp>
+# include <boost/fusion/iterator/next.hpp>
+# include <boost/fusion/iterator/next.hpp>
+# include <boost/fusion/iterator/equal_to.hpp>
+
+# include <boost/mpl/bool.hpp>
+# include <boost/mpl/identity.hpp>
+# include <boost/mpl/eval_if.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename It, typename Begin,typename End>
+ struct next_is_in_range;
+
+ template<typename It, typename Begin,typename End>
+ struct is_in_range
+ : mpl::eval_if<
+ result_of::equal_to<It,Begin>
+ , mpl::identity<mpl::true_>
+ , mpl::eval_if<
+ result_of::equal_to<Begin,End>
+ , mpl::identity<mpl::false_>
+ , next_is_in_range<It,Begin,End>
+ >
+ >::type
+ {};
+
+ template<typename It, typename Begin,typename End>
+ struct next_is_in_range
+ : is_in_range<It,typename result_of::next<Begin>::type,End>
+ {};
+
+ template<typename It, typename Seq>
+ struct is_in_seq
+ : is_in_range<
+ It
+ , typename result_of::begin<Seq>::type
+ , typename result_of::end<Seq>::type
+ >
+ {};
+}}}
+
+#endif
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/pp/zip.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/pp/zip.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,86 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_PP_ZIP_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_PP_ZIP_HPP
+
+#include <boost/fusion/container/generation/vector_tie.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/repetition/repeat.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_ZIP_SEQUENCES)
+ struct zip;
+ }
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/algorithm/transformation/detail/pp/zip.hpp>
+#define BOOST_PP_ITERATION_LIMITS (2, FUSION_MAX_ZIP_SEQUENCES)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+#else
+
+#define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ VARIADIC_TEMPLATE(BOOST_FUSION_N)
+ struct zip
+ EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION(
+ FUSION_MAX_ZIP_SEQUENCES,BOOST_FUSION_N)
+ {
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERS
+#define BOOST_FUSION_IS_FORWARD_ASSERT(Z,N,_)\
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<BOOST_PP_CAT(T,N)>));
+
+ BOOST_PP_REPEAT(BOOST_FUSION_N,BOOST_FUSION_IS_FORWARD_ASSERT,_)
+
+#undef BOOST_FUSION_IS_FORWARD_ASSERT
+#endif
+
+ typedef
+ zip_view<
+ typename result_of::vector_tie<
+ EXPAND_TEMPLATE_ARGUMENTS(BOOST_FUSION_N)
+ >::type
+ >
+ type;
+ };
+ }
+
+ VARIADIC_TEMPLATE_A(BOOST_FUSION_N)
+ inline
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::zip<
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_CLREF(BOOST_FUSION_N)
+ >::type
+ zip(EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_CLREF(BOOST_FUSION_N))
+ {
+ return
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::zip<
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_CLREF(BOOST_FUSION_N)
+ >::type(fusion::vector_tie(EXPAND_PARAMETERS_A(BOOST_FUSION_N)));
+ }
+
+#undef BOOST_FUSION_N
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/replace_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,92 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_REPLACE_IF_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_REPLACE_IF_HPP
+
+#include <boost/fusion/support/internal/result_of.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename F, typename NewValue>
+ struct replace_if_helper
+ {
+ template<typename Params>
+ struct result;
+
+ template<typename Self, typename U>
+ struct result<Self(U)>
+ {
+ typedef U type;
+ };
+
+ template<typename OtherF, typename OtherNewValue>
+ replace_if_helper(
+ BOOST_FUSION_R_ELSE_CLREF(OtherF) f,
+ BOOST_FUSION_R_ELSE_CLREF(OtherNewValue) new_value)
+ : f(BOOST_FUSION_FORWARD(OtherF,f))
+ , new_value(BOOST_FUSION_FORWARD(OtherNewValue,new_value))
+ {}
+
+ template<typename Replacer>
+ replace_if_helper(BOOST_FUSION_R_ELSE_CLREF(Replacer) replacer)
+ : f(BOOST_FUSION_FORWARD(Replacer,replacer).f)
+ , new_value(BOOST_FUSION_FORWARD(Replacer,replacer).new_value)
+ {}
+
+ template<typename Replacer>
+ replace_if_helper&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Replacer) replacer)
+ {
+ f=BOOST_FUSION_FORWARD(Replacer,replacer).f;
+ new_value=BOOST_FUSION_FORWARD(Replacer,replacer).new_value;
+ return *this;
+ }
+
+ template <typename U>
+ U&
+ call_impl(U& x, mpl::false_) const
+ {
+ return x;
+ }
+
+ template <typename U>
+ U&
+ call_impl(U& x, mpl::true_) const
+ {
+ if(f(x))
+ {
+ return new_value;
+ }
+
+ return x;
+ }
+
+ template <typename U>
+ typename result<replace_if_helper(U&)>::type
+ operator()(U& x) const
+ {
+ //TODO cschmidt: update doc. according to real behavior!
+ return call_impl(
+ x,
+ typename is_convertible<
+ typename detail::remove_reference<NewValue>::type*
+ , U*
+ >::type());
+ }
+
+ F f;
+ mutable typename remove_const<NewValue>::type new_value;
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/variadic_templates/zip.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/detail/variadic_templates/zip.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,46 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_VARIADIC_TEMPLATES_ZIP_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_DETAIL_VARIADIC_TEMPLATES_ZIP_HPP
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/generation/vector_tie.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/mpl/and.hpp>
+#endif
+
+namespace boost { namespace fusion {
+
+ namespace result_of
+ {
+ template<typename... Seqs>
+ struct zip
+ {
+ //TODO variadic template to fixed length macro!!!
+ //BOOST_FUSION_MPL_ASSERT((mpl::and_<traits::is_forward<Seqs>...>));
+
+ typedef
+ zip_view<typename result_of::vector_tie<Seqs...>::type>
+ type;
+ };
+ }
+
+ template<typename... Seqs>
+ inline typename result_of::zip<BOOST_FUSION_R_ELSE_CLREF(Seqs)...>::type
+ zip(BOOST_FUSION_R_ELSE_CLREF(Seqs)... seqs)
+ {
+ return typename
+ result_of::zip<BOOST_FUSION_R_ELSE_CLREF(Seqs)...>::type(
+ vector_tie(seqs...));
+ }
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,185 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_ERASE_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_ERASE_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/algorithm/transformation/detail/is_in_seq.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Seq, typename FirstRef>
+ struct compute_erase_last
+ {
+ typedef typename result_of::end<Seq>::type last_type;
+
+ typedef typename
+ mpl::eval_if<
+ result_of::equal_to<FirstRef, last_type>
+ , mpl::identity<FirstRef>
+ , result_of::next<FirstRef>
+ >::type
+ type;
+
+ static type
+ call(FirstRef first, mpl::false_)
+ {
+ return fusion::next(first);
+ }
+
+ static type
+ call(FirstRef first, mpl::true_)
+ {
+ return first;
+ }
+
+ static type
+ call(FirstRef first)
+ {
+ return call(first,
+ result_of::equal_to<FirstRef, last_type>());
+ }
+ };
+ }
+
+ namespace result_of
+ {
+ template <
+ typename Seq
+ , typename First
+ , typename Last =
+ typename detail::compute_erase_last<
+ Seq
+ , typename detail::add_lref<First>::type
+ >::type
+ >
+ struct erase
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<First>));
+ BOOST_FUSION_MPL_ASSERT((detail::is_in_seq<First, Seq>));
+ BOOST_FUSION_MPL_ASSERT((
+ detail::is_in_range<
+ Last
+ , First
+ , typename result_of::end<Seq>::type
+ >));
+
+ typedef typename begin<Seq>::type seq_first_type;
+ typedef typename end<Seq>::type seq_last_type;
+ typedef
+ iterator_range<
+ seq_first_type
+ , typename detail::identity<First>::type
+ >
+ left_type;
+ typedef
+ iterator_range<
+ typename detail::identity<Last>::type
+ , seq_last_type
+ >
+ right_type;
+
+ typedef
+ joint_view<left_type, right_type>
+ type;
+ };
+ }
+
+ template <typename Seq, typename First, typename Last>
+ typename result_of::erase<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , First const&
+ , Last const&
+ >::type
+ erase(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ First const& first,
+ Last const& last)
+ {
+ typedef
+ result_of::erase<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , First const&
+ , Last const&
+ >
+ result;
+ typedef typename result::left_type left_type;
+ typedef typename result::right_type right_type;
+ typedef typename result::type result_type;
+
+ return result_type(
+ left_type(
+ fusion::begin(seq)
+ , first
+ )
+ , right_type(
+ last
+ , fusion::end(seq)
+ ));
+ }
+
+ template <typename Seq, typename First>
+ typename result_of::erase<BOOST_FUSION_R_ELSE_CLREF(Seq), First const&>::type
+ erase(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, First const& first)
+ {
+ return erase(
+ BOOST_FUSION_FORWARD(Seq,seq)
+ , first
+ , detail::compute_erase_last<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , First const&
+ >::call(first));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename First, typename Last>
+ typename result_of::erase<Seq&, First const&, Last const&>::type
+ erase(Seq& seq,First const& first,Last const& last)
+ {
+ typedef result_of::erase<Seq&, First const&, Last const&> result;
+ typedef typename result::left_type left_type;
+ typedef typename result::right_type right_type;
+ typedef typename result::type result_type;
+
+ return result_type(
+ left_type(
+ fusion::begin(seq)
+ , first
+ )
+ , right_type(
+ last
+ , fusion::end(seq)
+ ));
+ }
+
+ template <typename Seq, typename First>
+ typename result_of::erase<Seq&, First const&>::type
+ erase(Seq& seq, First const& first)
+ {
+ return erase(
+ seq
+ , first
+ , detail::compute_erase_last<Seq&, First const&>::call(first));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/erase_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,95 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_ERASE_KEY_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_ERASE_KEY_HPP
+
+#include <boost/fusion/algorithm/query/find_key.hpp>
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#endif
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/fusion/algorithm/transformation/detail/filter_key_view.hpp>
+
+//TODO doc singular?!
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename Key>
+ struct erase_key
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_associative<Seq>));
+ BOOST_FUSION_MPL_ASSERT((has_key<Seq,Key>));
+
+ typedef typename
+ mpl::eval_if<
+ traits::is_forward<Seq>
+ , erase<
+ Seq
+ , typename find_key<
+ typename detail::add_lref<Seq>::type
+ , Key
+ >::type
+ >
+ , mpl::identity<
+ detail::filter_key_view<Seq,is_same<mpl::_1,Key> >
+ >
+ >::type
+ type;
+
+ static type
+ call_impl(Seq seq,mpl::true_ /*is_forward*/)
+ {
+ return fusion::erase(seq,fusion::find_key<Key>(seq));
+ }
+
+ static type
+ call_impl(Seq seq,mpl::false_ /*is_forward*/)
+ {
+ return type(seq);
+ }
+
+ static type
+ call(Seq seq)
+ {
+ return call_impl(seq,typename traits::is_forward<Seq>::type());
+ }
+ };
+ }
+
+ template <typename Key, typename Seq>
+ inline typename
+ result_of::erase_key<BOOST_FUSION_R_ELSE_CLREF(Seq), Key>::type
+ erase_key(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return
+ result_of::erase_key<BOOST_FUSION_R_ELSE_CLREF(Seq), Key>::call(
+ seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Key, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::erase_key<,Seq,&, Key>)
+ erase_key(Seq& seq)
+ {
+ return result_of::erase_key<Seq&, Key>::call(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,51 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_FILTER_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_FILTER_HPP
+
+#include <boost/fusion/algorithm/transformation/filter_if.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/mpl/placeholders.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename T>
+ struct filter
+ : filter_if<Seq, is_same<mpl::_1, T> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ };
+ }
+
+ template <typename T, typename Seq>
+ inline typename result_of::filter<BOOST_FUSION_R_ELSE_CLREF(Seq), T>::type
+ filter(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return filter_if<is_same<mpl::_1, T> >(BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename T, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::filter<,Seq,&, T>)
+ filter(Seq& seq)
+ {
+ return filter_if<is_same<mpl::_1, T> >(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/filter_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,51 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_FILTER_IF_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_FILTER_IF_HPP
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename Pred>
+ struct filter_if
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef filter_view<Seq, Pred> type;
+ };
+ }
+
+ template <typename Pred, typename Seq>
+ inline typename
+ result_of::filter_if<BOOST_FUSION_R_ELSE_CLREF(Seq), Pred>::type
+ filter_if(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename
+ result_of::filter_if<BOOST_FUSION_R_ELSE_CLREF(Seq), Pred>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Pred, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::filter_if<,Seq,&, Pred>)
+ filter_if(Seq& seq)
+ {
+ return typename result_of::filter_if<Seq&, Pred>::type(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_INSERT_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_INSERT_HPP
+
+#include <boost/fusion/view/single_view/single_view.hpp>
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/algorithm/transformation/detail/is_in_seq.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename Pos, typename T>
+ struct insert
+ : insert_range<
+ Seq
+ , Pos
+ , BOOST_FUSION_R_ELSE_CLREF(
+ single_view<typename detail::as_fusion_element<T>::type>)
+ >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<Pos>));
+ BOOST_FUSION_MPL_ASSERT((detail::is_in_seq<Pos, Seq>));
+ };
+ }
+
+ template <typename Seq, typename Pos, typename T>
+ inline typename
+ result_of::insert<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , Pos const&
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type
+ insert(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ Pos const& pos,
+ BOOST_FUSION_R_ELSE_CLREF(T) x)
+ {
+ return insert_range(
+ BOOST_FUSION_FORWARD(Seq,seq)
+ , pos
+ , fusion::make_single_view(BOOST_FUSION_FORWARD(T,x)));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename Pos, typename T>
+ inline typename result_of::insert<Seq&, Pos const&, T const&>::type
+ insert(Seq& seq,Pos const& pos,T const& x)
+ {
+ return insert_range(seq, pos, fusion::make_single_view(x));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/insert_range.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,109 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_INSERT_RANGE_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_INSERT_RANGE_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/algorithm/transformation/detail/is_in_seq.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename Pos, typename Range>
+ struct insert_range
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<Pos>));
+ BOOST_FUSION_MPL_ASSERT((detail::is_in_seq<Pos, Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Range>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Range>));
+
+ typedef
+ iterator_range<
+ typename begin<Seq>::type
+ , typename detail::identity<Pos>::type
+ >
+ left_type;
+ typedef
+ iterator_range<
+ typename detail::identity<Pos>::type
+ , typename end<Seq>::type
+ >
+ right_type;
+ typedef
+ joint_view<
+ left_type
+ , typename detail::add_lref<Range>::type
+ >
+ left_insert_type;
+
+ typedef joint_view<left_insert_type, right_type> type;
+ };
+ }
+
+#define BOOST_FUSION_INSERT_RANGE(SEQ_CV_REF_MODIFIER,RANGE_CV_REF_MODIFIER)\
+ template <typename Seq, typename Pos, typename Range>\
+ inline typename\
+ result_of::insert_range<\
+ Seq SEQ_CV_REF_MODIFIER\
+ , Pos const&\
+ , Range RANGE_CV_REF_MODIFIER\
+ >::type\
+ insert_range(Seq SEQ_CV_REF_MODIFIER seq,\
+ Pos const& pos,\
+ Range RANGE_CV_REF_MODIFIER range)\
+ {\
+ typedef\
+ result_of::insert_range<\
+ Seq SEQ_CV_REF_MODIFIER\
+ , Pos const&\
+ , Range RANGE_CV_REF_MODIFIER\
+ >\
+ result;\
+ typedef typename result::left_type left_type;\
+ typedef typename result::right_type right_type;\
+ typedef typename result::left_insert_type left_insert_type;\
+ \
+ return typename result::type(\
+ left_insert_type(\
+ left_type(\
+ fusion::begin(seq),\
+ pos\
+ ),\
+ BOOST_FUSION_FORWARD(Range RANGE_CV_REF_MODIFIER,range)\
+ ),\
+ right_type(\
+ pos,\
+ fusion::end(seq)\
+ )\
+ );\
+ }
+
+ BOOST_FUSION_INSERT_RANGE(
+ BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()),
+ BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()));
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_FUSION_INSERT_RANGE(&,const&);
+ BOOST_FUSION_INSERT_RANGE(const&,&);
+ BOOST_FUSION_INSERT_RANGE(&,&);
+#endif
+
+#undef BOOST_FUSION_INSERT_RANGE
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/join.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_JOIN_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_JOIN_HPP
+
+#include <boost/fusion/view/joint_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+
+namespace boost { namespace fusion {
+
+ namespace result_of
+ {
+ template<typename Seq1, typename Seq2>
+ struct join
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ typedef joint_view<Seq1,Seq2> type;
+ };
+ }
+
+#define BOOST_FUSION_JOIN(SEQ1_CV_REF_MODIFIER,SEQ2_CV_REF_MODIFIER)\
+ template<typename Seq1, typename Seq2>\
+ inline typename\
+ result_of::join<\
+ Seq1 SEQ1_CV_REF_MODIFIER\
+ , Seq2 SEQ2_CV_REF_MODIFIER\
+ >::type\
+ join(Seq1 SEQ1_CV_REF_MODIFIER seq1,\
+ Seq2 SEQ2_CV_REF_MODIFIER seq2)\
+ {\
+ return typename\
+ result_of::join<\
+ Seq1 SEQ1_CV_REF_MODIFIER\
+ , Seq2 SEQ2_CV_REF_MODIFIER\
+ >::type(BOOST_FUSION_FORWARD(Seq1 SEQ1_CV_REF_MODIFIER,seq1)\
+ , BOOST_FUSION_FORWARD(Seq2 SEQ2_CV_REF_MODIFIER,seq2));\
+ }
+
+ BOOST_FUSION_JOIN(
+ BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()),
+ BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()));
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_FUSION_JOIN(&,const&);
+ BOOST_FUSION_JOIN(const&,&);
+ BOOST_FUSION_JOIN(&,&);
+#endif
+
+#undef BOOST_FUSION_JOIN
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_POP_BACK_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_POP_BACK_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/empty.hpp>
+#endif
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq>
+ struct pop_back
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ BOOST_FUSION_MPL_ASSERT_NOT((empty<Seq>));
+
+ typedef
+ iterator_range<
+ typename begin<Seq>::type
+ , typename prior<typename end<Seq>::type>::type
+ >
+ type;
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::pop_back<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ pop_back(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename
+ result_of::pop_back<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type(
+ fusion::begin(seq)
+ , fusion::prior(fusion::end(seq)));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq>
+ inline typename result_of::pop_back<Seq&>::type
+ pop_back(Seq& seq)
+ {
+ return typename
+ result_of::pop_back<Seq&>::type(
+ fusion::begin(seq)
+ , fusion::prior(fusion::end(seq)));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/pop_front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_POP_FRONT_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_POP_FRONT_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/empty.hpp>
+#endif
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq>
+ struct pop_front
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ BOOST_FUSION_MPL_ASSERT_NOT((empty<Seq>));
+
+ typedef
+ iterator_range<
+ typename next<typename begin<Seq>::type>::type
+ , typename end<Seq>::type
+ >
+ type;
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::pop_front<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ pop_front(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename
+ result_of::pop_front<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ >::type(fusion::next(fusion::begin(seq)), fusion::end(seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq>
+ inline typename result_of::pop_front<Seq&>::type
+ pop_front(Seq& seq)
+ {
+ return typename
+ result_of::pop_front<Seq&>::type(
+ fusion::next(fusion::begin(seq)), fusion::end(seq));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_PUSH_BACK_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_PUSH_BACK_HPP
+
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/single_view/single_view.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename T>
+ struct push_back
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ joint_view<
+ Seq
+ , single_view<typename detail::as_fusion_element<T>::type>
+ >
+ type;
+ };
+ }
+
+ template <typename Seq, typename T>
+ inline typename
+ result_of::push_back<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type
+ push_back(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(T) x)
+ {
+ return typename
+ result_of::push_back<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type(BOOST_FUSION_FORWARD(Seq,seq),
+ fusion::make_single_view(BOOST_FUSION_FORWARD(T,x)));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename T>
+ inline typename result_of::push_back<Seq&, T const&>::type
+ push_back(Seq& seq, T const& x)
+ {
+ return typename result_of::push_back<Seq&, T const&>::type(
+ seq,fusion::make_single_view(x));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/push_front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,66 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_PUSH_FRONT_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_PUSH_FRONT_HPP
+
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/view/single_view/single_view.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename T>
+ struct push_front
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ joint_view<
+ single_view<typename detail::as_fusion_element<T>::type>
+ , Seq
+ >
+ type;
+ };
+ }
+
+ template <typename Seq, typename T>
+ inline typename
+ result_of::push_front<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type
+ push_front(
+ BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ BOOST_FUSION_R_ELSE_CLREF(T) x)
+ {
+ return typename
+ result_of::push_front<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type(fusion::make_single_view(BOOST_FUSION_FORWARD(T,x)),
+ BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename T>
+ inline typename result_of::push_front<Seq&, T const&>::type
+ push_front(Seq& seq, T const& x)
+ {
+ return typename result_of::push_front<Seq&, T const&>::type(
+ fusion::make_single_view(BOOST_FUSION_FORWARD(T,x)),
+ BOOST_FUSION_FORWARD(Seq,seq));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,51 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_REMOVE_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_REMOVE_HPP
+
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename T>
+ struct remove
+ : remove_if<Seq, is_same<mpl::_1, T> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ };
+ }
+
+ template <typename T, typename Seq>
+ inline typename result_of::remove<BOOST_FUSION_R_ELSE_CLREF(Seq), T>::type
+ remove(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return remove_if<is_same<mpl::_1, T> >(BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename T, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::remove<,Seq,&, T>)
+ remove_if(Seq& seq)
+ {
+ return remove_if<is_same<mpl::_1, T> >(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/remove_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_REMOVE_IF_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_REMOVE_IF_HPP
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/mpl/not.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename Pred>
+ struct remove_if
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef filter_view<Seq, mpl::not_<Pred> > type;
+ };
+ }
+
+ template <typename Pred, typename Seq>
+ inline typename
+ result_of::remove_if<BOOST_FUSION_R_ELSE_CLREF(Seq), Pred>::type
+ remove_if(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename
+ result_of::remove_if<BOOST_FUSION_R_ELSE_CLREF(Seq), Pred>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Pred, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::remove_if<,Seq,&, Pred>)
+ remove_if(Seq& seq)
+ {
+ return typename result_of::remove_if<Seq&, Pred>::type(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,98 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_REPLACE_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_REPLACE_HPP
+
+#include <boost/fusion/algorithm/transformation/replace_if.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename OldValue>
+ struct replace_helper
+ {
+ template <typename OtherOldValue>
+ replace_helper(
+ BOOST_FUSION_R_ELSE_CLREF(OtherOldValue) old_value
+ , int)
+ : old_value(BOOST_FUSION_FORWARD(OtherOldValue,old_value))
+ {}
+
+ template<typename Replacer>
+ replace_helper(BOOST_FUSION_R_ELSE_CLREF(Replacer) replacer)
+ : old_value(BOOST_FUSION_FORWARD(Replacer,replacer).old_value)
+ {}
+
+ template<typename Replacer>
+ replace_helper&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Replacer) replacer)
+ {
+ old_value=BOOST_FUSION_FORWARD(Replacer,replacer).old_value;
+ return *this;
+ }
+
+ template <typename U>
+ bool
+ operator()(BOOST_FUSION_R_ELSE_LREF(U) x) const
+ {
+ return x==old_value;
+ }
+
+ OldValue old_value;
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename T>
+ struct replace
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ detail::replace_helper<
+ typename detail::as_fusion_element<T>::type
+ >
+ replacer;
+
+ typedef typename
+ replace_if<Seq, BOOST_FUSION_R_ELSE_CLREF(replacer), T>::type
+ type;
+ };
+ }
+
+ template <typename Seq, typename OldValue, typename NewValue>
+ inline typename
+ result_of::replace<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(OldValue)
+ >::type
+ replace(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ BOOST_FUSION_R_ELSE_CLREF(OldValue) old_value,
+ BOOST_FUSION_R_ELSE_CLREF(NewValue) new_value)
+ {
+ typedef typename
+ result_of::replace<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(OldValue)
+ >::replacer
+ replacer;
+
+ return replace_if(
+ BOOST_FUSION_FORWARD(Seq,seq)
+ , replacer(BOOST_FUSION_FORWARD(OldValue,old_value),0)
+ , BOOST_FUSION_FORWARD(NewValue,new_value));
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/replace_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,75 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_REPLACE_IF_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_REPLACE_IF_HPP
+
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+#include <boost/fusion/algorithm/transformation/detail/replace_if.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq, typename F, typename NewValue>
+ struct replace_if
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ detail::replace_if_helper<
+ typename detail::as_fusion_element<F>::type
+ , typename detail::as_fusion_element<NewValue>::type
+ >
+ replacer;
+
+ typedef transform_view<Seq, replacer> type;
+ };
+ }
+
+ template <typename Seq, typename F, typename NewValue>
+ inline typename result_of::replace_if<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ , BOOST_FUSION_R_ELSE_CLREF(NewValue)
+ >::type
+ replace_if(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,
+ BOOST_FUSION_R_ELSE_CLREF(F) pred,
+ BOOST_FUSION_R_ELSE_CLREF(NewValue) new_value)
+ {
+ typedef
+ result_of::replace_if<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ , BOOST_FUSION_R_ELSE_CLREF(NewValue)
+ >
+ result;
+
+ return typename result::type(BOOST_FUSION_FORWARD(Seq,seq),
+ typename result::replacer(
+ BOOST_FUSION_FORWARD(F,pred),
+ BOOST_FUSION_FORWARD(NewValue,new_value)));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename F, typename NewValue>
+ inline typename result_of::replace_if<Seq&, F const&, NewValue const&>::type
+ replace_if(Seq& seq,F const& pred,NewValue const& new_value)
+ {
+ typedef result_of::replace_if<Seq&, F const&, NewValue const&> result;
+
+ return typename result::type(seq,
+ typename result::replacer(pred,new_value));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/reverse.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,48 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_REVERSE_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_REVERSE_HPP
+
+#include <boost/fusion/view/reverse_view/reverse_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Seq>
+ struct reverse
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef reverse_view<Seq> type;
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::reverse<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ reverse(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return typename
+ result_of::reverse<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type(
+ BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq>
+ inline typename result_of::reverse<Seq&>::type
+ reverse(Seq& seq)
+ {
+ return typename result_of::reverse<Seq&>::type(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/transform.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,115 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_TRANSFORM_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_TRANSFORM_HPP
+
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace result_of
+ {
+ template <typename Seq1, typename Seq2, typename F = void_>
+ struct transform
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ typedef transform_view<Seq1,Seq2,F> type;
+ };
+
+ template <typename Seq, typename F>
+#if defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+ struct transform<Seq, F, void_>
+#else
+ struct transform<Seq, F>
+#endif
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef transform_view<Seq, F> type;
+ };
+ }
+
+ template <typename Seq, typename F>
+ inline typename
+ result_of::transform<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type
+ transform(BOOST_FUSION_R_ELSE_CLREF(Seq) seq, BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return typename
+ result_of::transform<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , BOOST_FUSION_R_ELSE_CLREF(F)
+ >::type(BOOST_FUSION_FORWARD(Seq,seq), BOOST_FUSION_FORWARD(F,f));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq, typename F>
+ inline typename result_of::transform<Seq&, F const&>::type
+ transform(Seq& seq, F const& f)
+ {
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4180)
+#endif
+ return typename result_of::transform<Seq&, F const&>::type(seq, f);
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+ }
+#endif
+
+#define BOOST_FUSION_TRANSFORM_BINARY(SEQ1_CV_REF_MODIFIER,SEQ2_CV_REF_MODIFIER)\
+ template <typename Seq1, typename Seq2, typename F>\
+ inline typename\
+ result_of::transform<\
+ Seq1 SEQ1_CV_REF_MODIFIER\
+ , Seq2 SEQ2_CV_REF_MODIFIER\
+ , BOOST_FUSION_R_ELSE_CLREF(F)\
+ >::type\
+ transform(\
+ Seq1 SEQ1_CV_REF_MODIFIER seq1\
+ , Seq2 SEQ2_CV_REF_MODIFIER seq2\
+ , BOOST_FUSION_R_ELSE_CLREF(F) f)\
+ {\
+ return typename\
+ result_of::transform<\
+ Seq1 SEQ1_CV_REF_MODIFIER\
+ , Seq2 SEQ2_CV_REF_MODIFIER\
+ , BOOST_FUSION_R_ELSE_CLREF(F)\
+ >::type(\
+ BOOST_FUSION_FORWARD(Seq1 SEQ1_CV_REF_MODIFIER,seq1)\
+ , BOOST_FUSION_FORWARD(Seq2 SEQ2_CV_REF_MODIFIER,seq2)\
+ , BOOST_FUSION_FORWARD(F,f));\
+ }
+
+ BOOST_FUSION_TRANSFORM_BINARY(
+ BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()),
+ BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()));
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_FUSION_TRANSFORM_BINARY(&,const&);
+ BOOST_FUSION_TRANSFORM_BINARY(const&,&);
+ BOOST_FUSION_TRANSFORM_BINARY(&,&);
+#endif
+
+#undef BOOST_FUSION_TRANSFORM_BINARY
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/zip.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/algorithm/transformation/zip.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,24 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_ALGORITHM_TRANSFORMATION_ZIP_HPP
+#define BOOST_FUSION_ALGORITHM_TRANSFORMATION_ZIP_HPP
+
+#include <boost/config.hpp>
+
+#if (defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)) && !defined(FUSION_MAX_ZIP_SEQUENCES)
+# define FUSION_MAX_ZIP_SEQUENCES 10
+#endif
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/algorithm/transformation/detail/pp/zip.hpp>
+#else
+# include <boost/fusion/algorithm/transformation/detail/variadic_templates/zip.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_HPP
+#define BOOST_FUSION_CONTAINER_HPP
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/container/map.hpp>
+#include <boost/fusion/container/set.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/convert_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/convert_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,90 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/sequence/intrinsic/begin.hpp>
+# include <boost/fusion/sequence/intrinsic/size.hpp>
+#endif
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/detail/pp/as_seq.hpp>
+#else
+
+# include <boost/fusion/container/detail/variadic_templates/as_seq.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<BOOST_PP_CAT(BOOST_FUSION_SEQ_NAME,_tag)>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+ typedef typename
+ detail::BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME)<
+ result_of::size<SeqRef>::value
+ >
+ gen;
+ typedef typename
+ gen::template apply<
+ typename result_of::begin<SeqRef>::type
+ >::type
+ type;
+#else
+ typedef typename
+ detail::BOOST_PP_CAT(
+ BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME),_impl)<SeqRef>
+ gen;
+ typedef typename gen::apply::type type;
+#endif
+
+ static type call(SeqRef seq)
+ {
+ return type(fusion::sequence_assign(
+ BOOST_FUSION_FORWARD(SeqRef,seq)));
+ }
+ };
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq>
+ struct BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME)
+ {
+ typedef typename
+ extension::convert_impl<
+ BOOST_PP_CAT(BOOST_FUSION_SEQ_NAME,_tag)
+ >::template apply<typename detail::add_lref<Seq>::type>
+ gen;
+
+ typedef typename gen::type type;
+ };
+ }
+
+ template <typename Seq>
+ inline typename
+ result_of::BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME)<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ >::type
+ BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME)(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return
+ result_of::BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME)<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ >::gen::call(seq);
+ }
+
+}}

Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_ctor.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/forward_ctor.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,23 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#if !defined(BOOST_FUSION_SEQ_NAME) && !defined(BOOST_FUSION_CONTAINER_DETAIL_FORWARD_CTOR_HPP)
+# define BOOST_FUSION_CONTAINER_DETAIL_FORWARD_CTOR_HPP
+# include <boost/config.hpp>
+#endif
+
+#ifdef BOOST_FUSION_USE_BASE_TYPE
+# define BOOST_FUSION_INIT_BASE base_type
+#else
+# define BOOST_FUSION_INIT_BASE data
+#endif
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/detail/pp/forward_ctor.hpp>
+#else
+# include <boost/fusion/container/detail/variadic_templates/forward_ctor.hpp>
+#endif
+
+#undef BOOST_FUSION_INIT_BASE

Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/as_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/as_seq.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/dec.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int Size>
+ struct BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME);
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/detail/pp/as_seq.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_MAX_SEQ_SIZE)
+#include BOOST_PP_ITERATE()
+}}}
+
+#else
+
+#define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+ template <>
+ struct BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME)<BOOST_FUSION_N>
+ {
+ template <typename It0>
+ struct apply
+ {
+#if BOOST_FUSION_N
+ typedef typename result_of::value_of<It0>::type T0;
+#endif
+
+#define BOOST_FUSION_IT_VALUE_ENUM(Z, N, _)\
+ typedef typename\
+ result_of::next<BOOST_PP_CAT(It, BOOST_PP_DEC(N))>::type\
+ BOOST_PP_CAT(It, N);\
+ typedef typename\
+ result_of::value_of<BOOST_PP_CAT(It, N)>::type\
+ BOOST_PP_CAT(T, N);
+
+ BOOST_PP_REPEAT_FROM_TO(
+ 1, BOOST_FUSION_N, BOOST_FUSION_IT_VALUE_ENUM, _)
+
+#undef BOOST_FUSION_IT_VALUE_ENUM
+
+ typedef
+ BOOST_FUSION_SEQ_NAME<BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)>
+ type;
+ };
+ };
+
+#undef BOOST_FUSION_N
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_ctor.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/pp/forward_ctor.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+# ifndef BOOST_FUSION_SEQ_NAME
+# ifndef BOOST_FUSION_CONTAINER_DETAIL_PP_FORWARD_CTOR_HPP
+# include <boost/fusion/support/internal/template.hpp>
+
+# include <boost/config.hpp>
+# include <boost/preprocessor/iterate.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# endif
+# else
+# define BOOST_PP_FILENAME_1 <boost/fusion/container/detail/pp/forward_ctor.hpp>
+# define BOOST_PP_ITERATION_LIMITS (1, BOOST_FUSION_MAX_SEQ_SIZE)
+# include BOOST_PP_ITERATE()
+
+ template<typename SeqAssign>
+ BOOST_FUSION_SEQ_NAME(SeqAssign const& seq_assign)
+ : BOOST_FUSION_INIT_BASE(seq_assign)
+ {}
+# endif
+#else
+# define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+# ifndef BOOST_NO_RVALUE_REFERENCES
+ VARIADIC_TEMPLATE_A(BOOST_FUSION_N)
+# endif
+# if BOOST_FUSION_N == 1
+ explicit
+# endif
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_FUSION_SEQ_NAME(EXPAND_TEMPLATE_ARGUMENTS_CALL_PARAMS(BOOST_FUSION_N))
+# else
+ BOOST_FUSION_SEQ_NAME(EXPAND_TEMPLATE_ARGUMENTS_A(BOOST_FUSION_N))
+# endif
+ : BOOST_FUSION_INIT_BASE(EXPAND_PARAMETERS_A(BOOST_FUSION_N))
+ {}
+
+# undef BOOST_FUSION_N
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/as_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/as_seq.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,57 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+//cschmidt: to avoid cyclic references - as some of the (here unneeded) mpl
+//sequence modification metafunctions might instantiate result_of::as_xxx - just
+//include the relevant /fusion/mpl/ headers.
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/fusion/mpl/at.hpp>
+#include <boost/fusion/mpl/back.hpp>
+#include <boost/fusion/mpl/begin.hpp>
+#include <boost/fusion/mpl/empty.hpp>
+#include <boost/fusion/mpl/end.hpp>
+#include <boost/fusion/mpl/front.hpp>
+#include <boost/fusion/mpl/size.hpp>
+
+#include <boost/fusion/support/internal/variadic_templates/variadic_quote.hpp>
+
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/quote.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/unpack_args.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+
+ template<typename SeqRef>
+ struct BOOST_PP_CAT(BOOST_PP_CAT(as_,BOOST_FUSION_SEQ_NAME),_impl)
+ {
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef typename
+ mpl::apply<
+ mpl::unpack_args<variadic_quote<BOOST_FUSION_SEQ_NAME> >
+ , typename mpl::eval_if<
+ traits::is_random_access<SeqRef>
+ , mpl::identity<seq>
+ , mpl::fold<
+ seq
+ , mpl::vector0<>
+ , mpl::quote2<mpl::push_back>
+ >
+ >::type
+ >::type
+ type;
+ };
+ };
+}}}
+

Added: sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_ctor.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/detail/variadic_templates/forward_ctor.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SEQ_NAME
+# ifndef BOOST_FUSION_CONTAINER_DETAIL_VARIADIC_TEMPLATES_FORWARD_CTOR_HPP
+# define BOOST_FUSION_CONTAINER_DETAIL_VARIADIC_TEMPLATES_FORWARD_CTOR_HPP
+# include <boost/call_traits.hpp>
+# endif
+#else
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ explicit
+ BOOST_FUSION_SEQ_NAME(
+ typename call_traits<Arguments>::param_type... arguments)
+ : BOOST_FUSION_INIT_BASE(arguments)
+ {}
+# else
+ template <typename... OtherArguments>
+ explicit
+ BOOST_FUSION_SEQ_NAME(OtherArguments&&... arguments)
+ : BOOST_FUSION_INIT_BASE(std::forward<OtherArguments>(arguments)...)
+ {}
+# endif
+
+ template<typename SeqAssign>
+ BOOST_FUSION_SEQ_NAME(SeqAssign const& seq_assign)
+ : BOOST_FUSION_INIT_BASE(seq_assign)
+ {}
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,23 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_GENERATION_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_HPP
+
+#include <boost/fusion/container/generation/cons_tie.hpp>
+#include <boost/fusion/container/generation/ignore.hpp>
+#include <boost/fusion/container/generation/list_tie.hpp>
+#include <boost/fusion/container/generation/make_cons.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+#include <boost/fusion/container/generation/make_map.hpp>
+#include <boost/fusion/container/generation/make_set.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/generation/map_tie.hpp>
+#include <boost/fusion/container/generation/pair_tie.hpp>
+#include <boost/fusion/container/generation/vector_tie.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/cons_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/cons_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,60 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ 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_FUSION_CONTAINER_GENERATION_CONS_TIE_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_CONS_TIE_HPP
+
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+
+ namespace result_of
+ {
+ template <typename Car, typename Cdr = nil>
+ struct cons_tie
+ {
+ typedef
+ cons<
+ typename detail::as_fusion_element_ref<Car>::type
+ , typename detail::as_fusion_element<Cdr>::type
+ >
+ type;
+ };
+ }
+
+ // $$$ do we really want a cons_tie? $$$
+ template <typename Car>
+ inline typename result_of::cons_tie<BOOST_FUSION_R_ELSE_LREF(Car)>::type
+ cons_tie(BOOST_FUSION_R_ELSE_LREF(Car) car)
+ {
+ return typename
+ result_of::cons_tie<BOOST_FUSION_R_ELSE_LREF(Car)>::type(
+ BOOST_FUSION_FORWARD(Car,car));
+ }
+
+ template <typename Car, typename Cdr>
+ inline typename
+ result_of::cons_tie<
+ BOOST_FUSION_R_ELSE_LREF(Car)
+ , BOOST_FUSION_R_ELSE_LREF(Cdr)
+ >::type
+ cons_tie(BOOST_FUSION_R_ELSE_LREF(Car) car
+ , BOOST_FUSION_R_ELSE_LREF(Cdr) cdr)
+ {
+ return typename
+ result_of::cons_tie<
+ BOOST_FUSION_R_ELSE_LREF(Car)
+ , BOOST_FUSION_R_ELSE_LREF(Cdr)>::type(
+ BOOST_FUSION_FORWARD(Car,car)
+ , BOOST_FUSION_FORWARD(Cdr,cdr));
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/make_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/make_seq.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,12 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/generation/detail/pp/make_seq.hpp>
+#else
+# include <boost/fusion/container/generation/detail/variadic_templates/make_seq.hpp>
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,116 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_CONTAINER_GENERATION_DETAIL_PP_MAKE_MAP_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_DETAIL_PP_MAKE_MAP_HPP
+
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/pair.hpp>
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template<
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_MAP_SIZE,
+ typename K,
+ void_)
+ , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_MAP_SIZE,
+ typename T,
+ void_)
+ >
+ struct make_map;
+ }
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp/make_map.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, FUSION_MAX_MAP_SIZE)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+#else
+
+#define BOOST_FUSION_N BOOST_PP_ITERATION()
+#if BOOST_FUSION_N
+# define BOOST_FUSION_COMMA ,
+#else
+# define BOOST_FUSION_COMMA
+#endif
+
+ namespace result_of
+ {
+ template<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename K)
+ BOOST_FUSION_COMMA
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename T)
+ >
+ struct make_map
+#if BOOST_FUSION_N!=FUSION_MAX_MAP_SIZE
+ <
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, K)
+ BOOST_FUSION_COMMA
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)
+ >
+#endif
+ {
+#define BOOST_FUSION_MAP_ELEMENT(Z,N,_)\
+ pair<\
+ BOOST_PP_CAT(K,N)\
+ , typename detail::as_fusion_element<BOOST_PP_CAT(T,N)>::type\
+ >
+
+ typedef
+ map<BOOST_PP_ENUM(BOOST_FUSION_N, BOOST_FUSION_MAP_ELEMENT, _)>
+ type;
+
+#undef BOOST_FUSION_MAP_ELEMENT
+ };
+ }
+
+#if BOOST_FUSION_N
+ template<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename K)
+ , BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename A)
+ >
+#endif
+ inline
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::make_map<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, K)
+ BOOST_FUSION_COMMA
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_CLREF(BOOST_FUSION_N)
+ >::type
+ make_map(
+ EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_CLREF(BOOST_FUSION_N))
+ {
+ return
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::make_map<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, K)
+ BOOST_FUSION_COMMA
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_CLREF(BOOST_FUSION_N)
+ >::type(EXPAND_PARAMETERS_A(BOOST_FUSION_N));
+ }
+
+#undef BOOST_FUSION_COMMA
+#undef BOOST_FUSION_N
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/make_seq.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,72 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ VARIADIC_TEMPLATE_WITH_DEFAULT(BOOST_FUSION_MAX_SEQ_SIZE)
+ struct BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME);
+ }
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp/make_seq.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_MAX_SEQ_SIZE)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#else
+
+#define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ VARIADIC_TEMPLATE(BOOST_FUSION_N)
+ struct BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)
+ EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION(
+ BOOST_FUSION_MAX_SEQ_SIZE,BOOST_FUSION_N)
+ {
+ typedef
+ BOOST_FUSION_SEQ_NAME<
+ EXPAND_TEMPLATE_ARGUMENTS_BINARY(
+ BOOST_FUSION_N,
+ typename detail::as_fusion_element<,
+ >::type
+ )
+ >
+ type;
+ };
+ }
+
+ VARIADIC_TEMPLATE_A(BOOST_FUSION_N)
+ inline
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)<
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_CLREF(BOOST_FUSION_N)
+ >::type
+ BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)(
+ EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_CLREF(BOOST_FUSION_N))
+ {
+ return
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)<
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_CLREF(BOOST_FUSION_N)
+ >::type(EXPAND_PARAMETERS_A(BOOST_FUSION_N));
+ }
+
+#undef BOOST_FUSION_N
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/map_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/map_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,115 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_CONTAINER_GENERATION_DETAIL_PP_MAP_TIE_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_DETAIL_PP_MAP_TIE_HPP
+
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/pair.hpp>
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template<
+ BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_MAP_SIZE,
+ typename K,
+ void_)
+ , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
+ FUSION_MAX_MAP_SIZE,
+ typename T,
+ void_)
+ >
+ struct map_tie;
+ }
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp/map_tie.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, FUSION_MAX_MAP_SIZE)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#endif
+#else
+
+#define BOOST_FUSION_N BOOST_PP_ITERATION()
+#if BOOST_FUSION_N
+# define BOOST_FUSION_COMMA ,
+#else
+# define BOOST_FUSION_COMMA
+#endif
+
+ namespace result_of
+ {
+ template<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename K)
+ BOOST_FUSION_COMMA
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename T)
+ >
+ struct map_tie
+#if BOOST_FUSION_N!=FUSION_MAX_MAP_SIZE
+ <
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, K)
+ BOOST_FUSION_COMMA
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)
+ >
+#endif
+ {
+#define BOOST_FUSION_MAP_ELEMENT(Z,N,_)\
+ pair<\
+ BOOST_PP_CAT(K,N)\
+ , typename detail::as_fusion_element_ref<BOOST_PP_CAT(T,N)>::type\
+ >
+
+ typedef
+ map<BOOST_PP_ENUM(BOOST_FUSION_N, BOOST_FUSION_MAP_ELEMENT, _)>
+ type;
+
+#undef BOOST_FUSION_MAP_ELEMENT
+ };
+ }
+
+#if BOOST_FUSION_N
+ template<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename K)
+ , BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename A)
+ >
+#endif
+ inline
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::map_tie<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, K)
+ BOOST_FUSION_COMMA
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_LREF(BOOST_FUSION_N)
+ >::type
+ map_tie(EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_LREF(BOOST_FUSION_N))
+ {
+ return
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::map_tie<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, K)
+ BOOST_FUSION_COMMA
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_LREF(BOOST_FUSION_N)
+ >::type(EXPAND_PARAMETERS_A(BOOST_FUSION_N));
+ }
+
+#undef BOOST_FUSION_COMMA
+#undef BOOST_FUSION_N
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/seq_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/pp/seq_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,72 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ VARIADIC_TEMPLATE_WITH_DEFAULT(BOOST_FUSION_MAX_SEQ_SIZE)
+ struct BOOST_FUSION_FUNCTION_NAME;
+ }
+
+#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp/seq_tie.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_MAX_SEQ_SIZE)
+#include BOOST_PP_ITERATE()
+
+}}
+
+#else
+
+#define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+ namespace result_of
+ {
+ VARIADIC_TEMPLATE(BOOST_FUSION_N)
+ struct BOOST_FUSION_FUNCTION_NAME
+ EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION(
+ BOOST_FUSION_MAX_SEQ_SIZE,BOOST_FUSION_N)
+ {
+ typedef
+ BOOST_FUSION_SEQ_NAME<
+ EXPAND_TEMPLATE_ARGUMENTS_BINARY(
+ BOOST_FUSION_N,
+ typename detail::as_fusion_element_ref<,
+ >::type
+ )
+ >
+ type;
+ };
+ }
+
+ VARIADIC_TEMPLATE_A(BOOST_FUSION_N)
+ inline
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::BOOST_FUSION_FUNCTION_NAME<
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_LREF(BOOST_FUSION_N)
+ >::type
+ BOOST_FUSION_FUNCTION_NAME(
+ EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_LREF(BOOST_FUSION_N))
+ {
+ return
+#if BOOST_FUSION_N
+ typename
+#endif
+ result_of::BOOST_FUSION_FUNCTION_NAME<
+ EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_LREF(BOOST_FUSION_N)
+ >::type(EXPAND_PARAMETERS_A(BOOST_FUSION_N));
+ }
+
+#undef N
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/seq_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/seq_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,25 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <boost/config.hpp>
+#include <boost/fusion/container/generation/ignore.hpp>
+
+#ifndef BOOST_FUSION_FUNCTION_NAME
+# include <boost/preprocessor/cat.hpp>
+
+# define BOOST_FUSION_UNDEF_FUNCTION_NAME
+# define BOOST_FUSION_FUNCTION_NAME BOOST_PP_CAT(BOOST_FUSION_SEQ_NAME,_tie)
+#endif
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/generation/detail/pp/seq_tie.hpp>
+#else
+# include <boost/fusion/container/generation/detail/variadic_templates/seq_tie.hpp>
+#endif
+
+#ifdef BOOST_FUSION_UNDEF_FUNCTION_NAME
+# undef BOOST_FUSION_FUNCTION_NAME
+# undef BOOST_FUSION_UNDEF_FUNCTION_NAME
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/make_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/make_map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,86 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_DETAIL_VARIADIC_TEMPLATES_MAKE_MAP_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_DETAIL_VARIADIC_TEMPLATES_MAKE_MAP_HPP
+
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp>
+#include <boost/fusion/support/internal/variadic_templates/variadic_quote.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/divides.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/unpack_args.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/zip_view.hpp>
+#include <boost/mpl/transform_view.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename... KeysTypes>
+ struct make_map
+ {
+ typedef typename
+ detail::variadic_arguments_to_vector<KeysTypes...>::type
+ args;
+ typedef typename mpl::begin<args>::type args_begin;
+ typedef typename
+ mpl::advance<
+ args_begin
+ , mpl::divides<mpl::size<args>, mpl::int_<2> >
+ >::type
+ args_middle;
+
+ typedef mpl::iterator_range<args_begin, args_middle> keys;
+ typedef
+ mpl::iterator_range<
+ args_middle
+ , typename mpl::end<args>::type
+ >
+ types;
+
+ typedef
+ mpl::transform_view<
+ mpl::zip_view<mpl::vector<keys,types> >
+ , mpl::unpack_args<
+ pair<mpl::_1, detail::as_fusion_element<mpl::_2> >
+ >
+ >
+ map_args;
+
+ typedef typename
+ mpl::apply<
+ mpl::unpack_args<detail::variadic_quote<map> >
+ , map_args
+ >::type
+ type;
+ };
+ }
+
+ //TODO cschmidt: ?!
+ template <typename... Keys, typename... Types>
+ inline typename
+ result_of::make_map<Keys...,BOOST_FUSION_R_ELSE_CLREF(Types)...>::type
+ make_map(BOOST_FUSION_R_ELSE_CLREF(Types)... types)
+ {
+ typedef typename
+ result_of::make_map<Keys...,BOOST_FUSION_R_ELSE_CLREF(Types)...>::
+ type
+ type;
+ return type(make_pair<Keys>(BOOST_FUSION_FORWARD(Types, types))...);
+ }
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/make_seq.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/make_seq.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,39 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename... Types>
+ struct BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)
+ {
+ typedef
+ BOOST_FUSION_SEQ_NAME<
+ typename detail::as_fusion_element<Types>::type...
+ >
+ type;
+ };
+ }
+
+ template <typename... Types>
+ inline typename
+ result_of::BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)<
+ BOOST_FUSION_R_ELSE_CLREF(Types)...
+ >::type
+ BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)(
+ BOOST_FUSION_R_ELSE_CLREF(Types)... types)
+ {
+ return typename
+ result_of::BOOST_PP_CAT(make_,BOOST_FUSION_SEQ_NAME)<
+ BOOST_FUSION_R_ELSE_CLREF(Types)...
+ >::type(BOOST_FUSION_FORWARD(Types, types)...);
+ }
+}}
+

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/map_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/map_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,87 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_DETAIL_VARIADIC_TEMPLATES_MAP_TIE_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_DETAIL_VARIADIC_TEMPLATES_MAP_TIE_HPP
+
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+#include <boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp>
+#include <boost/fusion/support/internal/variadic_templates/variadic_quote.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/divides.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/unpack_args.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/zip_view.hpp>
+#include <boost/mpl/transform_view.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename... KeysTypes>
+ struct map_tie
+ {
+ typedef typename
+ detail::variadic_arguments_to_vector<KeysTypes...>::type
+ args;
+ typedef typename
+ mpl::iterator_range<
+ typename mpl::begin<args>::type
+ , typename mpl::advance<
+ typename mpl::begin<args>::type
+ , mpl::divides<mpl::size<args>, mpl::int_<2> >
+ >::type
+ >
+ keys;
+ typedef typename
+ mpl::iterator_range<
+ typename mpl::advance<
+ typename mpl::begin<args>::type
+ , mpl::divides<mpl::size<args>, mpl::int_<2> >
+ >::type
+ , typename mpl::end<args>::type
+ >
+ types;
+
+ typedef
+ mpl::transform_view<
+ mpl::zip_view<mpl::vector<keys,types> >
+ , mpl::unpack_args<
+ pair<mpl::_1, detail::as_fusion_element_ref<mpl::_2> >
+ >
+ >
+ map_args;
+
+ typedef typename
+ mpl::apply<
+ mpl::unpack_args<detail::variadic_quote<map> >
+ , map_args
+ >::type
+ type;
+ };
+ }
+
+ //TODO cschmidt: ?!
+ template <typename... Keys, typename... Types>
+ inline typename
+ result_of::map_tie<Keys...,BOOST_FUSION_R_ELSE_CLREF(Types)...>::type
+ map_tie(BOOST_FUSION_R_ELSE_CLREF(Types)... types)
+ {
+ typedef typename
+ result_of::map_tie<Keys...,BOOST_FUSION_R_ELSE_CLREF(Types)...>::type
+ type;
+ return type(BOOST_FUSION_FORWARD(Types, types)...);
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/seq_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/detail/variadic_templates/seq_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename... Types>
+ struct BOOST_FUSION_FUNCTION_NAME
+ {
+ typedef
+ BOOST_FUSION_SEQ_NAME<
+ typename detail::as_fusion_element_ref<Types>::type...
+ >
+ type;
+ };
+ }
+
+ template <typename... Types>
+ inline typename
+ result_of::BOOST_FUSION_FUNCTION_NAME<
+ BOOST_FUSION_R_ELSE_CLREF(Types)...
+ >::type
+ BOOST_FUSION_FUNCTION_NAME(BOOST_FUSION_R_ELSE_CLREF(Types)... types)
+ {
+ return typename
+ result_of::BOOST_FUSION_FUNCTION_NAME<
+ BOOST_FUSION_R_ELSE_CLREF(Types)...
+ >::type(BOOST_FUSION_FORWARD(Types, types)...);
+ }
+}}
+

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/ignore.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/ignore.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ Copyright (c) 2001 Doug Gregor
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_GENERATION_IGNORE_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_IGNORE_HPP
+
+namespace boost { namespace fusion
+{
+ // Swallows any assignment (by Doug Gregor)
+ namespace detail
+ {
+ struct swallow_assign
+ {
+ template<typename T>
+ swallow_assign const&
+ operator=(const T&) const
+ {
+ return *this;
+ }
+ };
+ }
+
+ // "ignore" allows tuple positions to be ignored when using "tie".
+ detail::swallow_assign const ignore = detail::swallow_assign();
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/list_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/list_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_LIST_TIE_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_LIST_TIE_HPP
+
+#include <boost/fusion/container/list/list.hpp>
+
+#define BOOST_FUSION_SEQ_NAME list
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_LIST_SIZE
+#include <boost/fusion/container/generation/detail/seq_tie.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_cons.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_cons.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,65 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_GENERATION_MAKE_CONS_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_MAKE_CONS_HPP
+
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ struct nil;
+
+ namespace result_of
+ {
+ template <typename Car, typename Cdr = nil>
+ struct make_cons
+ {
+ typedef
+ cons<typename detail::as_fusion_element<Car>::type
+ , typename detail::as_fusion_element<Cdr>::type
+ >
+ type;
+ };
+ }
+
+ template <typename Car>
+ inline typename result_of::make_cons<BOOST_FUSION_R_ELSE_CLREF(Car)>::type
+ make_cons(BOOST_FUSION_R_ELSE_CLREF(Car) car)
+ {
+ typedef typename
+ result_of::make_cons<BOOST_FUSION_R_ELSE_CLREF(Car)>::type
+ type;
+
+ return type(BOOST_FUSION_FORWARD(Car,car));
+ }
+
+ template <typename Car, typename Cdr>
+ inline typename
+ result_of::make_cons<
+ BOOST_FUSION_R_ELSE_CLREF(Car)
+ , BOOST_FUSION_R_ELSE_CLREF(Cdr)
+ >::type
+ make_cons(BOOST_FUSION_R_ELSE_CLREF(Car) car,
+ BOOST_FUSION_R_ELSE_CLREF(Cdr) cdr)
+ {
+ typedef typename
+ result_of::make_cons<
+ BOOST_FUSION_R_ELSE_CLREF(Car)
+ , BOOST_FUSION_R_ELSE_CLREF(Cdr)
+ >::type
+ type;
+
+ return type(BOOST_FUSION_FORWARD(Car,car)
+ , BOOST_FUSION_FORWARD(Cdr,cdr));
+ }
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_list.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_MAKE_LIST_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_MAKE_LIST_HPP
+
+#include <boost/fusion/container/list/list.hpp>
+
+#define BOOST_FUSION_SEQ_NAME list
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_LIST_SIZE
+#include <boost/fusion/container/generation/detail/make_seq.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,16 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_MAKE_MAP_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_MAKE_MAP_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/generation/detail/pp/make_map.hpp>
+#else
+# include <boost/fusion/container/generation/detail/variadic_templates/make_map.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_set.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_MAKE_SET_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_MAKE_SET_HPP
+
+#include <boost/fusion/container/set/set.hpp>
+
+#define BOOST_FUSION_SEQ_NAME set
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_SET_SIZE
+#include <boost/fusion/container/generation/detail/make_seq.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/make_vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_MAKE_VECTOR_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_MAKE_VECTOR_HPP
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define BOOST_FUSION_SEQ_NAME vector
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/generation/detail/make_seq.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/map_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/map_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_MAP_TIE_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_MAP_TIE_HPP
+
+#include <boost/config.hpp>
+#include <boost/fusion/container/generation/ignore.hpp>
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/generation/detail/pp/map_tie.hpp>
+#else
+# include <boost/fusion/container/generation/detail/variadic_templates/map_tie.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/pair_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/pair_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#if !defined (BOOST_FUSION_PAIR_TIE_20060812_2058)
+#define BOOST_FUSION_PAIR_TIE_20060812_2058
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+namespace boost { namespace fusion
+{
+ template<typename Key, typename T>
+ struct pair;
+
+ namespace result_of
+ {
+ template<typename Key, typename T>
+ struct pair_tie
+ {
+ typedef
+ fusion::pair<
+ Key
+ , typename detail::as_fusion_element_ref<T>::type
+ >
+ type;
+ };
+ }
+
+ template<typename Key, typename T>
+ typename result_of::pair_tie<Key, BOOST_FUSION_R_ELSE_CLREF(T)>::type
+ pair_tie(BOOST_FUSION_R_ELSE_LREF(T) t)
+ {
+ return typename
+ result_of::pair_tie<
+ Key
+ , BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type(BOOST_FUSION_FORWARD(T,t));
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/generation/vector_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/generation/vector_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_GENERATION_VECTOR_TIE_HPP
+#define BOOST_FUSION_CONTAINER_GENERATION_VECTOR_TIE_HPP
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define BOOST_FUSION_SEQ_NAME vector
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/generation/detail/seq_tie.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,16 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_HPP
+#define BOOST_FUSION_CONTAINER_LIST_HPP
+
+#include <boost/fusion/container/list/limits.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/list/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/cons.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,226 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_CONS_HPP
+#define BOOST_FUSION_CONTAINER_LIST_CONS_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/empty.hpp>
+#endif
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assign_tags.hpp>
+#include <boost/fusion/support/internal/sequence_assign.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/or.hpp>
+//#include <boost/utility/enable_if.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/mpl/equal_to.hpp>
+#endif
+#ifdef BOOST_NO_RVALUE_REFERENCES
+# include <boost/call_traits.hpp>
+#endif
+
+#include <boost/fusion/container/list/detail/cons/cons_fwd.hpp>
+#include <boost/fusion/container/list/detail/cons/at_impl.hpp>
+#include <boost/fusion/container/list/detail/cons/value_at_impl.hpp>
+#include <boost/fusion/container/list/detail/cons/empty_impl.hpp>
+
+#include <boost/fusion/container/list/detail/cons/cons_iterator.hpp>
+#include <boost/fusion/container/list/detail/cons/begin_impl.hpp>
+#include <boost/fusion/container/list/detail/cons/end_impl.hpp>
+#include <boost/fusion/container/list/detail/cons/deref_impl.hpp>
+#include <boost/fusion/container/list/detail/cons/next_impl.hpp>
+#include <boost/fusion/container/list/detail/cons/value_of_impl.hpp>
+#include <boost/fusion/container/list/detail/cons/equal_to_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct fusion_sequence_tag;
+
+ struct nil
+ : sequence_base<nil>
+ {
+ typedef mpl::int_<0> size;
+ typedef cons_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef forward_traversal_tag category;
+ typedef void_ car_type;
+ typedef void_ cdr_type;
+
+ nil()
+ {}
+
+ nil(const nil&)
+ {}
+
+ template<typename SeqAssign>
+ nil(BOOST_FUSION_R_ELSE_CLREF(SeqAssign))
+ {
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_FUSION_MPL_ASSERT((
+ result_of::empty<typename SeqAssign::seq_type>));
+#else
+ BOOST_FUSION_MPL_ASSERT((
+ result_of::empty<
+ typename detail::remove_reference<SeqAssign>::type::seq_type
+ >));
+#endif
+ }
+
+ template<typename It>
+ nil(detail::assign_by_deref,It const&)
+ {}
+
+ template<typename Seq>
+ nil&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq))
+ {
+ BOOST_FUSION_MPL_ASSERT((result_of::empty<Seq>));
+ return *this;
+ }
+
+ template<typename It>
+ void
+ assign(It const&)
+ {}
+ };
+
+ template <typename Car, typename Cdr = nil>
+ struct cons : sequence_base<cons<Car, Cdr> >
+ {
+ typedef mpl::int_<Cdr::size::value+1> size;
+ typedef cons_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef forward_traversal_tag category;
+ typedef Car car_type;
+ typedef Cdr cdr_type;
+
+ cons()
+ : car()
+ , cdr()
+ {}
+
+ //cschmidt: iterators so we do not have to deal with the cv-ness
+ //of cons_.car/cons_.cdr explicitly
+#define BOOST_FUSION_CONS_CTOR(COMBINATION,_)\
+ cons(cons COMBINATION cons_)\
+ : car(fusion::front(BOOST_FUSION_FORWARD(cons COMBINATION,cons_)))\
+ , cdr(detail::assign_by_deref(),\
+ fusion::next(fusion::begin(\
+ BOOST_FUSION_FORWARD(cons COMBINATION,cons_))))\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_CONS_CTOR,_);
+
+#undef BOOST_FUSION_CONS_CTOR
+
+ //cschmidt: rvalue ref if possible, so this does not collide with
+ //cons(OtherCar&&,OtherCdr&&)
+ template<typename It>
+ cons(detail::assign_by_deref,BOOST_FUSION_R_ELSE_CLREF(It) it)
+ : car(fusion::deref(it))
+ , cdr(detail::assign_by_deref(),fusion::next(it))
+ {}
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ explicit
+ cons(typename call_traits<Car>::param_type car)
+ : car(car)
+ {}
+#else
+ template<typename OtherCar>
+ explicit
+ cons(OtherCar&& car)
+ : car(std::forward<OtherCar>(car))
+ {}
+#endif
+
+#define BOOST_FUSION_CONS_ASSIGN_CTOR(COMBINATION,_)\
+ template<typename SeqRef>\
+ cons(detail::sequence_assign_type<SeqRef> COMBINATION seq_assign)\
+ : car(fusion::front(seq_assign.get()))\
+ , cdr(detail::assign_by_deref(),\
+ fusion::next(fusion::begin(seq_assign.get())))\
+ {\
+ BOOST_FUSION_MPL_ASSERT_NOT((\
+ mpl::equal_to<size,result_of::size<SeqRef> >));\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_CONS_ASSIGN_CTOR,_);
+
+#undef BOOST_FUSION_CONS_ASSIGN_CTOR
+
+ /*
+ template<typename Seq>
+ vector(typename enable_if_c<sizeof...(Elements)!=1,
+ BOOST_FUSION_R_ELSE_CLREF(Seq)>::type seq)
+ : base(detail::assign_by_deref(),
+ fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)))
+ {}
+ */
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ cons(typename call_traits<Car>::param_type car,Cdr const& cdr)
+ : car(car)
+ , cdr(cdr)
+ {}
+#else
+ template<typename OtherCar,typename OtherCdr>
+ cons(BOOST_FUSION_R_ELSE_CLREF(OtherCar) car,
+ BOOST_FUSION_R_ELSE_CLREF(OtherCdr) cdr)
+ : car(BOOST_FUSION_FORWARD(OtherCar,car))
+ , cdr(BOOST_FUSION_FORWARD(OtherCdr,cdr))
+ {}
+#endif
+
+ template<typename Seq>
+ cons&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ BOOST_FUSION_MPL_ASSERT_NOT((result_of::empty<Seq>));
+
+ assign(fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)));
+ return *this;
+ }
+
+ template<typename Seq>
+ cons&
+ operator=(cons const& seq)
+ {
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ return this->operator=<cons<Car,Cdr> >(seq);
+#else
+ return this->operator=<cons<Car,Cdr> const&>(seq);
+#endif
+ }
+
+ template<typename It>
+ void
+ assign(It const& it)
+ {
+ car=fusion::deref(it);
+ cdr.assign(fusion::next(it));
+ }
+
+ car_type car;
+ cdr_type cdr;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/convert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_CONVERT_HPP
+#define BOOST_FUSION_CONTAINER_LIST_CONVERT_HPP
+
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+
+#define BOOST_FUSION_SEQ_NAME list
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_LIST_SIZE
+#include <boost/fusion/container/detail/convert_impl.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#include <boost/fusion/container/list/detail/cons/convert_impl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,121 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_AT_IMPL_HPP
+
+#include <boost/config.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Cons, int I>
+ struct cons_advance
+ {
+ typedef typename
+ cons_advance<
+ typename cons_advance<Cons, 4>::type
+ , I-4
+ >::type::cdr_type
+ type;
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 0>
+ {
+ typedef Cons type;
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 1>
+ {
+ typedef typename Cons::cdr_type type;
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 2>
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above
+ typedef typename Cons::cdr_type::cdr_type type;
+#else
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type type;
+#endif
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 3>
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above
+ typedef typename Cons::cdr_type::cdr_type::cdr_type type;
+#else
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type _b;
+ typedef typename _b::cdr_type type;
+#endif
+ };
+
+ template <typename Cons>
+ struct cons_advance<Cons, 4>
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC, > 1400) // VC8 and above
+ typedef typename Cons::cdr_type::cdr_type::cdr_type::cdr_type type;
+#else
+ typedef typename Cons::cdr_type _a;
+ typedef typename _a::cdr_type _b;
+ typedef typename _b::cdr_type _c;
+ typedef typename _c::cdr_type type;
+#endif
+ };
+ }
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<cons_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::forward_as<
+ SeqRef
+ , typename detail::cons_advance<SeqRef, N::value>::type
+ >::type
+ type;
+
+ template <typename Cons, int N2>
+ static type
+ call(Cons& cons, mpl::int_<N2>)
+ {
+ return call(cons.cdr, mpl::int_<N2-1>());
+ }
+
+ template <typename Cons>
+ static type
+ call(Cons& cons, mpl::int_<0>)
+ {
+ return cons.car;
+ }
+
+ static type
+ call(SeqRef seq)
+ {
+ return call(seq, mpl::int_<N::value>());
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_BEGIN_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<cons_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef cons_iterator<SeqRef> type;
+
+ static type
+ call(SeqRef t)
+ {
+ return type(t,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/build_cons.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/build_cons.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_BUILD_CONS_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_BUILD_CONS_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <
+ typename First
+ , typename Last
+ , bool is_empty = result_of::equal_to<First, Last>::value>
+ struct build_cons;
+
+ template <typename First, typename Last>
+ struct build_cons<First, Last, true>
+ {
+ typedef nil type;
+
+ static nil
+ call(First const&, Last const&)
+ {
+ return nil();
+ }
+ };
+
+ template <typename First, typename Last>
+ struct build_cons<First, Last, false>
+ {
+ typedef
+ build_cons<typename result_of::next<First>::type, Last>
+ next_build_cons;
+
+ typedef
+ cons<
+ typename result_of::value_of<First>::type
+ , typename next_build_cons::type
+ >
+ type;
+
+ static type
+ call(First const& f, Last const& l)
+ {
+ return type(
+ fusion::deref(f),
+ next_build_cons::call(fusion::next(f), l));
+ }
+ };
+
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/cons_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/cons_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_LIST_DETAIL_CONS_CONS_FWD_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_CONS_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct cons_tag;
+ struct forward_traversal_tag;
+
+ struct nil;
+
+ template <typename Car, typename Cdr>
+ struct cons;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/cons_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/cons_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_CONS_ITERATOR_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_CONS_ITERATOR_HPP
+
+#include <boost/fusion/support/iterator_base.hpp>
+
+namespace boost { namespace fusion
+{
+ struct cons_iterator_tag;
+ struct forward_traversal_tag;
+
+ template <typename Cons = nil>
+ struct cons_iterator
+ : iterator_base<cons_iterator<Cons> >
+ {
+ typedef cons_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ typedef Cons cons_type;
+
+ template<typename OtherIt>
+ cons_iterator(OtherIt const& it)
+ : cons(it.cons)
+ {}
+
+ cons_iterator(cons_type cons, int)
+ : cons(&cons)
+ {}
+
+ template<typename OtherIt>
+ cons_iterator&
+ operator=(OtherIt const& other_it)
+ {
+ cons=other_it.cons;
+ return *this;
+ }
+
+ typename detail::remove_reference<cons_type>::type* cons;
+ };
+
+ struct nil_iterator
+ : iterator_base<nil_iterator>
+ {
+ typedef forward_traversal_tag category;
+ typedef cons_iterator_tag fusion_tag;
+ typedef nil cons_type;
+
+ nil_iterator()
+ {}
+
+ nil_iterator(nil const&,int)
+ {}
+ };
+
+#define BOOST_FUSION_NIL_ITERATOR(COMBINATION,_)\
+ template <>\
+ struct cons_iterator<nil COMBINATION>\
+ : nil_iterator\
+ {\
+ cons_iterator()\
+ {}\
+ \
+ explicit\
+ cons_iterator(nil COMBINATION, int)\
+ {}\
+ };
+
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(BOOST_FUSION_NIL_ITERATOR,_)
+
+#undef BOOST_FUSION_NIL_ITERATOR
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/convert_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/convert_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,47 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_CONVERT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_CONVERT_IMPL_HPP
+
+#include <boost/fusion/container/list/detail/cons/build_cons.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename T>
+ struct convert_impl;
+
+ template <>
+ struct convert_impl<cons_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ detail::build_cons<
+ typename result_of::begin<SeqRef>::type
+ , typename result_of::end<SeqRef>::type
+ >
+ build_cons;
+
+ typedef typename build_cons::type type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return build_cons::call(
+ fusion::begin(seq),
+ fusion::end(seq));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_DEREF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<cons_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<ItRef>::type::cons_type
+ cons_type;
+ typedef typename
+ detail::remove_reference<cons_type>::type::car_type
+ car_type;
+
+ typedef typename
+ detail::forward_as<cons_type,car_type>::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return it.cons->car;
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/empty_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/empty_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_EMPTY_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_EMPTY_IMPL_HPP
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct empty_impl;
+
+ template <>
+ struct empty_impl<cons_tag>
+ {
+ template <typename Seq>
+ struct apply
+ : boost::is_same<typename detail::identity<Seq>::type, nil>
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_END_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<cons_tag>
+ {
+ template <typename Seq>
+ struct apply
+ {
+ typedef
+ cons_iterator<typename detail::forward_as<Seq,nil>::type>
+ type;
+
+ static type
+ call(Seq)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_EQUAL_TO_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct equal_to_impl;
+
+ template <>
+ struct equal_to_impl<cons_iterator_tag>
+ {
+ template <typename It1Ref, typename It2Ref>
+ struct apply
+ : is_same<
+ typename detail::identity<
+ typename detail::remove_reference<
+ It1Ref
+ >::type::cons_type
+ >::type
+ , typename detail::identity<
+ typename detail::remove_reference<
+ It2Ref
+ >::type::cons_type
+ >::type
+ >
+ {
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_NEXT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_NEXT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<cons_iterator_tag>
+ {
+ template <typename It>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<It>::type::cons_type
+ cons_type;
+ typedef typename
+ detail::remove_reference<cons_type>::type::cdr_type
+ cdr_type;
+
+ typedef
+ cons_iterator<
+ typename detail::forward_as<cons_type, cdr_type>::type
+ >
+ type;
+
+ static type
+ call(It it)
+ {
+ return type(it.cons->cdr,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_VALUE_AT_IMPL_HPP
+
+#include <boost/mpl/eval_if.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<cons_tag>
+ {
+ template <typename Seq, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<Seq>::type
+ identity_sequence;
+
+ typedef typename
+ mpl::eval_if<
+ N
+ , mpl::identity<typename identity_sequence::car_type>
+ //cschmidt: qualifiers could be moved here, though
+ //this is not necessary!
+ , apply<typename identity_sequence::cdr_type
+ , mpl::int_<N::value-1>
+ >
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/cons/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_CONS_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_CONS_VALUE_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<cons_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<ItRef>::type::cons_type
+ cons_type;
+
+ typedef typename
+ detail::remove_reference<cons_type>::type::car_type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_LIST_DETAIL_LIST_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_LIST_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<list_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ result_of::at<
+ typename detail::forward_as<
+ SeqRef
+ , typename detail::remove_reference<
+ SeqRef
+ >::type::storage_type
+ >::type
+ , N
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return fusion::at<N>(seq.get_data());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_LIST_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_LIST_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<list_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ list_iterator_tag
+ , bidirectional_traversal_tag
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_LIST_DETAIL_LIST_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_LIST_DEREF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<list_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ result_of::at<
+ typename detail::forward_as<
+ typename it::seq_type
+ , typename detail::remove_reference<
+ typename it::seq_type
+ >::type::storage_type
+ >::type
+ , typename it::index
+ >::type
+ type;
+
+ static type
+ call(ItRef it_)
+ {
+ return at<typename it::index>(it_.seq->get_data());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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_FUSION_CONTAINER_LIST_DETAIL_LIST_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_LIST_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<list_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ list_iterator_tag
+ , bidirectional_traversal_tag
+ , SeqRef
+ , result_of::size<SeqRef>::type::value
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_LIST_DETAIL_LIST_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_LIST_VALUE_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ //TODO doc
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<list_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ result_of::value_at<
+ typename detail::remove_reference<
+ SeqRef
+ >::type::storage_type
+ , N
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/detail/list/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_LIST_DETAIL_LIST_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_LIST_DETAIL_LIST_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<list_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ result_of::value_at<
+ typename detail::remove_reference<
+ typename it::seq_type
+ >::type::storage_type
+ , typename it::index
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/limits.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_LIMITS_HPP
+#define BOOST_FUSION_CONTAINER_LIST_LIMITS_HPP
+
+#include <boost/fusion/container/vector/limits.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# ifndef FUSION_MAX_LIST_SIZE
+# define FUSION_MAX_LIST_SIZE FUSION_MAX_VECTOR_SIZE
+# else
+# if FUSION_MAX_LIST_SIZE < 3
+# undef FUSION_MAX_LIST_SIZE
+# if (FUSION_MAX_VECTOR_SIZE > 10)
+# define FUSION_MAX_LIST_SIZE 10
+# else
+# define FUSION_MAX_LIST_SIZE FUSION_MAX_VECTOR_SIZE
+# endif
+# endif
+# endif
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/list.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,77 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_LIST_HPP
+#define BOOST_FUSION_CONTAINER_LIST_LIST_HPP
+
+#include <boost/fusion/container/list/list_fwd.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/fusion/container/list/detail/list/begin_impl.hpp>
+#include <boost/fusion/container/list/detail/list/end_impl.hpp>
+#include <boost/fusion/container/list/detail/list/at_impl.hpp>
+#include <boost/fusion/container/list/detail/list/value_at_impl.hpp>
+#include <boost/fusion/container/list/detail/list/deref_impl.hpp>
+#include <boost/fusion/container/list/detail/list/value_of_impl.hpp>
+
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ VARIADIC_TEMPLATE(FUSION_MAX_LIST_SIZE)
+ struct list
+ : sequence_base<list<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_LIST_SIZE)> >
+ {
+ typedef bidirectional_traversal_tag category;
+ typedef list_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+
+ typedef
+ vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_LIST_SIZE)>
+ storage_type;
+ typedef typename storage_type::size size;
+
+ list()
+ {}
+
+#define BOOST_FUSION_LIST_CTOR(COMBINATION,_)\
+ list(list COMBINATION list_)\
+ : data(BOOST_FUSION_FORWARD(list COMBINATION,list_).data)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_LIST_CTOR,_)
+
+#undef BOOST_FUSION_LIST_CTOR
+
+#define BOOST_FUSION_SEQ_NAME list
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_LIST_SIZE
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+ template <typename Seq>
+ list&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ data = BOOST_FUSION_FORWARD(Seq, seq);
+ return *this;
+ }
+
+ storage_type& get_data() { return data; }
+ storage_type const& get_data() const { return data; }
+
+ private:
+ storage_type data;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/list/list_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/list/list_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,25 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ 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_FUSION_CONTAINER_LIST_LIST_FWD_HPP
+#define BOOST_FUSION_CONTAINER_LIST_LIST_FWD_HPP
+
+#include <boost/fusion/container/list/limits.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+
+namespace boost { namespace fusion
+{
+ struct list_tag;
+ struct list_iterator_tag;
+ struct forward_traversal_tag;
+ struct bidirectional_traversal_tag;
+
+ VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_LIST_SIZE)
+ struct list;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,15 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_MAP_HPP
+#define BOOST_FUSION_CONTAINER_MAP_HPP
+
+#include <boost/fusion/container/map/limits.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/container/map/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/convert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_MAP_CONVERT_HPP
+#define BOOST_FUSION_CONTAINER_MAP_CONVERT_HPP
+
+#include <boost/fusion/container/map/map.hpp>
+
+#define BOOST_FUSION_SEQ_NAME map
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_MAP_SIZE
+#include <boost/fusion/container/detail/convert_impl.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<map_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ map_iterator_tag
+ , map_category
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/deref_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/deref_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,41 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_data_impl;
+
+ template <>
+ struct deref_data_impl<map_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ detail::forward_as<
+ typename it::seq_type
+ , typename result_of::value_of<ItRef>::type::second_type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return deref(it).second;
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<map_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ result_of::at<
+ typename detail::forward_as<
+ typename it::seq_type
+ , typename detail::remove_reference<
+ typename it::seq_type
+ >::type::storage_type
+ >::type
+ , typename it::index
+ >::type
+ type;
+
+ static type
+ call(ItRef it_)
+ {
+ return at<typename it::index>(it_.seq->get_data());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<map_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ map_iterator_tag
+ , map_category
+ , SeqRef
+ , detail::remove_reference<SeqRef>::type::size::value
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/key_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/key_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/container/map/detail/value_of_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <>
+ struct key_of_impl<map_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ value_of_impl<map_iterator_tag>::
+ template apply<ItRef>::type::first_type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/value_of_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/value_of_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/container/map/detail/value_of_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <>
+ struct value_of_data_impl<map_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ value_of_impl<map_iterator_tag>::
+ template apply<ItRef>::type::second_type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_MAP_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<map_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ result_of::value_at<
+ typename detail::remove_reference<
+ typename it::seq_type
+ >::type::storage_type
+ , typename it::index
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/limits.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_MAP_LIMITS_HPP
+#define BOOST_FUSION_CONTAINER_MAP_LIMITS_HPP
+
+#include <boost/fusion/container/vector/limits.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# ifndef FUSION_MAX_MAP_SIZE
+# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE
+# else
+# if FUSION_MAX_MAP_SIZE < 3
+# undef FUSION_MAX_MAP_SIZE
+# if (FUSION_MAX_VECTOR_SIZE > 10)
+# define FUSION_MAX_MAP_SIZE 10
+# else
+# define FUSION_MAX_MAP_SIZE FUSION_MAX_VECTOR_SIZE
+# endif
+# endif
+# endif
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_MAP_MAP_HPP
+#define BOOST_FUSION_CONTAINER_MAP_MAP_HPP
+
+#include <boost/fusion/container/map/map_fwd.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+#include <boost/fusion/container/map/detail/begin_impl.hpp>
+#include <boost/fusion/container/map/detail/end_impl.hpp>
+#include <boost/fusion/container/map/detail/deref_impl.hpp>
+#include <boost/fusion/container/map/detail/value_of_impl.hpp>
+#include <boost/fusion/container/map/detail/value_of_data_impl.hpp>
+#include <boost/fusion/container/map/detail/deref_data_impl.hpp>
+#include <boost/fusion/container/map/detail/key_of_impl.hpp>
+
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ VARIADIC_TEMPLATE(FUSION_MAX_MAP_SIZE)
+ struct map
+ : sequence_base<map<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_MAP_SIZE)> >
+ {
+ typedef map_category category;
+ typedef map_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+
+ typedef
+ vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_MAP_SIZE)>
+ storage_type;
+ typedef typename storage_type::size size;
+
+ map()
+ {}
+
+#define BOOST_FUSION_MAP_CTOR(COMBINATION,_)\
+ map(map COMBINATION map_)\
+ : data(BOOST_FUSION_FORWARD(map COMBINATION,map_).data)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_MAP_CTOR,_)
+
+#undef BOOST_FUSION_MAP_CTOR
+
+#define BOOST_FUSION_SEQ_NAME map
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_MAP_SIZE
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+ template <typename Seq>
+ map&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ data = BOOST_FUSION_FORWARD(Seq, seq);
+ return *this;
+ }
+
+ storage_type& get_data() { return data; }
+ storage_type const& get_data() const { return data; }
+
+ private:
+ storage_type data;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/map/map_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/map/map_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ 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_FUSION_CONTAINER_MAP_MAP_FWD_HPP
+#define BOOST_FUSION_CONTAINER_MAP_MAP_FWD_HPP
+
+#include <boost/fusion/container/map/limits.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+
+namespace boost { namespace fusion
+{
+ struct map_tag;
+ struct map_iterator_tag;
+
+ struct map_category
+ : bidirectional_traversal_tag, associative_sequence_tag
+ {};
+
+ VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_MAP_SIZE)
+ struct map;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,15 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_SET_HPP
+#define BOOST_FUSION_CONTAINER_SET_HPP
+
+#include <boost/fusion/container/set/limits.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/container/set/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/convert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_SET_CONVERT_HPP
+#define BOOST_FUSION_CONTAINER_SET_CONVERT_HPP
+
+#include <boost/fusion/container/set/set.hpp>
+
+#define BOOST_FUSION_SEQ_NAME set
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_SET_SIZE
+#include <boost/fusion/container/detail/convert_impl.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<set_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ set_iterator_tag
+ , set_category
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/deref_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/deref_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/container/set/detail/deref_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_data_impl;
+
+ template <>
+ struct deref_data_impl<set_iterator_tag>
+ : deref_impl<set_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<set_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ result_of::at<
+ typename detail::forward_as<
+ typename it::seq_type
+ , typename detail::remove_reference<
+ typename it::seq_type
+ >::type::storage_type
+ >::type
+ , typename it::index
+ >::type
+ type;
+
+ static type
+ call(ItRef it_)
+ {
+ return at<typename it::index>(it_.seq->get_data());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<set_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ set_iterator_tag
+ , set_category
+ , SeqRef
+ , detail::remove_reference<SeqRef>::type::size::value
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/key_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/key_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <>
+ struct key_of_impl<set_iterator_tag>
+ : value_of_impl<set_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/value_of_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/value_of_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <>
+ struct value_of_data_impl<set_iterator_tag>
+ : value_of_impl<set_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_SET_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<set_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ result_of::value_at<
+ typename detail::remove_reference<
+ typename it::seq_type
+ >::type::storage_type
+ , typename it::index
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/limits.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_SET_LIMITS_HPP
+#define BOOST_FUSION_CONTAINER_SET_LIMITS_HPP
+
+#include <boost/fusion/container/vector/limits.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# ifndef FUSION_MAX_SET_SIZE
+# define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE
+# else
+# if FUSION_MAX_SET_SIZE < 3
+# undef FUSION_MAX_SET_SIZE
+# if (FUSION_MAX_VECTOR_SIZE > 10)
+# define FUSION_MAX_SET_SIZE 10
+# else
+# define FUSION_MAX_SET_SIZE FUSION_MAX_VECTOR_SIZE
+# endif
+# endif
+# endif
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/set.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,78 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_SET_SET_HPP
+#define BOOST_FUSION_CONTAINER_SET_SET_HPP
+
+#include <boost/fusion/container/set/set_fwd.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+#include <boost/fusion/container/set/detail/begin_impl.hpp>
+#include <boost/fusion/container/set/detail/end_impl.hpp>
+#include <boost/fusion/container/set/detail/deref_impl.hpp>
+#include <boost/fusion/container/set/detail/value_of_impl.hpp>
+#include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
+#include <boost/fusion/container/set/detail/deref_data_impl.hpp>
+#include <boost/fusion/container/set/detail/key_of_impl.hpp>
+
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ VARIADIC_TEMPLATE(FUSION_MAX_SET_SIZE)
+ struct set
+ : sequence_base<set<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_SET_SIZE)> >
+ {
+ typedef set_category category;
+ typedef set_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+
+ typedef
+ vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_SET_SIZE)>
+ storage_type;
+ typedef typename storage_type::size size;
+
+ set()
+ {}
+
+#define BOOST_FUSION_SET_CTOR(COMBINATION,_)\
+ set(set COMBINATION set_)\
+ : data(BOOST_FUSION_FORWARD(set COMBINATION,set_).data)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_SET_CTOR,_)
+
+#undef BOOST_FUSION_SET_CTOR
+
+#define BOOST_FUSION_SEQ_NAME set
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_SET_SIZE
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+ template <typename Seq>
+ set&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ data = BOOST_FUSION_FORWARD(Seq, seq);
+ return *this;
+ }
+
+ storage_type& get_data() { return data; }
+ storage_type const& get_data() const { return data; }
+
+ private:
+ storage_type data;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/set/set_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/set/set_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ 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_FUSION_CONTAINER_SET_SET_FWD_HPP
+#define BOOST_FUSION_CONTAINER_SET_SET_FWD_HPP
+
+#include <boost/fusion/container/set/limits.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+
+namespace boost { namespace fusion
+{
+ struct set_tag;
+ struct set_iterator_tag;
+
+ struct set_category
+ : bidirectional_traversal_tag, associative_sequence_tag
+ {};
+
+ VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_SET_SIZE)
+ struct set;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_HPP
+
+#include <boost/fusion/container/vector/limits.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/container/vector/vector20.hpp>
+#include <boost/fusion/container/vector/vector30.hpp>
+#include <boost/fusion/container/vector/vector40.hpp>
+#include <boost/fusion/container/vector/vector50.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/convert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_CONVERT_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_CONVERT_HPP
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define BOOST_FUSION_SEQ_NAME vector
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/detail/convert_impl.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_AT_IMPL_HPP
+
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<vector_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::forward_as<
+ SeqRef
+ , typename mpl::at<
+ typename detail::remove_reference<
+ SeqRef
+ >::type::types
+ , N
+ >::type
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return seq.at_impl(N());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<vector_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ vector_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , 0
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,48 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<vector_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+ typedef typename it::seq_type vector;
+
+ typedef
+ typename detail::forward_as<
+ vector
+ , typename mpl::at<
+ typename detail::remove_reference<
+ vector
+ >::type::types
+ , typename it::index
+ >::type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return it.seq->at_impl(typename it::index());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/iterator/basic_iterator.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<vector_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ basic_iterator<
+ vector_iterator_tag
+ , random_access_traversal_tag
+ , SeqRef
+ , detail::remove_reference<SeqRef>::type::size::value
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(seq,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,87 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_DETAIL_PP_VECTOR_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_PP_VECTOR_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/container/vector/detail/pp/vector_n_chooser.hpp>
+
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/add_const.hpp>
+
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ VARIADIC_TEMPLATE(FUSION_MAX_VECTOR_SIZE)
+ struct vector
+ : sequence_base<vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_VECTOR_SIZE)> >
+ {
+ typedef typename
+ detail::vector_n_chooser<
+ EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_VECTOR_SIZE)
+ >::type
+ vector_n;
+
+ typedef typename vector_n::fusion_tag fusion_tag;
+ typedef typename vector_n::tag tag;
+ typedef typename vector_n::size size;
+ typedef typename vector_n::category category;
+ typedef typename vector_n::is_view is_view;
+
+ typedef typename vector_n::types types;
+ typedef vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_VECTOR_SIZE)> self_type;
+
+ vector()
+ {}
+
+#define BOOST_FUSION_VECTOR_CTOR(COMBINATION,_)\
+ vector(self_type COMBINATION vec)\
+ : data(BOOST_FUSION_FORWARD(self_type COMBINATION,vec).data)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_CTOR,_);
+
+#undef BOOST_FUSION_VECTOR_CTOR
+
+#define BOOST_FUSION_SEQ_NAME vector
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+ template <typename Seq>
+ vector&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ data = BOOST_FUSION_FORWARD(Seq,seq);
+ return *this;
+ }
+
+ template <typename I>
+ typename detail::add_lref<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return data.at_impl(I());
+ }
+
+ template <typename I>
+ typename detail::add_lref<
+ typename add_const<typename mpl::at<types, I>::type>::type
+ >::type
+ at_impl(I) const
+ {
+ return data.at_impl(I());
+ }
+
+ vector_n data;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,290 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+# include <boost/fusion/container/vector/vector_fwd.hpp>
+# ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/size.hpp>
+# endif
+# include <boost/fusion/sequence/intrinsic/begin.hpp>
+# include <boost/fusion/iterator/deref.hpp>
+# include <boost/fusion/iterator/next.hpp>
+# include <boost/fusion/iterator/advance_c.hpp>
+# include <boost/fusion/support/sequence_base.hpp>
+# include <boost/fusion/support/internal/ref.hpp>
+# include <boost/fusion/support/internal/sequence_assign.hpp>
+
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/dec.hpp>
+# include <boost/preprocessor/empty.hpp>
+# include <boost/preprocessor/repetition/enum.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# include <boost/preprocessor/repetition/repeat.hpp>
+# include <boost/preprocessor/repetition/repeat_from_to.hpp>
+# include <boost/preprocessor/iteration/iterate.hpp>
+
+# include <boost/mpl/int.hpp>
+# include <boost/mpl/bool.hpp>
+# include <boost/mpl/at.hpp>
+# ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/mpl/equal_to.hpp>
+# endif
+
+# include <boost/type_traits/add_const.hpp>
+# include <boost/utility/enable_if.hpp>
+# ifdef BOOST_NO_RVALUE_REFERENCES
+# include <boost/call_traits.hpp>
+# endif
+
+# include <boost/fusion/container/vector/detail/at_impl.hpp>
+# include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+# include <boost/fusion/container/vector/detail/begin_impl.hpp>
+# include <boost/fusion/container/vector/detail/end_impl.hpp>
+# include <boost/fusion/container/vector/detail/deref_impl.hpp>
+# include <boost/fusion/container/vector/detail/value_of_impl.hpp>
+
+# define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/pp/vector_n.hpp>
+# define BOOST_PP_ITERATION_LIMITS (BOOST_FUSION_FROM, BOOST_FUSION_TO)
+# include BOOST_PP_ITERATE()
+
+#else
+# define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+namespace boost { namespace fusion
+{
+# if !BOOST_FUSION_N
+ struct void_;
+
+ template <typename T0=void_>
+ struct vector0;
+
+ template<>
+ struct vector0<void_>
+ : sequence_base<vector0<void_> >
+# else
+ template <BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename T)>
+ struct BOOST_PP_CAT(vector, BOOST_FUSION_N)
+ : sequence_base<BOOST_PP_CAT(vector, BOOST_FUSION_N)<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N,T)>
+ >
+# endif
+ {
+ typedef
+ mpl::BOOST_PP_CAT(vector, BOOST_FUSION_N)<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)
+ >
+ types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<BOOST_FUSION_N> size;
+
+# define BOOST_FUSION_DEFAULT_MEMBER_INIT(Z, N, _) BOOST_PP_CAT(m,N)()
+
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)()
+# if BOOST_FUSION_N
+ : BOOST_PP_ENUM(BOOST_FUSION_N, BOOST_FUSION_DEFAULT_MEMBER_INIT, _)
+# endif
+ {}
+
+# undef BOOST_FUSION_DEFAULT_MEMBER_INIT
+
+# if BOOST_FUSION_N
+# define BOOST_FUSION_SELF_TYPE\
+ BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N,T)>
+
+# define BOOST_FUSION_MEMBER_INIT(Z, N, COMBINATION)\
+ BOOST_PP_CAT(m,N)(\
+ BOOST_FUSION_FORWARD(BOOST_FUSION_SELF_TYPE COMBINATION,vec).\
+ BOOST_PP_CAT(m,N))
+
+# define BOOST_FUSION_VECTOR_CTOR(COMBINATION,_)\
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)(\
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)<\
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N,T)\
+ > COMBINATION vec)\
+ : BOOST_PP_ENUM(BOOST_FUSION_N, BOOST_FUSION_MEMBER_INIT, COMBINATION)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_CTOR,_)
+
+# undef BOOST_FUSION_MEMBER_INIT
+# undef BOOST_FUSION_SELF_TYPE
+# else
+# define BOOST_FUSION_VECTOR_CTOR(COMBINATION,_)\
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)(\
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)<void_> COMBINATION vec)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_CTOR,_)
+
+# endif
+# undef BOOST_FUSION_VECTOR_CTOR
+
+# if BOOST_FUSION_N
+# define BOOST_FUSION_MEMBER_INIT(Z, N, _)\
+ BOOST_PP_CAT(m,N)(\
+ BOOST_FUSION_FORWARD(BOOST_PP_CAT(A,N), BOOST_PP_CAT(_,N)))
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ template <BOOST_PP_ENUM_PARAMS(N, typename A)>
+#endif
+# if (BOOST_FUSION_N == 1)
+ explicit
+# endif
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)(
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ BOOST_FUSION_N,
+ typename call_traits<T,
+ >::param_type _)
+#else
+ BOOST_PP_ENUM_BINARY_PARAMS(
+ BOOST_FUSION_N,
+ A,
+ BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()) _)
+#endif
+ )
+ : BOOST_PP_ENUM(BOOST_FUSION_N, BOOST_FUSION_MEMBER_INIT, _)
+ {}
+
+# undef BOOST_FUSION_MEMBER_INIT
+# endif
+
+# if BOOST_FUSION_N
+# define BOOST_FUSION_MEMBER_INIT(Z, N, _)\
+ BOOST_PP_CAT(m,N)(fusion::deref(\
+ fusion::advance_c<N>(fusion::begin(seq_assign.get()))))
+# define BOOST_FUSION_VECTOR_ASSIGN_CTOR(COMBINATION,_)\
+ template<typename SeqRef>\
+ BOOST_PP_CAT(vector,BOOST_FUSION_N)(\
+ detail::sequence_assign_type<SeqRef> COMBINATION seq_assign)\
+ : BOOST_PP_ENUM(BOOST_FUSION_N, BOOST_FUSION_MEMBER_INIT, _)\
+ {\
+ BOOST_FUSION_MPL_ASSERT((\
+ mpl::equal_to<size,result_of::size<SeqRef> >));\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_ASSIGN_CTOR,_);
+
+# undef BOOST_FUSION_VECTOR_ASSIGN_CTOR
+# undef BOOST_FUSION_MEMBER_INIT
+# else
+# define BOOST_FUSION_VECTOR_ASSIGN_CTOR(COMBINATION,_)\
+ template<typename SeqRef>\
+ BOOST_PP_CAT(vector,BOOST_FUSION_N)(\
+ detail::sequence_assign_type<SeqRef> COMBINATION seq_assign)\
+ {\
+ BOOST_FUSION_MPL_ASSERT((\
+ mpl::equal_to<size,result_of::size<SeqRef> >));\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_ASSIGN_CTOR,_);
+
+# undef BOOST_FUSION_VECTOR_ASSIGN_CTOR
+# endif
+
+ template <typename Seq>
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)
+ >&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ BOOST_FUSION_MPL_ASSERT((
+ mpl::equal_to<size,result_of::size<Seq> >));
+
+# if BOOST_FUSION_N
+ typedef typename
+ result_of::begin<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ It0;
+ It0 it0 = fusion::begin(seq);
+
+ m0=fusion::deref(it0);
+
+# define BOOST_FUSION_DEREF_MEMBER_ASSIGN(Z, N, _)\
+ typedef typename\
+ result_of::next<BOOST_PP_CAT(It, BOOST_PP_DEC(N))>::type\
+ BOOST_PP_CAT(It, N);\
+ BOOST_PP_CAT(It, N) BOOST_PP_CAT(it, N)=\
+ fusion::next(BOOST_PP_CAT(it, BOOST_PP_DEC(N)));\
+ \
+ BOOST_PP_CAT(m, N) = fusion::deref(BOOST_PP_CAT(it, N));
+
+ BOOST_PP_REPEAT_FROM_TO(
+ 1,
+ BOOST_FUSION_N,
+ BOOST_FUSION_DEREF_MEMBER_ASSIGN,
+ _)
+
+# undef BOOST_FUSION_DEREF_MEMBER_ASSIGN
+# endif
+
+ return *this;
+ }
+
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)
+ >&
+ operator=(
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)<
+ BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)
+ >const& seq)
+ {
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ return this->operator=<
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)
+ <BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)>
+ >(seq);
+#else
+ return this->operator=<
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)
+ <BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)> const&
+ >(seq);
+#endif
+ }
+
+ template<typename I>
+ typename detail::add_lref<typename mpl::at<types, I>::type>::type
+ at_impl(I)
+ {
+ return at_impl(mpl::int_<I::value>());
+ }
+
+ template<typename I>
+ typename detail::add_lref<
+ typename add_const<typename mpl::at<types, I>::type>::type
+ >::type
+ at_impl(I) const
+ {
+ return at_impl(mpl::int_<I::value>());
+ }
+
+# define BOOST_FUSION_MEMBER_DECL(Z, N, _)\
+ typename detail::add_lref<BOOST_PP_CAT(T,N)>::type\
+ at_impl(mpl::int_<N>)\
+ {\
+ return BOOST_PP_CAT(m,N);\
+ }\
+ \
+ typename detail::add_lref<\
+ typename add_const<BOOST_PP_CAT(T,N)>::type\
+ >::type\
+ at_impl(mpl::int_<N>) const\
+ {\
+ return BOOST_PP_CAT(m,N);\
+ }\
+ \
+ BOOST_PP_CAT(T,N) BOOST_PP_CAT(m,N);
+
+ BOOST_PP_REPEAT(BOOST_FUSION_N, BOOST_FUSION_MEMBER_DECL, _)
+
+# undef BOOST_FUSION_MEMBER_DECL
+ };
+}}
+# undef BOOST_FUSION_N
+#endif
+

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n_chooser.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/pp/vector_n_chooser.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,90 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_CONTAINER_VECTOR_DETAIL_PP_VECTOR_N_CHOOSER_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_PP_VECTOR_N_CHOOSER_HPP
+
+#include <boost/fusion/container/vector/limits.hpp>
+// include vector0..N where N is FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/vector/vector10.hpp>
+#if (FUSION_MAX_VECTOR_SIZE > 10)
+# include <boost/fusion/container/vector/vector20.hpp>
+#endif
+#if (FUSION_MAX_VECTOR_SIZE > 20)
+# include <boost/fusion/container/vector/vector30.hpp>
+#endif
+#if (FUSION_MAX_VECTOR_SIZE > 30)
+# include <boost/fusion/container/vector/vector40.hpp>
+#endif
+#if (FUSION_MAX_VECTOR_SIZE > 40)
+# include <boost/fusion/container/vector/vector50.hpp>
+#endif
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#include <boost/mpl/distance.hpp>
+#include <boost/mpl/find.hpp>
+#include <boost/mpl/begin_end.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+}}
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <int N>
+ struct get_vector_n;
+
+#define BOOST_PP_FILENAME_1 \
+ <boost/fusion/container/vector/detail/pp/vector_n_chooser.hpp>
+#define BOOST_PP_ITERATION_LIMITS (0, FUSION_MAX_VECTOR_SIZE)
+#include BOOST_PP_ITERATE()
+
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct vector_n_chooser
+ {
+ typedef
+ mpl::BOOST_PP_CAT(vector, FUSION_MAX_VECTOR_SIZE)
+ <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>
+ input;
+
+ typedef typename mpl::begin<input>::type begin;
+ typedef typename mpl::find<input, void_>::type end;
+ typedef typename mpl::distance<begin, end>::type size;
+
+ typedef typename get_vector_n<size::value>::template
+ call<BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, T)>::type
+ type;
+ };
+}}}
+
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#else // defined(BOOST_PP_IS_ITERATING)
+
+#define N BOOST_PP_ITERATION()
+
+ template <>
+ struct get_vector_n<N>
+ {
+ template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, typename T)>
+ struct call
+ {
+ typedef BOOST_PP_CAT(vector, N)<BOOST_PP_ENUM_PARAMS(N, T)> type;
+ };
+ };
+
+#undef BOOST_FUSION_N
+#endif // defined(BOOST_PP_IS_ITERATING)

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_VALUE_AT_IMPL_HPP
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<vector_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ mpl::at<
+ typename detail::remove_reference<SeqRef>::type::types
+ , N
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/mpl/at.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<vector_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ mpl::at<
+ typename detail::remove_reference<
+ typename it::seq_type
+ >::type::types
+ , typename it::index
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,216 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_DETAIL_VARIADIC_TEMPLATES_VECTOR_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_DETAIL_VARIADIC_TEMPLATES_VECTOR_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp>
+#include <boost/fusion/support/internal/sequence_assign.hpp>
+#include <boost/fusion/support/internal/assign_tags.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/int.hpp>
+
+#include <utility>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+
+ namespace detail
+ {
+ template<int Index,typename... Elements>
+ struct vector_impl;
+
+ template<int Index>
+ struct vector_impl<Index>
+ {
+ template<int,typename...>friend struct vector_impl;
+ template<typename...>friend struct fusion::vector;
+
+ protected:
+ typedef void_ head;
+
+ vector_impl()
+ {}
+
+ vector_impl(assign_directly)
+ {}
+
+ template<typename It>
+ vector_impl(assign_by_deref,It const&)
+ {}
+
+ template<typename It>
+ void
+ assign(It const&)
+ {}
+
+ void at_impl();
+ };
+
+ template<int Index,typename Head,typename... Others>
+ struct vector_impl<Index,Head,Others...>
+ : vector_impl<Index+1,Others...>
+ {
+ template<int,typename...>friend struct vector_impl;
+ template<typename...>friend struct fusion::vector;
+
+ private:
+ typedef vector_impl<Index+1,Others...> base;
+
+ public:
+ using base::at_impl;
+
+ protected:
+ typedef Head head;
+
+ private:
+ Head _element;
+
+ protected:
+ vector_impl()
+ : _element()
+ {}
+
+ template<typename It>
+ vector_impl(assign_by_deref,It const& it)
+ : base(assign_by_deref(),fusion::next(it))
+ , _element(fusion::deref(it))
+ {}
+
+ template<typename It>
+ void
+ assign(It const& it)
+ {
+ _element=fusion::deref(it);
+ static_cast<base*>(this)->assign(fusion::next(it));
+ }
+
+ template<typename OtherHead,typename... OtherElements>
+ vector_impl(assign_directly,
+ BOOST_FUSION_R_ELSE_CLREF(OtherHead) head,
+ BOOST_FUSION_R_ELSE_CLREF(OtherElements)... elements)
+ : base(assign_directly(),
+ BOOST_FUSION_FORWARD(OtherElements,elements)...)
+ , _element(BOOST_FUSION_FORWARD(OtherHead,head))
+ {}
+
+ typename detail::add_lref<Head>::type
+ at_impl(mpl::int_<Index>)
+ {
+ return _element;
+ }
+
+ typename detail::add_lref<typename add_const<Head>::type>::type
+ at_impl(mpl::int_<Index>)const
+ {
+ return _element;
+ }
+ };
+ }
+
+ template<typename... Elements>
+ struct vector
+ : sequence_base<vector<Elements...> >
+ , detail::vector_impl<0,Elements...>
+ {
+ private:
+ typedef detail::vector_impl<0,Elements...> base;
+
+ public:
+ typedef vector<Elements...> this_type;
+ typedef typename
+ detail::variadic_arguments_to_vector<Elements...>::type
+ types;
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<sizeof...(Elements)> size;
+
+ vector()
+ {}
+
+#define VECTOR_CTOR(COMBINATION,_)\
+ vector(vector COMBINATION vec)\
+ : base(detail::assign_by_deref(),\
+ fusion::begin(BOOST_FUSION_FORWARD(vector COMBINATION,vec)))\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(VECTOR_CTOR,_)
+
+#undef VECTOR_CTOR
+
+ template<typename... OtherArguments>
+ explicit
+ vector(BOOST_FUSION_R_ELSE_CLREF(OtherArguments)... arguments)
+ : base(detail::assign_directly(),
+ BOOST_FUSION_FORWARD(OtherArguments,arguments)...)
+ {
+ BOOST_FUSION_STATIC_ASSERT((
+ sizeof...(Elements)==sizeof...(OtherArguments)));
+ }
+
+#define BOOST_FUSION_VECTOR_ASSIGN_CTOR(COMBINATION,_)\
+ template<typename SeqRef>\
+ vector(detail::sequence_assign_type<SeqRef> COMBINATION seq_assign)\
+ : base(detail::assign_by_deref(),fusion::begin(seq_assign.get()))\
+ {\
+ BOOST_FUSION_STATIC_ASSERT((\
+ sizeof...(Elements)==result_of::size<SeqRef>::value));\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_ASSIGN_CTOR,_);
+
+#undef BOOST_FUSION_VECTOR_ASSIGN_CTOR
+
+ /*
+ template<typename Seq>
+ vector(typename enable_if_c<sizeof...(Elements)!=1,
+ BOOST_FUSION_R_ELSE_CLREF(Seq)>::type seq)
+ : base(detail::assign_by_deref(),
+ fusion::begin(BOOST_FUSION_FORWARD(Seq,seq.seq)))
+ {}
+ */
+
+ template<typename Seq>
+ vector&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ BOOST_FUSION_STATIC_ASSERT((
+ sizeof...(Elements)==result_of::size<Seq>::value));
+
+ static_cast<base*>(this)->assign(
+ fusion::begin(BOOST_FUSION_FORWARD(Seq,seq)));
+ return *this;
+ }
+
+ template<typename I>
+ typename detail::add_lref<
+ typename mpl::at<types, I>::type
+ >::type
+ at_impl(I)
+ {
+ return base::at_impl(mpl::int_<I::value>());
+ }
+
+ template<typename I>
+ typename detail::add_lref<
+ typename add_const<typename mpl::at<types, I>::type>::type
+ >::type
+ at_impl(I) const
+ {
+ return base::at_impl(mpl::int_<I::value>());
+ }
+ };
+
+}}
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,94 @@
+// Copyright Christopher Schmidt 2009.
+// 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_PP_IS_ITERATING
+# include <boost/fusion/container/vector/vector.hpp>
+
+# include <boost/preprocessor/iteration/iterate.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/repetition/enum.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+
+# define BOOST_PP_FILENAME_1 <boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp>
+# define BOOST_PP_ITERATION_LIMITS (BOOST_FUSION_FROM, BOOST_FUSION_TO)
+# include BOOST_PP_ITERATE()
+
+#else
+# define BOOST_FUSION_N BOOST_PP_ITERATION()
+
+ //cschmidt: template typedefs if possible...
+namespace boost { namespace fusion
+{
+# if !BOOST_FUSION_N
+ struct void_;
+
+ template <typename T0=void_>
+ struct vector0;
+
+ template<>
+ struct vector0<void_>
+# else
+ template <BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename T)>
+ struct BOOST_PP_CAT(vector, BOOST_FUSION_N)
+# endif
+ : vector<BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)>
+ {
+ private:
+ typedef vector<BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, T)> base;
+
+ public:
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)()
+ {}
+
+# define BOOST_FUSION_VECTOR_CTOR(COMBINATION,_)\
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)(\
+ BOOST_PP_CAT(vector, BOOST_FUSION_N) COMBINATION vec)\
+ : base(sequence_assign(BOOST_FUSION_FORWARD(\
+ BOOST_PP_CAT(vector, BOOST_FUSION_N) COMBINATION,vec)))\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VECTOR_CTOR,_)
+
+# undef BOOST_FUSION_VECTOR_CTOR
+
+ template<typename Arg>
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)(BOOST_FUSION_R_ELSE_CLREF(Arg) arg)
+ : base(BOOST_FUSION_FORWARD(Arg,arg))
+ {}
+
+# if BOOST_FUSION_N > 1
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)(
+ BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& a))
+ : base(BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, a))
+ {}
+# else
+# define BOOST_FUSION_FORWARD_ARGUMENT(Z, N, __) std::forward<\
+ BOOST_PP_CAT(A,N)>(BOOST_PP_CAT(_,N))
+
+ template <BOOST_PP_ENUM_PARAMS(BOOST_FUSION_N, typename A)>
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)(
+ BOOST_PP_ENUM_BINARY_PARAMS(BOOST_FUSION_N, A,&& _))
+ : base(
+ BOOST_PP_ENUM(BOOST_FUSION_N, BOOST_FUSION_FORWARD_ARGUMENT, _))
+ {}
+
+# undef BOOST_FUSION_FORWARD_ARGUMENT
+# endif
+# endif
+
+ template<typename Seq>
+ BOOST_PP_CAT(vector, BOOST_FUSION_N)&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ *static_cast<base*>(this)=BOOST_FUSION_FORWARD(Seq,seq);
+ return *this;
+ }
+ };
+}}
+
+ #undef N
+#endif
+

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/limits.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,24 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_LIMITS_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_LIMITS_HPP
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# ifndef FUSION_MAX_VECTOR_SIZE
+# define FUSION_MAX_VECTOR_SIZE 10
+# else
+# if FUSION_MAX_VECTOR_SIZE < 3
+# undef FUSION_MAX_VECTOR_SIZE
+# define FUSION_MAX_VECTOR_SIZE 10
+# endif
+# endif
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,27 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_VECTOR_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_VECTOR_HPP
+
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/vector/detail/pp/vector.hpp>
+#else
+# include <boost/fusion/container/vector/vector_fwd.hpp>
+# include <boost/fusion/support/internal/ref.hpp>
+
+# include <boost/fusion/container/vector/detail/at_impl.hpp>
+# include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+# include <boost/fusion/container/vector/detail/begin_impl.hpp>
+# include <boost/fusion/container/vector/detail/end_impl.hpp>
+# include <boost/fusion/container/vector/detail/deref_impl.hpp>
+# include <boost/fusion/container/vector/detail/value_of_impl.hpp>
+
+# include <boost/fusion/container/vector/detail/variadic_templates/vector.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector10.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector10.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_VECTOR10_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_VECTOR10_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/vector/vector10.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_FROM 0
+# define BOOST_FUSION_TO 10
+
+# ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include<boost/fusion/container/vector/detail/pp/vector_n.hpp>
+# else
+# include<boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp>
+# endif
+
+# undef BOOST_FUSION_FROM
+# undef BOOST_FUSION_TO
+#else
+# include <boost/fusion/container/vector/vector.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector20.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector20.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_VECTOR20_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_VECTOR20_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/vector/vector20.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_FROM 11
+# define BOOST_FUSION_TO 20
+
+# ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include<boost/fusion/container/vector/detail/pp/vector_n.hpp>
+# else
+# include<boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp>
+# endif
+
+# undef BOOST_FUSION_FROM
+# undef BOOST_FUSION_TO
+#else
+# include <boost/fusion/container/vector/vector.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector30.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector30.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_VECTOR30_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_VECTOR30_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/vector/vector30.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_FROM 21
+# define BOOST_FUSION_TO 30
+
+# ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include<boost/fusion/container/vector/detail/pp/vector_n.hpp>
+# else
+# include<boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp>
+# endif
+
+# undef BOOST_FUSION_FROM
+# undef BOOST_FUSION_TO
+#else
+# include <boost/fusion/container/vector/vector.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector40.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector40.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_VECTOR40_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_VECTOR40_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/vector/vector40.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_FROM 31
+# define BOOST_FUSION_TO 40
+
+# ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include<boost/fusion/container/vector/detail/pp/vector_n.hpp>
+# else
+# include<boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp>
+# endif
+
+# undef BOOST_FUSION_FROM
+# undef BOOST_FUSION_TO
+#else
+# include <boost/fusion/container/vector/vector.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector50.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector50.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_CONTAINER_VECTOR_VECTOR50_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_VECTOR50_HPP
+
+#include <boost/config.hpp>
+#include <boost/mpl/vector/vector50.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_FROM 41
+# define BOOST_FUSION_TO 50
+
+# ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include<boost/fusion/container/vector/detail/pp/vector_n.hpp>
+# else
+# include<boost/fusion/container/vector/detail/variadic_templates/vector_n.hpp>
+# endif
+
+# undef BOOST_FUSION_FROM
+# undef BOOST_FUSION_TO
+#else
+# include <boost/fusion/container/vector/vector.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/container/vector/vector_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,25 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_CONTAINER_VECTOR_VECTOR_FWD_HPP
+#define BOOST_FUSION_CONTAINER_VECTOR_VECTOR_FWD_HPP
+
+#include <boost/fusion/container/vector/limits.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct vector_iterator_tag;
+ struct random_access_traversal_tag;
+
+ VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_VECTOR_SIZE)
+ struct vector;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,16 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_HPP
+#define BOOST_FUSION_FUNCTIONAL_HPP
+
+#include <boost/fusion/functional/invocation.hpp>
+#include <boost/fusion/functional/adapter.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_ADAPTER_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_HPP
+
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+#include <boost/fusion/functional/adapter/fused.hpp>
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/unfused_typed.hpp>
+#include <boost/fusion/functional/adapter/unfused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/0x/fused_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/0x/fused_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,80 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <boost/fusion/functional/invocation/invoke.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+
+namespace boost { namespace fusion
+{
+ template<typename F>
+ struct BOOST_FUSION_ADAPTER_NAME
+ {
+ BOOST_FUSION_ADAPTER_NAME()
+ : f()
+ {}
+
+ template<typename... Args>
+ BOOST_FUSION_ADAPTER_NAME(Args&&... args)
+ : f(std::forward<Args>(args)...)
+ {}
+
+#define BOOST_FUSION_CTOR_SPECIALIZATION(COMBINATION,_)\
+ BOOST_FUSION_ADAPTER_NAME(BOOST_FUSION_ADAPTER_NAME COMBINATION adapter)\
+ : f(std::forward<BOOST_FUSION_ADAPTER_NAME COMBINATION>(adapter).f)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_CTOR_SPECIALIZATION,_)
+
+#undef BOOST_FUSION_CTOR_SPECIALIZATION
+
+ template<typename OtherF>
+ BOOST_FUSION_ADAPTER_NAME&
+ operator=(OtherF&& other_f)
+ {
+ f=std::forward<OtherF>(other_f);
+ return *this;
+ }
+
+#define BOOST_FUSION_ASSIGN_SPECIALIZATION(COMBINATION,_)\
+ BOOST_FUSION_ADAPTER_NAME&\
+ operator=(BOOST_FUSION_ADAPTER_NAME COMBINATION other_adapter)\
+ {\
+ f=std::forward<BOOST_FUSION_ADAPTER_NAME COMBINATION>(\
+ other_adapter).f;\
+ return *this;\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_ASSIGN_SPECIALIZATION,_)
+
+#undef BOOST_FUSION_ASSIGN_SPECIALIZATION
+
+#define BOOST_FUSION_CALL_OPERATOR(COMBINATION)\
+ template<typename Seq>\
+ typename result_of::invoke<\
+ typename detail::forward_as<int COMBINATION, F>::type, Seq&&\
+ >::type\
+ operator()(Seq&& seq) COMBINATION\
+ {\
+ /*BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));*/\
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));\
+ \
+ return\
+ invoke<typename detail::forward_as<int COMBINATION, F>::type>(\
+ f,std::forward<Seq>(seq));\
+ }
+
+ BOOST_FUSION_CALL_OPERATOR(BOOST_PP_EMPTY());
+ BOOST_FUSION_CALL_OPERATOR(const);
+
+#undef BOOST_FUSION_CALL_OPERATOR
+
+ F f;
+ };
+}}
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/0x/unfused_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/0x/unfused_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,112 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+
+#ifdef BOOST_FUSION_TYPED
+# include <boost/fusion/container/vector/convert.hpp>
+
+# define BOOST_FUSION_ADAPTER_NAME unfused_typed
+#else
+# include <boost/fusion/container/generation/vector_tie.hpp>
+
+# define BOOST_FUSION_ADAPTER_NAME unfused
+#endif
+
+//TODO cschmidt: handle rvalue ref F
+
+namespace boost { namespace fusion
+{
+ template<
+ typename F
+#ifdef BOOST_FUSION_TYPED
+ , typename TransformSeq
+#else
+ , bool=true
+#endif
+ >
+ struct BOOST_FUSION_ADAPTER_NAME
+ {
+ BOOST_FUSION_ADAPTER_NAME()
+ : f()
+ {}
+
+ template<typename... Args>
+ BOOST_FUSION_ADAPTER_NAME(Args&&... args)
+ : f(std::forward<Args>(args)...)
+ {}
+
+#define BOOST_FUSION_CTOR_SPECIALIZATION(COMBINATION,_)\
+ BOOST_FUSION_ADAPTER_NAME(BOOST_FUSION_ADAPTER_NAME COMBINATION adapter)\
+ : f(std::forward<BOOST_FUSION_ADAPTER_NAME COMBINATION>(adapter).f)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_CTOR_SPECIALIZATION,_)
+
+#undef BOOST_FUSION_CTOR_SPECIALIZATION
+
+ template<typename OtherF>
+ BOOST_FUSION_ADAPTER_NAME&
+ operator=(OtherF&& other_f)
+ {
+ f=std::forward<OtherF>(other_f);
+ return *this;
+ }
+
+#define BOOST_FUSION_ASSIGN_SPECIALIZATION(COMBINATION,_)\
+ BOOST_FUSION_ADAPTER_NAME&\
+ operator=(BOOST_FUSION_ADAPTER_NAME COMBINATION other_adapter)\
+ {\
+ f=std::forward<BOOST_FUSION_ADAPTER_NAME COMBINATION>(\
+ other_adapter).f;\
+ return *this;\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_ASSIGN_SPECIALIZATION,_)
+
+#undef BOOST_FUSION_ASSIGN_SPECIALIZATION
+
+#ifdef BOOST_FUSION_TYPED
+# define BOOST_FUSION_CALL_OPERATOR(COMBINATION)\
+ template<typename... Args>\
+ typename detail::internal::result_of<\
+ typename detail::get_func_base<\
+ typename detail::forward_as<int COMBINATION, F>::type\
+ >::type(typename result_of::as_vector<TransformSeq&&>::type&&)\
+ >::type\
+ operator()(Args&&... args) COMBINATION\
+ {\
+ return f(fusion::as_vector(\
+ TransformSeq(std::forward<Args>(args)...)));\
+ }
+#else
+# define BOOST_FUSION_CALL_OPERATOR(COMBINATION)\
+ template<typename... Args>\
+ typename detail::internal::result_of<\
+ typename detail::get_func_base<\
+ typename detail::forward_as<int COMBINATION, F>::type\
+ >::type(typename result_of::vector_tie<Args&&...>::type&&)\
+ >::type\
+ operator()(Args&&... args) COMBINATION\
+ {\
+ return f(vector_tie(std::forward<Args>(args)...));\
+ }
+#endif
+
+ BOOST_FUSION_CALL_OPERATOR(BOOST_PP_EMPTY());
+ BOOST_FUSION_CALL_OPERATOR(const);
+
+#undef BOOST_FUSION_CALL_OPERATOR
+
+ F f;
+ };
+}}
+
+#undef BOOST_FUSION_ADAPTER_NAME
+
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/access.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/access.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_ACCESS_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_ACCESS_HPP
+
+namespace boost { namespace fusion { namespace detail
+{
+ // const reference deduction for function templates that accept T const&
+ template <typename T> struct cref { typedef T const& type; };
+ template <typename T> struct cref<T&> { typedef T const& type; };
+ template <typename T> struct cref<T const> { typedef T const& type; };
+
+ // mutable reference deduction for function templates that accept T &
+ template <typename T> struct mref { typedef T & type; };
+ template <typename T> struct mref<T&> { typedef T & type; };
+
+ // generic reference deduction for function templates that are overloaded
+ // to accept both T const& and T &
+ template <typename T> struct gref { typedef T const& type; };
+ template <typename T> struct gref<T&> { typedef T & type; };
+ template <typename T> struct gref<T const> { typedef T const& type; };
+
+ // appropriately qualified target function in const context
+ template <typename T> struct qf_c { typedef T const type; };
+ template <typename T> struct qf_c<T const> { typedef T const type; };
+ template <typename T> struct qf_c<T &> { typedef T type; };
+
+ // appropriately qualified target function in non-const context
+ template <typename T> struct qf { typedef T type; };
+ template <typename T> struct qf<T const> { typedef T const type; };
+ template <typename T> struct qf<T &> { typedef T type; };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,84 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_HPP
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/no_0x/access.hpp>
+#include <boost/fusion/functional/invocation/invoke.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Function> class fused;
+
+ //----- ---- --- -- - - - -
+
+ template <typename Function>
+ class fused
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+ typedef typename detail::qf<Function>::type & func_fwd_t;
+
+ public:
+
+ inline explicit fused(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_const_fwd_t,Seq const>::type
+ operator()(Seq const& s) const
+ {
+ return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_fwd_t,Seq const>::type
+ operator()(Seq const& s)
+ {
+ return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_const_fwd_t,Seq>::type
+ operator()(Seq & s) const
+ {
+ return fusion::invoke<func_const_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke<func_fwd_t,Seq>::type
+ operator()(Seq & s)
+ {
+ return fusion::invoke<func_fwd_t>(this->fnc_transformed,s);
+ }
+
+ template <typename Sig>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self const (Seq) >
+ : result_of::invoke<func_const_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ : result_of::invoke<func_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+
+ };
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,89 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_FUNCTION_OBJECT_HPP
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/no_0x/access.hpp>
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+
+namespace boost { namespace fusion
+{
+ template <class Function> class fused_function_object;
+
+ //----- ---- --- -- - - - -
+
+ template <class Function>
+ class fused_function_object
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+ typedef typename detail::qf<Function>::type & func_fwd_t;
+
+ public:
+
+ inline explicit fused_function_object(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_const_fwd_t,
+ Seq const>::type operator()(Seq const& s) const
+ {
+ return fusion::invoke_function_object<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_fwd_t,
+ Seq const>::type
+ operator()(Seq const& s)
+ {
+ return fusion::invoke_function_object<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_const_fwd_t,
+ Seq>::type
+ operator()(Seq & s) const
+ {
+ return fusion::invoke_function_object<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline typename result_of::invoke_function_object<func_fwd_t,Seq>::type
+ operator()(Seq & s)
+ {
+ return fusion::invoke_function_object<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <typename Sig>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self const (Seq) >
+ : result_of::invoke_function_object<func_const_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ : result_of::invoke_function_object<func_fwd_t,
+ typename boost::remove_reference<Seq>::type >
+ { };
+ };
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/fused_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,69 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_PROCEDURE_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_FUSED_PROCEDURE_HPP
+
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/fusion/functional/adapter/detail/no_0x/access.hpp>
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Function> class fused_procedure;
+
+ //----- ---- --- -- - - - -
+
+ template <typename Function>
+ class fused_procedure
+ {
+ Function fnc_transformed;
+
+ typedef typename detail::qf_c<Function>::type & func_const_fwd_t;
+ typedef typename detail::qf<Function>::type & func_fwd_t;
+
+ public:
+
+ inline explicit fused_procedure(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+
+ template <class Seq>
+ inline void operator()(Seq const& s) const
+ {
+ fusion::invoke_procedure<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline void operator()(Seq const& s)
+ {
+ fusion::invoke_procedure<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline void operator()(Seq & s) const
+ {
+ fusion::invoke_procedure<
+ func_const_fwd_t >(this->fnc_transformed,s);
+ }
+
+ template <class Seq>
+ inline void operator()(Seq & s)
+ {
+ return fusion::invoke_procedure<
+ func_fwd_t >(this->fnc_transformed,s);
+ }
+
+ typedef void result_type;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/unfused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,153 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/facilities/intercept.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/container/vector/vector.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/no_0x/access.hpp>
+
+#include <boost/call_traits.hpp>
+
+namespace boost { namespace fusion
+{
+ template <class Function, bool AllowNullary = true>
+ class unfused;
+
+ //----- ---- --- -- - - - -
+
+ template <class Function>
+ class unfused<Function,true>
+ : public unfused<Function,false>
+ {
+ typedef typename detail::qf_c<Function>::type function_c;
+ typedef typename detail::qf<Function>::type function;
+ typedef typename call_traits<Function>::param_type func_const_fwd_t;
+ public:
+
+ using unfused<Function,false>::operator();
+
+ inline explicit unfused(func_const_fwd_t f = function())
+ : unfused<Function,false>(f)
+ { }
+
+ typedef typename boost::result_of<
+ function_c(fusion::vector0<>&) >::type call_const_0_result;
+
+ inline call_const_0_result operator()() const
+ {
+ fusion::vector0<> arg;
+ return this->fnc_transformed(arg);
+ }
+
+ typedef typename boost::result_of<
+ function(fusion::vector0<>&) >::type call_0_result;
+
+ inline call_0_result operator()()
+ {
+ fusion::vector0<> arg;
+ return this->fnc_transformed(arg);
+ }
+ };
+
+ template <class Function> class unfused<Function,false>
+ {
+ protected:
+ Function fnc_transformed;
+ typedef typename detail::qf_c<Function>::type function_c;
+ typedef typename detail::qf<Function>::type function;
+ typedef typename call_traits<Function>::param_type func_const_fwd_t;
+ public:
+
+ inline explicit unfused(func_const_fwd_t f = function())
+ : fnc_transformed(f)
+ { }
+
+ template <typename Sig>
+ struct result;
+
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/adapter/detail/no_0x/unfused.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (1,BOOST_FUSION_UNFUSED_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+ };
+}}
+
+namespace boost
+{
+ template<class F>
+ struct result_of< boost::fusion::unfused<F> const () >
+ {
+ typedef typename boost::fusion::unfused<F>::call_const_0_result type;
+ };
+ template<class F>
+ struct result_of< boost::fusion::unfused<F>() >
+ {
+ typedef typename boost::fusion::unfused<F>::call_0_result type;
+ };
+}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+////////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+////////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function_c(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::mref<T,>::type BOOST_PP_INTERCEPT) >& )>
+ { };
+
+ template <class Self, BOOST_PP_ENUM_PARAMS(N,typename T)>
+ struct result< Self(BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function(
+ BOOST_PP_CAT(fusion::vector,N)< BOOST_PP_ENUM_BINARY_PARAMS(N,
+ typename detail::mref<T,>::type BOOST_PP_INTERCEPT) >& )>
+ { };
+
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function_c(BOOST_PP_CAT(fusion::vector,N)
+ <BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)>& )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a)) const
+ {
+ BOOST_PP_CAT(fusion::vector,N)<
+ BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+
+ template <BOOST_PP_ENUM_PARAMS(N,typename T)>
+ inline typename boost::result_of<function(BOOST_PP_CAT(fusion::vector,N)
+ <BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT)>& )>::type
+ operator()(BOOST_PP_ENUM_BINARY_PARAMS(N,T,& a))
+ {
+ BOOST_PP_CAT(fusion::vector,N)<
+ BOOST_PP_ENUM_BINARY_PARAMS(N,T,& BOOST_PP_INTERCEPT) >
+ arg(BOOST_PP_ENUM_PARAMS(N,a));
+ return this->fnc_transformed(arg);
+ }
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/unfused_typed.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/detail/no_0x/unfused_typed.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,155 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_TYPED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_UNFUSED_TYPED_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_trailing_params.hpp>
+
+#include <boost/config.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+
+#include <boost/fusion/functional/adapter/limits.hpp>
+#include <boost/fusion/functional/adapter/detail/no_0x/access.hpp>
+
+#include <boost/call_traits.hpp>
+
+namespace boost { namespace fusion
+{
+
+ template <class Function, class Sequence> class unfused_typed;
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ template <class Derived, class Function,
+ class Sequence, long Arity>
+ struct unfused_typed_impl;
+ }
+
+ template <class Function, class Sequence>
+ class unfused_typed
+ : public detail::unfused_typed_impl
+ < unfused_typed<Function,Sequence>, Function, Sequence,
+ result_of::size<Sequence>::value >
+ {
+ Function fnc_transformed;
+
+ template <class D, class F, class S, long A>
+ friend struct detail::unfused_typed_impl;
+
+ typedef typename call_traits<Function>::param_type func_const_fwd_t;
+
+ public:
+
+ inline explicit unfused_typed(func_const_fwd_t f = Function())
+ : fnc_transformed(f)
+ { }
+ };
+
+ #define BOOST_PP_FILENAME_1 <boost/fusion/functional/adapter/detail/no_0x/unfused_typed.hpp>
+ #define BOOST_PP_ITERATION_LIMITS (0,BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+
+}}
+
+namespace boost
+{
+ template<class F, class Seq>
+ struct result_of< boost::fusion::unfused_typed<F,Seq> const () >
+ : boost::fusion::unfused_typed<F,Seq>::template result<
+ boost::fusion::unfused_typed<F,Seq> const () >
+ { };
+ template<class F, class Seq>
+ struct result_of< boost::fusion::unfused_typed<F,Seq>() >
+ : boost::fusion::unfused_typed<F,Seq>::template result<
+ boost::fusion::unfused_typed<F,Seq> () >
+ { };
+}
+
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ namespace detail
+ {
+
+ template <class Derived, class Function, class Sequence>
+ struct unfused_typed_impl<Derived,Function,Sequence,N>
+ {
+ typedef typename detail::qf_c<Function>::type function_c;
+ typedef typename detail::qf<Function>::type function;
+ typedef typename result_of::as_vector<Sequence>::type arg_vector_t;
+
+ public:
+
+#define M(z,i,s) \
+ typename call_traits<typename result_of::value_at_c<s,i>::type>::param_type a##i
+
+ inline typename boost::result_of<
+ function_c(arg_vector_t &) >::type
+ operator()(BOOST_PP_ENUM(N,M,arg_vector_t)) const
+ {
+#if N > 0
+ arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
+#else
+ arg_vector_t arg;
+#endif
+ return static_cast<Derived const *>(this)->fnc_transformed(arg);
+ }
+
+ inline typename boost::result_of<
+ function(arg_vector_t &) >::type
+ operator()(BOOST_PP_ENUM(N,M,arg_vector_t))
+ {
+#if N > 0
+ arg_vector_t arg(BOOST_PP_ENUM_PARAMS(N,a));
+#else
+ arg_vector_t arg;
+#endif
+ return static_cast<Derived *>(this)->fnc_transformed(arg);
+ }
+
+#undef M
+
+ template <typename Sig> struct result { typedef void type; };
+
+ template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
+ struct result< Self const (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function_c(arg_vector_t &) >
+ { };
+
+ template <class Self BOOST_PP_ENUM_TRAILING_PARAMS(N,typename T)>
+ struct result< Self (BOOST_PP_ENUM_PARAMS(N,T)) >
+ : boost::result_of< function(arg_vector_t &) >
+ { };
+ };
+
+ } // namespace detail
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/adapter/detail/no_0x/fused.hpp>
+#else
+# define BOOST_FUSION_ADAPTER_NAME fused
+# include <boost/fusion/functional/adapter/detail/0x/fused_impl.hpp>
+# undef BOOST_FUSION_ADAPTER_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_FUNCTION_OBJECT_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/adapter/detail/no_0x/fused_function_object.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_ADAPTER_NAME fused_function_object
+# include <boost/fusion/functional/adapter/detail/0x/fused_impl.hpp>
+# undef BOOST_FUSION_ADAPTER_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/fused_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_FUSED_PROCEDURE_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/adapter/detail/no_0x/fused_procedure.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_ADAPTER_NAME fused_procedure
+# include <boost/fusion/functional/adapter/detail/0x/fused_impl.hpp>
+# undef BOOST_FUSION_ADAPTER_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/limits.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_LIMITS_HPP
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/container/vector/limits.hpp>
+
+# ifndef BOOST_FUSION_UNFUSED_MAX_ARITY
+# define BOOST_FUSION_UNFUSED_MAX_ARITY 6
+# elif BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+# error "BOOST_FUSION_UNFUSED_GENERIC_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+# endif
+
+# ifndef BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY
+# define BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY 6
+# elif BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE
+# error "BOOST_FUSION_UNFUSED_TYPED_MAX_ARITY > FUSION_MAX_VECTOR_SIZE"
+# endif
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,16 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/adapter/detail/no_0x/unfused.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/detail/0x/unfused_impl.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/adapter/unfused_typed.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP
+#define BOOST_FUSION_FUNCTIONAL_ADAPTER_UNFUSED_TYPED_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/adapter/detail/no_0x/unfused_typed.hpp>
+#else
+# define BOOST_FUSION_TYPED
+# include <boost/fusion/functional/adapter/detail/0x/unfused_impl.hpp>
+# undef BOOST_FUSION_TYPED
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_GENERATION_HPP
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_HPP
+
+#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+#include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+#include <boost/fusion/functional/generation/make_fused.hpp>
+#include <boost/fusion/functional/generation/make_unfused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/detail/gen_make_adapter.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+
+#define BOOST_FUSION_FUNC_NAME BOOST_PP_CAT(make_,BOOST_FUSION_CLASS_TPL_NAME)
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename F>
+ struct BOOST_FUSION_FUNC_NAME
+ {
+ typedef
+ BOOST_FUSION_CLASS_TPL_NAME<
+ typename detail::as_fusion_element<F>::type
+ >
+ type;
+ };
+ }
+
+ template<typename F>
+ inline typename
+ result_of::BOOST_FUSION_FUNC_NAME<BOOST_FUSION_R_ELSE_CLREF(F)>::type
+ BOOST_FUSION_FUNC_NAME(BOOST_FUSION_R_ELSE_CLREF(F) f)
+ {
+ return typename
+ result_of::BOOST_FUSION_FUNC_NAME<BOOST_FUSION_R_ELSE_CLREF(F)>::
+ type(BOOST_FUSION_FORWARD(F,f));
+ }
+}}
+
+#undef BOOST_FUSION_CLASS_TPL_NAME
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/fused.hpp>
+
+# define BOOST_FUSION_CLASS_TPL_NAME fused
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_FUNCTION_OBJECT_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/fused_function_object.hpp>
+
+# define BOOST_FUSION_CLASS_TPL_NAME fused_function_object
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_fused_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_FUSED_PROCEDURE_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/fused_procedure.hpp>
+
+# define BOOST_FUSION_CLASS_TPL_NAME fused_procedure
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/generation/make_unfused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP
+#define BOOST_FUSION_FUNCTIONAL_GENERATION_MAKE_UNFUSED_HPP
+
+#include <boost/config.hpp>
+# if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/fusion/functional/adapter/unfused.hpp>
+
+# define BOOST_FUSION_CLASS_TPL_NAME unfused
+# include <boost/fusion/functional/generation/detail/gen_make_adapter.hpp>
+# undef BOOST_FUSION_CLASS_TPL_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_INVOCATION_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_HPP
+
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+#include <boost/fusion/functional/invocation/invoke.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/0x/invoke_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/0x/invoke_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,37 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <boost/fusion/functional/invocation/detail/0x/invoke_impl_detail.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template<typename F, typename Seq>
+ struct BOOST_FUSION_INVOKE_NAME
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef
+ detail::invoke_impl<
+ typename detail::add_lref<F>::type
+ , typename detail::add_lref<Seq>::type
+ >
+ gen;
+
+ typedef typename gen::type type;
+ };
+ }
+
+ //TODO doc
+ template <typename F, typename Seq>
+ inline typename result_of::BOOST_FUSION_INVOKE_NAME<F, Seq&&>::type
+ BOOST_FUSION_INVOKE_NAME(BOOST_FUSION_R_ELSE_CLREF(F) f, Seq&& seq)
+ {
+ return result_of::BOOST_FUSION_INVOKE_NAME<F, Seq&&>::gen::call(f,seq);
+ }
+}}
+

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/0x/invoke_impl_detail.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/0x/invoke_impl_detail.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,239 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_INVOCATION_DETAIL_DECLTYPE_AND_VARIADIC_TEMPLATES_INVOKE_IMPL_DETAIL_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_DECLTYPE_AND_VARIADIC_TEMPLATES_INVOKE_IMPL_DETAIL_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/advance_c.hpp>
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename FRef, typename... Args>
+ struct invoke_impl_result
+ {
+ typedef typename
+ boost::result_of<
+ FRef(Args...)
+ >::type
+ type;
+ };
+
+ template<typename Result, typename F, typename... Args>
+ typename
+ disable_if<
+ is_member_function_pointer<
+ typename detail::remove_reference<F>::type
+ >
+ , Result
+ >::type
+ invoke_impl_call(F&& f, Args&&... args)
+ {
+ return f(std::forward<Args>(args)...);
+ }
+
+ template<
+ typename Result
+ , typename F
+ , typename ClassInstance
+ , typename... Args
+ >
+ typename
+ enable_if<
+ is_member_function_pointer<
+ typename detail::remove_reference<F>::type
+ >
+ , Result
+ >::type
+ invoke_impl_call(F&& f, ClassInstance&& instance,Args&&... args)
+ {
+ return (that_ptr<typename detail::preevaluate<F>::class_type>::
+ get(std::forward<ClassInstance>(instance))->*f)(
+ std::forward<Args>(args)...);
+ }
+
+ namespace bidirectional_traversal
+ {
+ template<
+ typename FRef
+ , typename ArgsSeq
+ , bool Empty
+ , typename... Args
+ >
+ struct invoke_impl_result
+ {
+ typedef typename result_of::pop_back<ArgsSeq>::type new_args_seq;
+
+ typedef typename
+ invoke_impl_result<
+ FRef
+ , new_args_seq
+ , result_of::empty<new_args_seq>::value
+ , typename result_of::back<ArgsSeq>::type
+ , Args...
+ >::type
+ type;
+ };
+
+ template<typename FRef, typename ArgsSeq, typename... Args>
+ struct invoke_impl_result<FRef,ArgsSeq,true,Args...>
+ : detail::invoke_impl_result<FRef,Args...>
+ {};
+
+ template<typename FRef,typename SeqRef>
+ struct invoke_impl
+ {
+ typedef typename
+ mpl::eval_if<
+ typename detail::is_preevaluable<FRef>::type
+ , detail::preevaluate<FRef>
+ , invoke_impl_result<
+ FRef
+ , SeqRef
+ , result_of::empty<SeqRef>::value
+ >
+ >::type
+ type;
+
+ template<typename Seq,typename... Args>
+ static typename
+ enable_if<
+ typename result_of::empty<Seq&&>::type
+ , type
+ >::type
+ call_impl(FRef f,Seq&&, Args&&... args)
+ {
+ return detail::invoke_impl_call<type>(
+ std::forward<FRef>(f),std::forward<Args>(args)...);
+ }
+
+ template<typename Seq,typename... Args>
+ static typename
+ disable_if<
+ typename result_of::empty<Seq&&>::type
+ , type
+ >::type
+ call_impl(FRef f,Seq&& seq, Args&&... args)
+ {
+ return call_impl(
+ f,
+ fusion::pop_back(std::forward<Seq>(seq)),
+ fusion::back(std::forward<Seq>(seq)),
+ std::forward<Args>(args)...);
+ }
+
+ static type
+ call(FRef f,SeqRef seq)
+ {
+ return call_impl(f,std::forward<SeqRef>(seq));
+ }
+ };
+ }
+
+ namespace forward_traversal
+ {
+ template<
+ typename FRef
+ , typename SeqRef
+ , int NumArgsLeft
+ , typename... Args
+ >
+ struct invoke_impl_result
+ : invoke_impl_result<
+ FRef
+ , SeqRef
+ , NumArgsLeft-1
+ , typename result_of::deref<
+ typename result_of::advance_c<
+ typename result_of::begin<SeqRef>::type
+ , NumArgsLeft-1
+ >::type
+ >::type
+ , Args...
+ >
+ {};
+
+ template<typename FRef, typename SeqRef, typename... Args>
+ struct invoke_impl_result<FRef,SeqRef,0,Args...>
+ : detail::invoke_impl_result<FRef,Args...>
+ {
+ };
+
+ template<typename FRef,typename SeqRef>
+ struct invoke_impl
+ {
+ typedef typename
+ mpl::eval_if<
+ typename detail::is_preevaluable<FRef>::type
+ , detail::preevaluate<FRef>
+ , invoke_impl_result<
+ FRef
+ , SeqRef
+ , result_of::size<SeqRef>::value
+ >
+ >::type
+ type;
+
+ template<int NumArgsLeft,typename... Args>
+ static typename enable_if_c<!NumArgsLeft,type>::type
+ call_impl(FRef f,SeqRef, Args&&... args)
+ {
+ return detail::invoke_impl_call<type>(
+ std::forward<FRef>(f),std::forward<Args>(args)...);
+ }
+
+ template<int NumArgsLeft,typename... Args>
+ static typename enable_if_c<NumArgsLeft, type>::type
+ call_impl(FRef f,SeqRef seq, Args&&... args)
+ {
+ return call_impl<NumArgsLeft-1>(
+ f,
+ seq,
+ deref(advance_c<NumArgsLeft-1>(
+ fusion::begin(std::forward<SeqRef>(seq))
+ )),
+ std::forward<Args>(args)...);
+ }
+
+ static type
+ call(FRef f,SeqRef seq)
+ {
+ return call_impl<result_of::size<SeqRef>::value>(
+ f,
+ std::forward<SeqRef>(seq));
+ }
+ };
+ }
+
+ template<typename FRef,typename SeqRef>
+ struct invoke_impl
+ : mpl::if_<
+ typename traits::is_bidirectional<SeqRef>::type
+ , bidirectional_traversal::invoke_impl<FRef,SeqRef>
+ , forward_traversal::invoke_impl<FRef,SeqRef>
+ >::type
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,305 @@
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+#include <boost/function_types/is_function.hpp>
+#include <boost/function_types/is_callable_builtin.hpp>
+#include <boost/function_types/is_member_pointer.hpp>
+#include <boost/function_types/is_member_function_pointer.hpp>
+#include <boost/function_types/result_type.hpp>
+#include <boost/function_types/parameter_types.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Function, class Sequence> struct invoke;
+ }
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function, Sequence>::type
+ invoke(Function, Sequence &);
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function, Sequence const>::type
+ invoke(Function, Sequence const&);
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ namespace ft = function_types;
+
+ template<
+ typename Function, class Sequence,
+ int N = result_of::size<Sequence>::value,
+ bool CBI = ft::is_callable_builtin<Function>::value,
+ bool RandomAccess = traits::is_random_access<Sequence>::value
+ >
+ struct invoke_impl;
+
+ template <class Sequence, int N>
+ struct invoke_param_types;
+
+ template <typename T, class Sequence>
+ struct invoke_data_member;
+
+ template <typename Function, class Sequence, int N, bool RandomAccess>
+ struct invoke_mem_fn;
+
+ #define BOOST_PP_FILENAME_1 <boost/fusion/functional/invocation/detail/no_0x/invoke.hpp>
+ #define BOOST_PP_ITERATION_LIMITS (0, BOOST_FUSION_INVOKE_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+
+ template <typename F, class Sequence, int N, bool RandomAccess>
+ struct invoke_nonmember_builtin
+ // use same implementation as for function objects but...
+ : invoke_impl< // ...work around boost::result_of bugs
+ typename mpl::eval_if< ft::is_function<F>,
+ boost::add_reference<F>, boost::remove_cv<F> >::type,
+ Sequence, N, false, RandomAccess >
+ { };
+
+ template <typename Function, class Sequence, int N, bool RandomAccess>
+ struct invoke_impl<Function,Sequence,N,true,RandomAccess>
+ : mpl::if_< ft::is_member_function_pointer<Function>,
+ invoke_mem_fn<Function,Sequence,N,RandomAccess>,
+ invoke_nonmember_builtin<Function,Sequence,N,RandomAccess>
+ >::type
+ { };
+
+ template <typename Function, class Sequence, bool RandomAccess>
+ struct invoke_impl<Function,Sequence,1,true,RandomAccess>
+ : mpl::eval_if< ft::is_member_pointer<Function>,
+ mpl::if_< ft::is_member_function_pointer<Function>,
+ invoke_mem_fn<Function,Sequence,1,RandomAccess>,
+ invoke_data_member<Function, Sequence> >,
+ mpl::identity< invoke_nonmember_builtin<
+ Function,Sequence,1,RandomAccess> >
+ >::type
+ { };
+
+ template <typename T, class C, class Sequence>
+ struct invoke_data_member< T C::*, Sequence >
+ {
+ private:
+
+ typedef typename result_of::front<Sequence>::type that;
+
+ typedef mpl::or_< boost::is_convertible<that,C*>,
+ boost::is_convertible<that,C&>,
+ non_const_pointee<that> > non_const_cond;
+
+ typedef typename mpl::eval_if< non_const_cond,
+ mpl::identity<C>, add_const<C> >::type qualified_class;
+
+ typedef typename mpl::eval_if< non_const_cond,
+ mpl::identity<T>, add_const<T> >::type qualified_type;
+
+ public:
+
+ typedef typename boost::add_reference<qualified_type>::type
+ result_type;
+
+ static inline result_type call(T C::* f, Sequence & s)
+ {
+ typename result_of::front<Sequence>::type c = fusion::front(s);
+ return that_ptr<qualified_class>::get(c)->*f;
+ }
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Function, class Sequence> struct invoke
+ {
+ typedef typename detail::invoke_impl<
+ typename boost::remove_reference<Function>::type, Sequence
+ >::result_type type;
+ };
+ }
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function,Sequence>::type
+ invoke(Function f, Sequence & s)
+ {
+ return detail::invoke_impl<
+ typename boost::remove_reference<Function>::type,Sequence
+ >::call(f,s);
+ }
+
+ template <typename Function, class Sequence>
+ inline typename result_of::invoke<Function,Sequence const>::type
+ invoke(Function f, Sequence const& s)
+ {
+ return detail::invoke_impl<
+ typename boost::remove_reference<Function>::type,Sequence const
+ >::call(f,s);
+ }
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ template <typename Function, class Sequence>
+ struct invoke_impl<Function,Sequence,N,false,true>
+ {
+ public:
+
+ typedef typename boost::result_of<
+#define M(z,j,data) typename result_of::at_c<Sequence,j>::type
+ Function(BOOST_PP_ENUM(N,M,~)) >::type result_type;
+#undef M
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#define M(z,j,data) fusion::at_c<j>(s)
+ return f( BOOST_PP_ENUM(N,M,~) );
+ }
+ };
+
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_mem_fn<Function,Sequence,N,true>
+ {
+ public:
+
+ typedef typename ft::result_type<Function>::type result_type;
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+ return (that_ptr<typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
+ }
+ };
+#endif
+
+#undef M
+
+#define M(z,j,data) \
+ typename seq::I##j i##j = \
+ fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+
+ template <typename Function, class Sequence>
+ struct invoke_impl<Function,Sequence,N,false,false>
+ {
+ private:
+ typedef invoke_param_types<Sequence,N> seq;
+ public:
+
+ typedef typename boost::result_of<
+ Function(BOOST_PP_ENUM_PARAMS(N,typename seq::T))
+ >::type result_type;
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#if N > 0
+ typename seq::I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#endif
+ return f( BOOST_PP_ENUM_PARAMS(N,*i) );
+ }
+ };
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_mem_fn<Function,Sequence,N,false>
+ {
+ private:
+ typedef invoke_param_types<Sequence,N> seq;
+ public:
+
+ typedef typename ft::result_type<Function>::type result_type;
+
+ template <typename F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+ typename seq::I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+
+ return (that_ptr< typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
+ }
+ };
+#endif
+
+#undef M
+
+ template <class Sequence> struct invoke_param_types<Sequence,N>
+ {
+#if N > 0
+ typedef typename result_of::begin<Sequence>::type I0;
+ typedef typename result_of::deref<I0>::type T0;
+
+#define M(z,i,data) \
+ typedef typename result_of::next< \
+ BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \
+ typedef typename result_of::deref<I##i>::type T##i;
+
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+ };
+
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,176 @@
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_FUNCTION_OBJECT_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <class Function, class Sequence> struct invoke_function_object;
+ }
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function, Sequence>::type
+ invoke_function_object(Function, Sequence &);
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function, Sequence const
+ >::type invoke_function_object(Function, Sequence const&);
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ template<
+ class Function, class Sequence,
+ int N = result_of::size<Sequence>::value,
+ bool RandomAccess = traits::is_random_access<Sequence>::value
+ >
+ struct invoke_function_object_impl;
+
+ template <class Sequence, int N>
+ struct invoke_function_object_param_types;
+
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/invocation/detail/no_0x/invoke_function_object.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (0, BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+ }
+
+ namespace result_of
+ {
+ template <class Function, class Sequence> struct invoke_function_object
+ {
+ typedef typename detail::invoke_function_object_impl<
+ typename boost::remove_reference<Function>::type, Sequence
+ >::result_type type;
+ };
+ }
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function,Sequence>::type
+ invoke_function_object(Function f, Sequence & s)
+ {
+ return detail::invoke_function_object_impl<
+ typename boost::remove_reference<Function>::type,Sequence
+ >::call(f,s);
+ }
+
+ template <class Function, class Sequence>
+ inline typename result_of::invoke_function_object<Function,Sequence const>::type
+ invoke_function_object(Function f, Sequence const& s)
+ {
+ return detail::invoke_function_object_impl<
+ typename boost::remove_reference<Function>::type,Sequence const
+ >::call(f,s);
+ }
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+ template <class Function, class Sequence>
+ struct invoke_function_object_impl<Function,Sequence,N,true>
+ {
+ public:
+
+ typedef typename boost::result_of<
+#define M(z,j,data) \
+ typename result_of::at_c<Sequence,j>::type
+ Function (BOOST_PP_ENUM(N,M,~)) >::type result_type;
+#undef M
+
+ template <class F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#define M(z,j,data) fusion::at_c<j>(s)
+ return f( BOOST_PP_ENUM(N,M,~) );
+#undef M
+ }
+ };
+
+ template <class Function, class Sequence>
+ struct invoke_function_object_impl<Function,Sequence,N,false>
+ {
+ private:
+ typedef invoke_function_object_param_types<Sequence,N> seq;
+ public:
+ typedef typename boost::result_of<
+ Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T))
+ >::type result_type;
+
+ template <class F>
+ static inline result_type
+ call(F & f, Sequence & s)
+ {
+#if N > 0
+ typename seq::I0 i0 = fusion::begin(s);
+#define M(z,j,data) \
+ typename seq::I##j i##j = \
+ fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+ return f( BOOST_PP_ENUM_PARAMS(N,*i) );
+ }
+ };
+
+ template <class Sequence>
+ struct invoke_function_object_param_types<Sequence,N>
+ {
+#if N > 0
+ typedef typename result_of::begin<Sequence>::type I0;
+ typedef typename result_of::deref<I0>::type T0;
+
+#define M(z,i,data) \
+ typedef typename result_of::next< \
+ BOOST_PP_CAT(I,BOOST_PP_DEC(i))>::type I##i; \
+ typedef typename result_of::deref<I##i>::type T##i;
+
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#undef M
+#endif
+ };
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/no_0x/invoke_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,170 @@
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_PP_IS_ITERATING
+#ifndef BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_PROCEDURE_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_NO_DECLTYPE_OR_VARIADIC_TEMPLATES_INVOKE_PROCEDURE_HPP
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/preprocessor/repetition/enum_shifted.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <boost/mpl/front.hpp>
+
+#include <boost/function_types/is_callable_builtin.hpp>
+#include <boost/function_types/is_member_function_pointer.hpp>
+#include <boost/function_types/parameter_types.hpp>
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/functional/invocation/limits.hpp>
+#include <boost/fusion/functional/invocation/detail/that_ptr.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace result_of
+ {
+ template <typename Function, class Sequence> struct invoke_procedure
+ {
+ typedef void type;
+ };
+ }
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function, Sequence &);
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function, Sequence const&);
+
+ //----- ---- --- -- - - - -
+
+ namespace detail
+ {
+ namespace ft = function_types;
+
+ template<
+ typename Function, class Sequence,
+ int N = result_of::size<Sequence>::value,
+ bool MFP = ft::is_member_function_pointer<Function>::value,
+ bool RandomAccess = traits::is_random_access<Sequence>::value
+ >
+ struct invoke_procedure_impl;
+
+ #define BOOST_PP_FILENAME_1 \
+ <boost/fusion/functional/invocation/detail/no_0x/invoke_procedure.hpp>
+ #define BOOST_PP_ITERATION_LIMITS \
+ (0, BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY)
+ #include BOOST_PP_ITERATE()
+
+ }
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function f, Sequence & s)
+ {
+ detail::invoke_procedure_impl<
+ typename boost::remove_reference<Function>::type,Sequence
+ >::call(f,s);
+ }
+
+ template <typename Function, class Sequence>
+ inline void invoke_procedure(Function f, Sequence const& s)
+ {
+ detail::invoke_procedure_impl<
+ typename boost::remove_reference<Function>::type,Sequence const
+ >::call(f,s);
+ }
+
+}}
+
+#endif
+#else // defined(BOOST_PP_IS_ITERATING)
+///////////////////////////////////////////////////////////////////////////////
+//
+// Preprocessor vertical repetition code
+//
+///////////////////////////////////////////////////////////////////////////////
+#define N BOOST_PP_ITERATION()
+
+#define M(z,j,data) fusion::at_c<j>(s)
+
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,false,true>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+ f(BOOST_PP_ENUM(N,M,~));
+ }
+ };
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,true,true>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+ (that_ptr<typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(fusion::at_c<0>(s))->*f)(BOOST_PP_ENUM_SHIFTED(N,M,~));
+ }
+ };
+#endif
+
+#undef M
+
+#define M(z,j,data) \
+ typedef typename result_of::next< BOOST_PP_CAT(I,BOOST_PP_DEC(j)) \
+ >::type I ## j ; \
+ I##j i##j = fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j)));
+
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,false,false>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+#if N > 0
+ typedef typename result_of::begin<Sequence>::type I0;
+ I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+#endif
+ f( BOOST_PP_ENUM_PARAMS(N,*i) );
+ }
+ };
+
+#if N > 0
+ template <typename Function, class Sequence>
+ struct invoke_procedure_impl<Function,Sequence,N,true,false>
+ {
+ static inline void call(Function & f, Sequence & s)
+ {
+ typedef typename result_of::begin<Sequence>::type I0;
+ I0 i0 = fusion::begin(s);
+ BOOST_PP_REPEAT_FROM_TO(1,N,M,~)
+
+ (that_ptr<typename mpl::front<
+ ft::parameter_types<Function> >::type
+ >::get(*i0)->*f)(BOOST_PP_ENUM_SHIFTED_PARAMS(N,*i));
+ }
+ };
+#endif
+
+#undef M
+
+#undef N
+#endif // defined(BOOST_PP_IS_ITERATING)

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/detail/that_ptr.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,95 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_DETAIL_THAT_PTR_HPP
+
+#include <boost/get_pointer.hpp>
+#include <boost/utility/addressof.hpp>
+#include <boost/type_traits/config.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename WantedRef>
+ struct that_ptr
+ {
+ private:
+ typedef typename detail::remove_reference<WantedRef>::type* wanted;
+
+ template<typename T>
+ static inline wanted
+ do_get_pointer(BOOST_FUSION_R_ELSE_LREF(T), wanted ptr)
+ {
+ return ptr;
+ }
+
+ template<typename T>
+ static inline wanted
+ do_get_pointer(BOOST_FUSION_R_ELSE_LREF(T) t, void const*)
+ {
+ return get_pointer(BOOST_FUSION_FORWARD(T,t));
+ }
+
+ public:
+ static inline wanted
+ get(WantedRef x)
+ {
+ return boost::addressof(x);
+ }
+
+ static inline wanted
+ get(wanted ptr)
+ {
+ return ptr;
+ }
+
+ template <typename T>
+ static inline wanted
+ get(BOOST_FUSION_R_ELSE_LREF(T) t)
+ {
+ return do_get_pointer(
+ BOOST_FUSION_FORWARD(T,t),
+ boost::addressof(BOOST_FUSION_FORWARD(T,t)));
+ }
+ };
+
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+ template <typename PtrOrSmartPtr>
+ struct non_const_pointee;
+
+ namespace adl_barrier
+ {
+ using boost::get_pointer;
+ void const * BOOST_TT_DECL get_pointer(...); // fallback
+
+ template< typename T> char const_tester(T *);
+ template< typename T> long const_tester(T const *);
+
+ template <typename Ptr>
+ struct non_const_pointee_impl
+ {
+ static Ptr & what;
+
+ static bool const value =
+ sizeof(const_tester(get_pointer(what))) == 1;
+ };
+ }
+
+ template <typename PtrOrSmartPtr> struct non_const_pointee
+ : adl_barrier::non_const_pointee_impl<
+ typename remove_cv<
+ typename remove_reference<PtrOrSmartPtr>::type >::type >
+ {
+ typedef non_const_pointee type;
+ typedef bool value_type;
+ };
+#endif
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/invocation/detail/no_0x/invoke.hpp>
+#else
+# define BOOST_FUSION_INVOKE_NAME invoke
+# include <boost/fusion/functional/invocation/detail/0x/invoke_impl.hpp>
+# undef BOOST_FUSION_INVOKE_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_FUNCTION_OBJECT_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/invocation/detail/no_0x/invoke_function_object.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_INVOKE_NAME invoke_function_object
+# include <boost/fusion/functional/invocation/detail/0x/invoke_impl.hpp>
+# undef BOOST_FUSION_INVOKE_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/invoke_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_INVOKE_PROCEDURE_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/fusion/functional/invocation/detail/no_0x/invoke_procedure.hpp>
+#elif !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# define BOOST_FUSION_INVOKE_NAME invoke_procedure
+# include <boost/fusion/functional/invocation/detail/0x/invoke_impl.hpp>
+# undef BOOST_FUSION_INVOKE_NAME
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/functional/invocation/limits.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,26 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP
+#define BOOST_FUSION_FUNCTIONAL_INVOCATION_LIMITS_HPP
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_NO_RVALUE_REFERENCES) || !defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# ifndef BOOST_FUSION_INVOKE_MAX_ARITY
+# define BOOST_FUSION_INVOKE_MAX_ARITY 6
+# endif
+# ifndef BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY
+# define BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY 6
+# endif
+# ifndef BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY
+# define BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY 6
+# endif
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/accumulate.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/accumulate.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ACCUMULATE_HPP
+#define BOOST_FUSION_INCLUDE_ACCUMULATE_HPP
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/adapt_struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/adapt_struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ADAPT_STRUCT_HPP
+#define BOOST_FUSION_INCLUDE_ADAPT_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/adapted.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/adapted.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ADAPTED_HPP
+#define BOOST_FUSION_INCLUDE_ADAPTED_HPP
+
+#include <boost/fusion/adapted.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/adapter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/adapter.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ADAPTER_HPP
+#define BOOST_FUSION_INCLUDE_ADAPTER_HPP
+
+#include <boost/fusion/functional/adapter.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/advance.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/advance.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ADVANCE_HPP
+#define BOOST_FUSION_INCLUDE_ADVANCE_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/advance_c.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/advance_c.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_ADVANCE_C_HPP
+#define BOOST_FUSION_INCLUDE_ADVANCE_C_HPP
+
+#include <boost/fusion/iterator/advance_c.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/algorithm.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/algorithm.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ALGORITHM_HPP
+#define BOOST_FUSION_INCLUDE_ALGORITHM_HPP
+
+#include <boost/fusion/algorithm.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/all.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/all.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ALL_HPP
+#define BOOST_FUSION_INCLUDE_ALL_HPP
+
+#include <boost/fusion/algorithm/query/all.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/any.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/any.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ANY_HPP
+#define BOOST_FUSION_INCLUDE_ANY_HPP
+
+#include <boost/fusion/algorithm/query/any.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/array.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/array.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ARRAY_HPP
+#define BOOST_FUSION_INCLUDE_ARRAY_HPP
+
+#include <boost/fusion/adapted/array.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/as_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/as_list.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_AS_LIST_HPP
+#define BOOST_FUSION_INCLUDE_AS_LIST_HPP
+
+#include <boost/fusion/container/list/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/as_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/as_map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_AS_MAP_HPP
+#define BOOST_FUSION_INCLUDE_AS_MAP_HPP
+
+#include <boost/fusion/container/map/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/as_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/as_set.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_AS_SET_HPP
+#define BOOST_FUSION_INCLUDE_AS_SET_HPP
+
+#include <boost/fusion/container/set/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/as_vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/as_vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_AS_VECTOR_HPP
+#define BOOST_FUSION_INCLUDE_AS_VECTOR_HPP
+
+#include <boost/fusion/container/vector/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/at.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/at.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_AT_HPP
+#define BOOST_FUSION_INCLUDE_AT_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/at_c.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/at_c.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_AT_C_HPP
+#define BOOST_FUSION_INCLUDE_AT_C_HPP
+
+#include <boost/fusion/sequence/intrinsic/at_c.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/at_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/at_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_AT_KEY_HPP
+#define BOOST_FUSION_INCLUDE_AT_KEY_HPP
+
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_BACK_HPP
+#define BOOST_FUSION_INCLUDE_BACK_HPP
+
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/begin.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/begin.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_BEGIN_HPP
+#define BOOST_FUSION_INCLUDE_BEGIN_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/boost_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/boost_array.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_BOOST_ARRAY_HPP
+#define BOOST_FUSION_INCLUDE_BOOST_ARRAY_HPP
+
+#include <boost/fusion/adapted/boost_array.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/boost_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/boost_tuple.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_BOOST_TUPLE_HPP
+#define BOOST_FUSION_INCLUDE_BOOST_TUPLE_HPP
+
+#include <boost/fusion/adapted/boost_tuple.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/category_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/category_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_CATEGORY_OF_HPP
+#define BOOST_FUSION_INCLUDE_CATEGORY_OF_HPP
+
+#include <boost/fusion/support/category_of.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/clear.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/clear.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_CLEAR_HPP
+#define BOOST_FUSION_INCLUDE_CLEAR_HPP
+
+#include <boost/fusion/algorithm/transformation/clear.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/comparison.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/comparison.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_COMPARISON_HPP
+#define BOOST_FUSION_INCLUDE_COMPARISON_HPP
+
+#include <boost/fusion/sequence/comparison.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/cons.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/cons.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_CONS_HPP
+#define BOOST_FUSION_INCLUDE_CONS_HPP
+
+#include <boost/fusion/container/list/cons.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/cons_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/cons_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_CONS_TIE_HPP
+#define BOOST_FUSION_INCLUDE_CONS_TIE_HPP
+
+#include <boost/fusion/container/generation/cons_tie.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/container.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/container.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_CONTAINER_HPP
+#define BOOST_FUSION_INCLUDE_CONTAINER_HPP
+
+#include <boost/fusion/container.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/convert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_CONVERT_HPP
+#define BOOST_FUSION_INCLUDE_CONVERT_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/count.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/count.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_COUNT_HPP
+#define BOOST_FUSION_INCLUDE_COUNT_HPP
+
+#include <boost/fusion/algorithm/query/count.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/count_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/count_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_COUNT_IF_HPP
+#define BOOST_FUSION_INCLUDE_COUNT_IF_HPP
+
+#include <boost/fusion/algorithm/query/count_if.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/deduce_sequence.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/deduce_sequence.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_DEDUCE_SEQUENCE_HPP
+#define BOOST_FUSION_INCLUDE_DEDUCE_SEQUENCE_HPP
+
+#include <boost/fusion/support/deduce_sequence.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/deref.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/deref.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_DEREF_HPP
+#define BOOST_FUSION_INCLUDE_DEREF_HPP
+
+#include <boost/fusion/iterator/deref.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/deref_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/deref_data.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_DEREF_DATA_HPP
+#define BOOST_FUSION_INCLUDE_DEREF_DATA_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/distance.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/distance.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_DISTANCE_HPP
+#define BOOST_FUSION_INCLUDE_DISTANCE_HPP
+
+#include <boost/fusion/iterator/distance.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/empty.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/empty.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_EMPTY_HPP
+#define BOOST_FUSION_INCLUDE_EMPTY_HPP
+
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/end.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/end.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_END_HPP
+#define BOOST_FUSION_INCLUDE_END_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/equal_to.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/equal_to.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_EQUAL_TO_HPP
+#define BOOST_FUSION_INCLUDE_EQUAL_TO_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/erase.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/erase.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ERASE_HPP
+#define BOOST_FUSION_INCLUDE_ERASE_HPP
+
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/erase_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/erase_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ERASE_KEY_HPP
+#define BOOST_FUSION_INCLUDE_ERASE_KEY_HPP
+
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/filter.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/filter.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FILTER_HPP
+#define BOOST_FUSION_INCLUDE_FILTER_HPP
+
+#include <boost/fusion/algorithm/transformation/filter.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/filter_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/filter_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FILTER_IF_HPP
+#define BOOST_FUSION_INCLUDE_FILTER_IF_HPP
+
+#include <boost/fusion/algorithm/transformation/filter_if.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/filter_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/filter_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FILTER_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_FILTER_VIEW_HPP
+
+#include <boost/fusion/view/filter_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/find.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/find.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FIND_HPP
+#define BOOST_FUSION_INCLUDE_FIND_HPP
+
+#include <boost/fusion/algorithm/query/find.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/find_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/find_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FIND_IF_HPP
+#define BOOST_FUSION_INCLUDE_FIND_IF_HPP
+
+#include <boost/fusion/algorithm/query/find_if.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/find_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/find_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_FIND_KEY_HPP
+#define BOOST_FUSION_INCLUDE_FIND_KEY_HPP
+
+#include <boost/fusion/algorithm/query/find_key.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/fold.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/fold.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FOLD_HPP
+#define BOOST_FUSION_INCLUDE_FOLD_HPP
+
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/for_each.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/for_each.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FOR_EACH_HPP
+#define BOOST_FUSION_INCLUDE_FOR_EACH_HPP
+
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FRONT_HPP
+#define BOOST_FUSION_INCLUDE_FRONT_HPP
+
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/functional.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/functional.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FUNCTIONAL_HPP
+#define BOOST_FUSION_INCLUDE_FUNCTIONAL_HPP
+
+#include <boost/fusion/functional.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/fused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FUSED_HPP
+#define BOOST_FUSION_INCLUDE_FUSED_HPP
+
+#include <boost/fusion/functional/adapter/fused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/fused_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FUSED_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_INCLUDE_FUSED_FUNCTION_OBJECT_HPP
+
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/fused_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_FUSED_PROCEDURE_HPP
+#define BOOST_FUSION_INCLUDE_FUSED_PROCEDURE_HPP
+
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/generation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/generation.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_GENERATION_HPP
+#define BOOST_FUSION_INCLUDE_GENERATION_HPP
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/greater.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/greater.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_GREATER_HPP
+#define BOOST_FUSION_INCLUDE_GREATER_HPP
+
+#include <boost/fusion/sequence/comparison/greater.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/greater_equal.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/greater_equal.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_GREATER_EQUAL_HPP
+#define BOOST_FUSION_INCLUDE_GREATER_EQUAL_HPP
+
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/has_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/has_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_HAS_KEY_HPP
+#define BOOST_FUSION_INCLUDE_HAS_KEY_HPP
+
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/ignore.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/ignore.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_IGNORE_HPP
+#define BOOST_FUSION_INCLUDE_IGNORE_HPP
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/in.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/in.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ 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_FUSION_INCLUDE_IN_HPP
+#define BOOST_FUSION_INCLUDE_IN_HPP
+
+#include <boost/fusion/sequence/io/in.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/insert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/insert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_INSERT_HPP
+#define BOOST_FUSION_INCLUDE_INSERT_HPP
+
+#include <boost/fusion/algorithm/transformation/insert.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/insert_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/insert_range.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_INSERT_RANGE_HPP
+#define BOOST_FUSION_INCLUDE_INSERT_RANGE_HPP
+
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/intrinsic.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/intrinsic.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_INTRINSIC_HPP
+#define BOOST_FUSION_INCLUDE_INTRINSIC_HPP
+
+#include <boost/fusion/sequence/intrinsic.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/invocation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/invocation.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_INVOCATION_HPP
+#define BOOST_FUSION_INCLUDE_INVOCATION_HPP
+
+#include <boost/fusion/functional/invocation.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/invoke.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/invoke.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_INVOKE_HPP
+#define BOOST_FUSION_INCLUDE_INVOKE_HPP
+
+#include <boost/fusion/functional/invocation/invoke.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/invoke_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/invoke_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_INVOKE_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_INCLUDE_INVOKE_FUNCTION_OBJECT_HPP
+
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/invoke_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/invoke_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_INVOKE_PROCEDURE_HPP
+#define BOOST_FUSION_INCLUDE_INVOKE_PROCEDURE_HPP
+
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/io.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/io.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ 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_FUSION_INCLUDE_IO_HPP
+#define BOOST_FUSION_INCLUDE_IO_HPP
+
+#include <boost/fusion/sequence/io.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/is_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/is_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_IS_ITERATOR_HPP
+#define BOOST_FUSION_INCLUDE_IS_ITERATOR_HPP
+
+#include <boost/fusion/support/is_iterator.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/is_sequence.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/is_sequence.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_IS_SEQUENCE_HPP
+#define BOOST_FUSION_INCLUDE_IS_SEQUENCE_HPP
+
+#include <boost/fusion/support/is_sequence.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/is_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/is_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_IS_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_IS_VIEW_HPP
+
+#include <boost/fusion/support/is_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/iteration.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/iteration.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ITERATION_HPP
+#define BOOST_FUSION_INCLUDE_ITERATION_HPP
+
+#include <boost/fusion/algorithm/iteration.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ITERATOR_HPP
+#define BOOST_FUSION_INCLUDE_ITERATOR_HPP
+
+#include <boost/fusion/iterator.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/iterator_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/iterator_base.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ITERATOR_BASE_HPP
+#define BOOST_FUSION_INCLUDE_ITERATOR_BASE_HPP
+
+#include <boost/fusion/support/iterator_base.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/iterator_facade.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/iterator_facade.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ITERATOR_FACADE_HPP
+#define BOOST_FUSION_INCLUDE_ITERATOR_FACADE_HPP
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/iterator_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/iterator_range.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ITERATOR_RANGE_HPP
+#define BOOST_FUSION_INCLUDE_ITERATOR_RANGE_HPP
+
+#include <boost/fusion/view/iterator_range.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/join.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/join.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_JOIN_HPP
+#define BOOST_FUSION_INCLUDE_JOIN_HPP
+
+#include <boost/fusion/algorithm/transformation/join.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/joint_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/joint_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_JOINT_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_JOINT_VIEW_HPP
+
+#include <boost/fusion/view/joint_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/key_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/key_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_KEY_OF_HPP
+#define BOOST_FUSION_INCLUDE_KEY_OF_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/less.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/less.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_LESS_HPP
+#define BOOST_FUSION_INCLUDE_LESS_HPP
+
+#include <boost/fusion/sequence/comparison/less.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/less_equal.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/less_equal.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_LESS_EQUAL_HPP
+#define BOOST_FUSION_INCLUDE_LESS_EQUAL_HPP
+
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/list.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/list.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_LIST_HPP
+#define BOOST_FUSION_INCLUDE_LIST_HPP
+
+#include <boost/fusion/container/list.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/list_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/list_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_LIST_FWD_HPP
+#define BOOST_FUSION_INCLUDE_LIST_FWD_HPP
+
+#include <boost/fusion/container/list/list_fwd.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/list_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/list_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_LIST_TIE_HPP
+#define BOOST_FUSION_INCLUDE_LIST_TIE_HPP
+
+#include <boost/fusion/container/generation.hpp>
+#include <boost/fusion/functional/generation.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_cons.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_cons.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_CONS_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_CONS_HPP
+
+#include <boost/fusion/container/generation/make_cons.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_fused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_fused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_FUSED_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_FUSED_HPP
+
+#include <boost/fusion/functional/generation/make_fused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_fused_function_object.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_fused_function_object.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_FUSED_FUNCTION_OBJECT_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_FUSED_FUNCTION_OBJECT_HPP
+
+#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_fused_procedure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_fused_procedure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_FUSED_PROCEDURE_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_FUSED_PROCEDURE_HPP
+
+#include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_list.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_list.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_LIST_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_LIST_HPP
+
+#include <boost/fusion/container/generation/make_list.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_MAP_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_MAP_HPP
+
+#include <boost/fusion/container/generation/make_map.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_set.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_SET_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_SET_HPP
+
+#include <boost/fusion/container/generation/make_set.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_tuple.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_TUPLE_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_TUPLE_HPP
+
+#include <boost/fusion/tuple/make_tuple.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_unfused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_UNFUSED_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_UNFUSED_HPP
+
+#include <boost/fusion/functional/generation/make_unfused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/make_vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/make_vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAKE_VECTOR_HPP
+#define BOOST_FUSION_INCLUDE_MAKE_VECTOR_HPP
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/map.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/map.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAP_HPP
+#define BOOST_FUSION_INCLUDE_MAP_HPP
+
+#include <boost/fusion/container/map.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/map_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/map_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAP_FWD_HPP
+#define BOOST_FUSION_INCLUDE_MAP_FWD_HPP
+
+#include <boost/fusion/container/map/map_fwd.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/map_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/map_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MAP_TIE_HPP
+#define BOOST_FUSION_INCLUDE_MAP_TIE_HPP
+
+#include <boost/fusion/container/generation/map_tie.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/mpl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/mpl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_MPL_HPP
+#define BOOST_FUSION_INCLUDE_MPL_HPP
+
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/mpl.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/next.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/next.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_NEXT_HPP
+#define BOOST_FUSION_INCLUDE_NEXT_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/none.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/none.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_NONE_HPP
+#define BOOST_FUSION_INCLUDE_NONE_HPP
+
+#include <boost/fusion/algorithm/query/none.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/not_equal_to.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/not_equal_to.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_NOT_EQUAL_TO_HPP
+#define BOOST_FUSION_INCLUDE_NOT_EQUAL_TO_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/out.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/out.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ 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_FUSION_INCLUDE_OUT_HPP
+#define BOOST_FUSION_INCLUDE_OUT_HPP
+
+#include <boost/fusion/sequence/io/out.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/pair.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/pair.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_PAIR_HPP
+#define BOOST_FUSION_INCLUDE_PAIR_HPP
+
+#include <boost/fusion/support/pair.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/pair_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/pair_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_PAIR_TIE_HPP
+#define BOOST_FUSION_INCLUDE_PAIR_TIE_HPP
+
+#include <boost/fusion/container/generation/pair_tie.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/pop_back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/pop_back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_POP_BACK_HPP
+#define BOOST_FUSION_INCLUDE_POP_BACK_HPP
+
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/pop_front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/pop_front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_POP_FRONT_HPP
+#define BOOST_FUSION_INCLUDE_POP_FRONT_HPP
+
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/prior.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/prior.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_PRIOR_HPP
+#define BOOST_FUSION_INCLUDE_PRIOR_HPP
+
+#include <boost/fusion/iterator/prior.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/push_back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/push_back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_PUSH_BACK_HPP
+#define BOOST_FUSION_INCLUDE_PUSH_BACK_HPP
+
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/push_front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/push_front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_PUSH_FRONT_HPP
+#define BOOST_FUSION_INCLUDE_PUSH_FRONT_HPP
+
+#include <boost/fusion/algorithm/transformation/push_front.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/query.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/query.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_QUERY_HPP
+#define BOOST_FUSION_INCLUDE_QUERY_HPP
+
+#include <boost/fusion/algorithm/query.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/remove.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/remove.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_REMOVE_HPP
+#define BOOST_FUSION_INCLUDE_REMOVE_HPP
+
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/remove_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/remove_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_REMOVE_IF_HPP
+#define BOOST_FUSION_INCLUDE_REMOVE_IF_HPP
+
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/replace.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/replace.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_REPLACE_HPP
+#define BOOST_FUSION_INCLUDE_REPLACE_HPP
+
+#include <boost/fusion/algorithm/transformation/replace.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/replace_if.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/replace_if.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_REPLACE_IF_HPP
+#define BOOST_FUSION_INCLUDE_REPLACE_IF_HPP
+
+#include <boost/fusion/algorithm/transformation/replace_if.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/reverse.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/reverse.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_REVERSE_HPP
+#define BOOST_FUSION_INCLUDE_REVERSE_HPP
+
+#include <boost/fusion/algorithm/transformation/reverse.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/reverse_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/reverse_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_REVERSE_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_REVERSE_VIEW_HPP
+
+#include <boost/fusion/view/reverse_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/sequence.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/sequence.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SEQUENCE_HPP
+#define BOOST_FUSION_INCLUDE_SEQUENCE_HPP
+
+#include <boost/fusion/sequence.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/sequence_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/sequence_base.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SEQUENCE_BASE_HPP
+#define BOOST_FUSION_INCLUDE_SEQUENCE_BASE_HPP
+
+#include <boost/fusion/support/sequence_base.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/sequence_facade.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/sequence_facade.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SEQUENCE_FACADE_HPP
+#define BOOST_FUSION_INCLUDE_SEQUENCE_FACADE_HPP
+
+#include <boost/fusion/sequence/sequence_facade.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/set.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/set.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SET_HPP
+#define BOOST_FUSION_INCLUDE_SET_HPP
+
+#include <boost/fusion/container/set.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/set_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/set_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SET_FWD_HPP
+#define BOOST_FUSION_INCLUDE_SET_FWD_HPP
+
+#include <boost/fusion/container/set/set_fwd.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/single_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/single_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SINGLE_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_SINGLE_VIEW_HPP
+
+#include <boost/fusion/view/single_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/size.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/size.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SIZE_HPP
+#define BOOST_FUSION_INCLUDE_SIZE_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/std_array.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/std_array.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_STD_ARRAY_HPP
+#define BOOST_FUSION_INCLUDE_STD_ARRAY_HPP
+
+#include <boost/fusion/adapted/std_array.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/std_pair.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/std_pair.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_STD_PAIR_HPP
+#define BOOST_FUSION_INCLUDE_STD_PAIR_HPP
+
+#include <boost/fusion/adapted/std_pair.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_STRUCT_HPP
+#define BOOST_FUSION_INCLUDE_STRUCT_HPP
+
+#include <boost/fusion/adapted/struct.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/support.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/support.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SUPPORT_HPP
+#define BOOST_FUSION_INCLUDE_SUPPORT_HPP
+
+#include <boost/fusion/support.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/swap.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/swap.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_SWAP_HPP
+#define BOOST_FUSION_INCLUDE_SWAP_HPP
+
+#include <boost/fusion/sequence/intrinsic/swap.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/tag_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/tag_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TAG_OF_HPP
+#define BOOST_FUSION_INCLUDE_TAG_OF_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/tag_of_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/tag_of_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TAG_OF_FWD_HPP
+#define BOOST_FUSION_INCLUDE_TAG_OF_FWD_HPP
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/transform.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/transform.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TRANSFORM_HPP
+#define BOOST_FUSION_INCLUDE_TRANSFORM_HPP
+
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/transform_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/transform_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TRANSFORM_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_TRANSFORM_VIEW_HPP
+
+#include <boost/fusion/view/transform_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/transformation.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/transformation.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TRANSFORMATION_HPP
+#define BOOST_FUSION_INCLUDE_TRANSFORMATION_HPP
+
+#include <boost/fusion/algorithm/transformation.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/tuple.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TUPLE_HPP
+#define BOOST_FUSION_INCLUDE_TUPLE_HPP
+
+#include <boost/fusion/tuple.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/tuple_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/tuple_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TUPLE_FWD_HPP
+#define BOOST_FUSION_INCLUDE_TUPLE_FWD_HPP
+
+#include <boost/fusion/tuple/tuple_fwd.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/tuple_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/tuple_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_TUPLE_TIE_HPP
+#define BOOST_FUSION_INCLUDE_TUPLE_TIE_HPP
+
+#include <boost/fusion/tuple/tuple_tie.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/unfused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/unfused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_UNFUSED_HPP
+#define BOOST_FUSION_INCLUDE_UNFUSED_HPP
+
+#include <boost/fusion/functional/adapter/unfused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/unfused_typed.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/unfused_typed.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_UNFUSED_TYPED_HPP
+#define BOOST_FUSION_INCLUDE_UNFUSED_TYPED_HPP
+
+#include <boost/fusion/functional/adapter/unfused_typed.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/unused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/unused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_UNUSED_HPP
+#define BOOST_FUSION_INCLUDE_UNUSED_HPP
+
+#include <boost/fusion/support/unused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/value_at.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/value_at.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Hartmut Kaiser
+
+ 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_FUSION_INCLUDE_VALUE_AT_HPP
+#define BOOST_FUSION_INCLUDE_VALUE_AT_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/value_at_c.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/value_at_c.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_VALUE_AT_C_HPP
+#define BOOST_FUSION_INCLUDE_VALUE_AT_C_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at_c.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/value_at_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/value_at_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VALUE_AT_KEY_HPP
+#define BOOST_FUSION_INCLUDE_VALUE_AT_KEY_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/value_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/value_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VALUE_OF_HPP
+#define BOOST_FUSION_INCLUDE_VALUE_OF_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/value_of_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/value_of_data.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_INCLUDE_VALUE_OF_DATA_HPP
+#define BOOST_FUSION_INCLUDE_VALUE_OF_DATA_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR_HPP
+
+#include <boost/fusion/container/vector.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector10.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector10.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR10_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR10_HPP
+
+#include <boost/fusion/container/vector/vector10.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector20.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector20.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR20_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR20_HPP
+
+#include <boost/fusion/container/vector/vector20.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector30.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector30.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR30_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR30_HPP
+
+#include <boost/fusion/container/vector/vector30.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector40.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector40.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR40_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR40_HPP
+
+#include <boost/fusion/container/vector/vector40.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector50.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector50.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR50_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR50_HPP
+
+#include <boost/fusion/container/vector/vector50.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR_FWD_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR_FWD_HPP
+
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/vector_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/vector_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VECTOR_TIE_HPP
+#define BOOST_FUSION_INCLUDE_VECTOR_TIE_HPP
+
+#include <boost/fusion/container/generation/vector_tie.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_VIEW_HPP
+
+#include <boost/fusion/view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/zip.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/zip.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ZIP_HPP
+#define BOOST_FUSION_INCLUDE_ZIP_HPP
+
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/include/zip_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/include/zip_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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_FUSION_INCLUDE_ZIP_VIEW_HPP
+#define BOOST_FUSION_INCLUDE_ZIP_VIEW_HPP
+
+#include <boost/fusion/view/zip_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,25 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_HPP
+#define BOOST_FUSION_ITERATOR_HPP
+
+#include <boost/fusion/iterator/advance_c.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/basic_iterator.hpp>
+#include <boost/fusion/iterator/deref_data.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/iterator/key_of.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/value_of_data.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/advance.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/advance.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,90 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_ADVANCE_HPP
+#define BOOST_FUSION_ITERATOR_ADVANCE_HPP
+
+#include <boost/fusion/iterator/detail/advance.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct advance_impl
+ {
+ template <typename ItRef, typename N>
+ struct apply
+ : mpl::if_c<
+ (N::value > 0)
+ , advance_detail::forward<ItRef, N::value>
+ , advance_detail::backward<ItRef, N::value>
+ >::type
+ {};
+ };
+
+ template <>
+ struct advance_impl<iterator_facade_tag>
+ {
+ template <typename ItRef, typename N>
+ struct apply
+ : detail::remove_reference<ItRef>::type::
+ template advance<ItRef, N>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It, int N>
+ struct advance_c
+ : extension::advance_impl<typename traits::tag_of<It>::type>::
+ template apply<
+ typename detail::add_lref<It>::type
+ , mpl::int_<N>
+ >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ BOOST_FUSION_STATIC_ASSERT((
+ N>=0 ||
+ traits::is_bidirectional<It>::value));
+
+ };
+
+ template <typename It, typename N>
+ struct advance
+ : extension::advance_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type, N>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ BOOST_FUSION_STATIC_ASSERT((
+ N::value>=0 ||
+ traits::is_bidirectional<It>::value));
+ };
+ }
+
+ template <int N, typename It>
+ inline typename result_of::advance_c<It const&, N>::type const
+ advance_c(It const& it)
+ {
+ return result_of::advance_c<It const&, N>::call(it);
+ }
+
+ template<typename N, typename It>
+ inline typename result_of::advance<It const&, N>::type const
+ advance(It const& it)
+ {
+ return result_of::advance<It const&, N>::call(it);
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/advance_c.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/advance_c.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ITERATOR_ADVANCE_C_HPP
+#define BOOST_FUSION_ITERATOR_ADVANCE_C_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/basic_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/basic_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,153 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ITERATOR_BASIC_ITERATOR_HPP
+#define BOOST_FUSION_ITERATOR_BASIC_ITERATOR_HPP
+
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <typename Tag>
+ struct deref_impl;
+
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <typename Tag>
+ struct deref_data_impl;
+ }
+
+ template<
+ typename Tag
+ , typename Category
+ , typename SeqRef
+ , int Pos
+ >
+ struct basic_iterator
+ : iterator_facade<
+ basic_iterator<Tag,Category,SeqRef,Pos>
+ , Category
+ >
+ {
+ typedef mpl::int_<Pos> index;
+ typedef SeqRef seq_type;
+
+ template <typename ItRef>
+ struct value_of
+ : extension::value_of_impl<Tag>::template apply<ItRef>
+ {};
+
+ template <typename ItRef>
+ struct deref
+ : extension::deref_impl<Tag>::template apply<ItRef>
+ {};
+
+ template <typename ItRef>
+ struct value_of_data
+ : extension::value_of_data_impl<Tag>::template apply<ItRef>
+ {};
+
+ template <typename ItRef>
+ struct key_of
+ : extension::key_of_impl<Tag>::template apply<ItRef>
+ {};
+
+ template <typename ItRef>
+ struct deref_data
+ : extension::deref_data_impl<Tag>::template apply<ItRef>
+ {};
+
+ template <typename ItRef, typename N>
+ struct advance
+ {
+ typedef
+ basic_iterator<
+ Tag
+ , Category
+ , SeqRef
+ , Pos + N::value
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(*it.seq,0);
+ }
+ };
+
+ template <typename ItRef>
+ struct next
+ : advance<ItRef, mpl::int_<1> >
+ {};
+
+ template <typename ItRef>
+ struct prior
+ : advance<ItRef, mpl::int_<-1> >
+ {};
+
+ template <typename It1Ref, typename It2Ref>
+ struct distance
+ : mpl::minus<
+ typename detail::remove_reference<It2Ref>::type::index
+ , typename detail::remove_reference<It1Ref>::type::index
+ >
+ {};
+
+ template <typename It1Ref, typename It2Ref>
+ struct equal_to
+ {
+ typedef typename detail::remove_reference<It2Ref>::type it2;
+
+ typedef
+ mpl::and_<
+ is_same<
+ typename detail::identity<SeqRef>::type
+ , typename detail::identity<typename it2::seq_type>::type
+ >
+ , mpl::equal_to<index,typename it2::index>
+ >
+ type;
+ };
+
+ template<typename OtherIt>
+ basic_iterator(OtherIt const& it)
+ : seq(it.seq)
+ {}
+
+ basic_iterator(SeqRef seq, int)
+ : seq(&seq)
+ {}
+
+ template<typename OtherIt>
+ basic_iterator&
+ operator=(OtherIt const& it)
+ {
+ seq=it.seq;
+ return *this;
+ }
+
+ typename detail::remove_reference<SeqRef>::type* seq;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/deref.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/deref.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_DEREF_HPP
+#define BOOST_FUSION_ITERATOR_DEREF_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<iterator_facade_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : detail::remove_reference<ItRef>::type::template deref<ItRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It>
+ struct deref
+ : extension::deref_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ };
+ }
+
+ template <typename It>
+ typename result_of::deref<It const&>::type
+ deref(It const& it)
+ {
+ return result_of::deref<It const&>::call(it);
+ }
+
+ template <typename It>
+ typename result_of::deref<It const&>::type
+ operator*(iterator_base<It> const& it)
+ {
+ return fusion::deref(it.cast());
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/deref_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/deref_data.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,55 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_DEREF_DATA_HPP
+#define BOOST_FUSION_ITERATOR_DEREF_DATA_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct deref_data_impl;
+
+ template <>
+ struct deref_data_impl<iterator_facade_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : detail::remove_reference<ItRef>::type::
+ template deref_data<ItRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It>
+ struct deref_data
+ : extension::deref_data_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_associative<It>));
+ };
+ }
+
+ template <typename It>
+ typename result_of::deref_data<It const&>::type
+ deref_data(It const& it)
+ {
+ return result_of::deref_data<It const&>::call(it);
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/detail/advance.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/detail/advance.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,103 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_DETAIL_ADVANCE_HPP
+#define BOOST_FUSION_ITERATOR_DETAIL_ADVANCE_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion { namespace advance_detail
+{
+ // Default advance implementation, perform next(it)
+ // or prior(it) N times.
+
+ template <typename ItRef, int N>
+ struct forward;
+
+ template <typename ItRef, int N>
+ struct next_forward
+ {
+ typedef typename
+ forward<
+ typename result_of::next<ItRef>::type
+ , N-1
+ >::type
+ type;
+ };
+
+ template <typename ItRef, int N>
+ struct forward
+ {
+ typedef typename
+ mpl::eval_if_c<
+ (N == 0)
+ , mpl::identity<ItRef>
+ , next_forward<ItRef, N>
+ >::type
+ type;
+
+ static type
+ call(type it)
+ {
+ return it;
+ }
+
+ template <typename OtherIt>
+ static type
+ call(OtherIt const& it)
+ {
+ return call(fusion::next(it));
+ }
+ };
+
+ template <typename ItRef, int N>
+ struct backward;
+
+ template <typename ItRef, int N>
+ struct next_backward
+ {
+ typedef typename
+ backward<
+ typename result_of::prior<ItRef>::type
+ , N+1
+ >::type
+ type;
+ };
+
+ template <typename ItRef, int N>
+ struct backward
+ {
+ typedef typename
+ mpl::eval_if_c<
+ (N == 0)
+ , mpl::identity<ItRef>
+ , next_backward<ItRef, N>
+ >::type
+ type;
+
+ static type
+ call(type it)
+ {
+ return it;
+ }
+
+ template <typename OtherIt>
+ static type
+ call(OtherIt const& it)
+ {
+ return call(fusion::prior(it));
+ }
+ };
+
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/detail/distance.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/detail/distance.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,52 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_DETAIL_DISTANCE_HPP
+#define BOOST_FUSION_ITERATOR_DETAIL_DISTANCE_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion { namespace distance_detail
+{
+ // Default distance implementation, linear
+ // search for the Last iterator.
+
+ template <typename First, typename Last>
+ struct linear_distance;
+
+ template <typename First, typename Last>
+ struct next_distance
+ {
+ typedef typename
+ mpl::next<
+ typename linear_distance<
+ typename result_of::next<First>::type
+ , Last
+ >::type
+ >::type
+ type;
+ };
+
+ template <typename First, typename Last>
+ struct linear_distance
+ : mpl::eval_if<
+ result_of::equal_to<First, Last>
+ , mpl::identity<mpl::int_<0> >
+ , next_distance<First, Last>
+ >::type
+ {};
+
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/distance.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/distance.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,65 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_DISTANCE_HPP
+#define BOOST_FUSION_ITERATOR_DISTANCE_HPP
+
+#include <boost/fusion/iterator/detail/distance.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_traversal_tag;
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct distance_impl
+ {
+ template <typename FirstRef, typename LastRef>
+ struct apply
+ : distance_detail::linear_distance<FirstRef, LastRef>
+ {};
+ };
+
+ template <>
+ struct distance_impl<iterator_facade_tag>
+ {
+ template <typename FirstRef, typename LastRef>
+ struct apply
+ : detail::remove_reference<FirstRef>::type::
+ template distance<FirstRef, LastRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename First, typename Last>
+ struct distance
+ : extension::distance_impl<typename traits::tag_of<First>::type>::
+ template apply<
+ typename detail::add_lref<First>::type
+ , typename detail::add_lref<Last>::type
+ >::type
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<First>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<Last>));
+ };
+ }
+
+ template <typename First, typename Last>
+ inline typename result_of::distance<First const&, Last const&>::type
+ distance(First const& a, Last const& b)
+ {
+ return typename result_of::distance<First const&, Last const&>::type();
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/equal_to.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/equal_to.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,87 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_EQUAL_TO_HPP
+#define BOOST_FUSION_ITERATOR_EQUAL_TO_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/is_iterator.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/and.hpp>
+#include <boost/utility/enable_if.hpp>
+
+//TODO constexpr
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct equal_to_impl;
+
+ template <>
+ struct equal_to_impl<iterator_facade_tag>
+ {
+ template <typename It1Ref, typename It2Ref>
+ struct apply
+ : detail::remove_reference<It1Ref>::type::
+ template equal_to<It1Ref, It2Ref>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It1, typename It2>
+ struct equal_to
+ : extension::equal_to_impl<typename traits::tag_of<It1>::type>::
+ template apply<
+ typename detail::add_lref<It1>::type
+ , typename detail::add_lref<It2>::type
+ >::type
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It2>));
+ };
+ }
+
+ namespace iterator_operators
+ {
+ template <typename It1, typename It2>
+ inline typename
+ enable_if<
+ mpl::and_<traits::is_iterator<It1>, traits::is_iterator<It2> >
+ , bool
+ >::type
+ operator==(It1 const&, It2 const&)
+ {
+ return result_of::equal_to<It1 const&, It1 const&>::value;
+ }
+
+ template <typename It1, typename It2>
+ inline typename
+ enable_if<
+ mpl::and_<
+ traits::is_iterator<It1>
+ , traits::is_iterator<It2>
+ >
+ , bool
+ >::type
+ operator!=(It1 const&, It1 const&)
+ {
+ return !result_of::equal_to<It1 const&, It1 const&>::value;
+ }
+ }
+
+ using iterator_operators::operator==;
+ using iterator_operators::operator!=;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/iterator_facade.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/iterator_facade.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,47 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_ITERATOR_ITERATOR_FACADE_HPP
+#define BOOST_FUSION_ITERATOR_ITERATOR_FACADE_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/detail/advance.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/apply.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+ }
+
+ template <typename Derived, typename Category>
+ struct iterator_facade
+ : iterator_base<Derived>
+ {
+ typedef iterator_facade_tag fusion_tag;
+ typedef Derived derived_type;
+ typedef Category category;
+
+ //TODO doc
+
+ template <typename ItRef, typename N>
+ struct advance
+ : extension::advance_impl<
+ typename mpl::apply<mpl::always<void_>,ItRef>::type
+ >::template apply<ItRef,N>
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/key_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/key_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,47 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_KEY_OF_HPP
+#define BOOST_FUSION_ITERATOR_KEY_OF_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <>
+ struct key_of_impl<iterator_facade_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : detail::remove_reference<ItRef>::type::
+ template key_of<ItRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It>
+ struct key_of
+ : extension::key_of_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_associative<It>));
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/next.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/next.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,52 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_NEXT_HPP
+#define BOOST_FUSION_ITERATOR_NEXT_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<iterator_facade_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : detail::remove_reference<ItRef>::type::template next<ItRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It>
+ struct next
+ : extension::next_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ };
+ }
+
+ template <typename It>
+ typename result_of::next<It const&>::type const
+ next(It const& it)
+ {
+ return result_of::next<It const&>::call(it);
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/prior.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/prior.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,52 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_PRIOR_HPP
+#define BOOST_FUSION_ITERATOR_PRIOR_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct prior_impl;
+
+ template <>
+ struct prior_impl<iterator_facade_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : detail::remove_reference<ItRef>::type::template prior<ItRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It>
+ struct prior
+ : extension::prior_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ };
+ }
+
+ template <typename It>
+ typename result_of::prior<It const&>::type const
+ prior(It const& it)
+ {
+ return result_of::prior<It const&>::call(it);
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/value_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/value_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_VALUE_OF_HPP
+#define BOOST_FUSION_ITERATOR_VALUE_OF_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<iterator_facade_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : detail::remove_reference<ItRef>::type::template value_of<ItRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It>
+ struct value_of
+ : extension::value_of_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/iterator/value_of_data.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/iterator/value_of_data.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,47 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_ITERATOR_VALUE_OF_DATA_HPP
+#define BOOST_FUSION_ITERATOR_VALUE_OF_DATA_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <>
+ struct value_of_data_impl<iterator_facade_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : detail::remove_reference<ItRef>::type::
+ template value_of_data<ItRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename It>
+ struct value_of_data
+ : extension::value_of_data_impl<typename traits::tag_of<It>::type>::
+ template apply<typename detail::add_lref<It>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<It>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_associative<It>));
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_HPP
+#define BOOST_FUSION_MPL_HPP
+
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/fusion/mpl/at.hpp>
+#include <boost/fusion/mpl/back.hpp>
+#include <boost/fusion/mpl/begin.hpp>
+#include <boost/fusion/mpl/clear.hpp>
+#include <boost/fusion/mpl/empty.hpp>
+#include <boost/fusion/mpl/end.hpp>
+#include <boost/fusion/mpl/erase_key.hpp>
+#include <boost/fusion/mpl/erase.hpp>
+#include <boost/fusion/mpl/front.hpp>
+#include <boost/fusion/mpl/fusion_iterator.hpp>
+#include <boost/fusion/mpl/has_key.hpp>
+#include <boost/fusion/mpl/insert_range.hpp>
+#include <boost/fusion/mpl/insert.hpp>
+#include <boost/fusion/mpl/pop_back.hpp>
+#include <boost/fusion/mpl/pop_front.hpp>
+#include <boost/fusion/mpl/push_back.hpp>
+#include <boost/fusion/mpl/push_front.hpp>
+#include <boost/fusion/mpl/size.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/at.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/at.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_DETAIL_AT_HPP
+#define BOOST_FUSION_MPL_DETAIL_AT_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+namespace boost
+{
+ namespace fusion
+ {
+ struct fusion_sequence_tag;
+ }
+
+ namespace mpl
+ {
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ : fusion::result_of::value_at<SeqRef, N>
+ {};
+ };
+ }
+}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_BACK_HPP
+#define BOOST_FUSION_MPL_BACK_HPP
+
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct back_impl;
+
+ template <>
+ struct back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : fusion::result_of::value_of<
+ typename fusion::result_of::prior<
+ typename fusion::result_of::end<SeqRef>::type
+ >::type
+ >
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/begin.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/begin.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_BEGIN_HPP
+#define BOOST_FUSION_MPL_BEGIN_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/mpl/fusion_iterator.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ fusion_iterator<
+ typename fusion::result_of::begin<SeqRef>::type
+ >
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/clear.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/clear.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_CLEAR_HPP
+#define BOOST_FUSION_MPL_CLEAR_HPP
+
+#include <boost/fusion/algorithm/transformation/clear.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct clear_impl;
+
+ template <>
+ struct clear_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq>
+ struct apply
+ : fusion::result_of::clear<Seq>
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/empty.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/empty.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_EMPTY_HPP
+#define BOOST_FUSION_MPL_EMPTY_HPP
+
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct empty_impl;
+
+ template <>
+ struct empty_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq>
+ struct apply
+ : fusion::result_of::empty<Seq>
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/end.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/end.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_END_HPP
+#define BOOST_FUSION_MPL_END_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/mpl/fusion_iterator.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq>
+ struct apply
+ {
+ typedef
+ fusion_iterator<typename fusion::result_of::end<Seq>::type>
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/erase.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/erase.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_ERASE_HPP
+#define BOOST_FUSION_MPL_ERASE_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct erase_impl;
+
+ template <>
+ struct erase_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq, typename First, typename Last>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , typename fusion::result_of::erase<Seq, First, Last>::type
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/erase_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/erase_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_ERASE_KEY_HPP
+#define BOOST_FUSION_MPL_ERASE_KEY_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct erase_key_impl;
+
+ template <>
+ struct erase_key_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq, typename Key>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::erase_key<Seq, Key>::type
+ result;
+
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , result
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,31 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_FRONT_HPP
+#define BOOST_FUSION_MPL_FRONT_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct front_impl;
+
+ template <>
+ struct front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq>
+ struct apply
+ : fusion::result_of::value_of<
+ typename fusion::result_of::begin<Seq>::type
+ >
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/fusion_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/fusion_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_FUSION_ITERATOR_HPP
+#define BOOST_FUSION_MPL_FUSION_ITERATOR_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/mpl/next_prior.hpp>
+#include <boost/mpl/advance_fwd.hpp>
+#include <boost/mpl/distance_fwd.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename It>
+ struct fusion_iterator
+ {
+ typedef typename fusion::result_of::value_of<It>::type type;
+ typedef typename fusion::traits::category_of<It>::type category;
+ typedef It iterator;
+ };
+
+ template <typename It>
+ struct next<fusion_iterator<It> >
+ {
+ typedef
+ fusion_iterator<typename fusion::result_of::next<It>::type>
+ type;
+ };
+
+ template <typename It>
+ struct prior<fusion_iterator<It> >
+ {
+ typedef
+ fusion_iterator<typename fusion::result_of::prior<It>::type>
+ type;
+ };
+
+ template <typename It, typename N>
+ struct advance<fusion_iterator<It>, N>
+ {
+ typedef
+ fusion_iterator<
+ typename fusion::result_of::advance<It, N>::type
+ >
+ type;
+ };
+
+ template <typename First, typename Last>
+ struct distance<fusion_iterator<First>, fusion_iterator<Last> >
+ : fusion::result_of::distance<First, Last>
+ {};
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/has_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/has_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_HAS_KEY_HPP
+#define BOOST_FUSION_MPL_HAS_KEY_HPP
+
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct has_key_impl;
+
+ template <>
+ struct has_key_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq, typename Key>
+ struct apply
+ : fusion::result_of::has_key<Seq, Key>
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/insert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/insert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_INSERT_HPP
+#define BOOST_FUSION_MPL_INSERT_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/algorithm/transformation/insert.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct insert_impl;
+
+ template <>
+ struct insert_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq, typename Pos, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , typename fusion::result_of::insert<Seq, Pos, T>::type
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/insert_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/insert_range.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_INSERT_RANGE_HPP
+#define BOOST_FUSION_MPL_INSERT_RANGE_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct insert_range_impl;
+
+ template <>
+ struct insert_range_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq, typename Pos, typename Range>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , typename fusion::result_of::insert_range<Seq, Pos, Range>::type
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/pop_back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/pop_back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_POP_BACK_HPP
+#define BOOST_FUSION_MPL_POP_BACK_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct pop_back_impl;
+
+ template <>
+ struct pop_back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , typename fusion::result_of::pop_back<Seq>::type
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/pop_front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/pop_front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_POP_FRONT_HPP
+#define BOOST_FUSION_MPL_POP_FRONT_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct pop_front_impl;
+
+ template <>
+ struct pop_front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , typename fusion::result_of::pop_front<Seq>::type
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/push_back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/push_back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_PUSH_BACK_HPP
+#define BOOST_FUSION_MPL_PUSH_BACK_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct push_back_impl;
+
+ template <>
+ struct push_back_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , typename fusion::result_of::push_back<Seq, T>::type
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/push_front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/push_front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,36 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_PUSH_FRONT_HPP
+#define BOOST_FUSION_MPL_PUSH_FRONT_HPP
+
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/algorithm/transformation/push_front.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct push_front_impl;
+
+ template <>
+ struct push_front_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq, typename T>
+ struct apply
+ {
+ typedef typename
+ fusion::result_of::convert<
+ typename fusion::traits::tag_of<Seq>::type
+ , typename fusion::result_of::push_front<Seq, T>::type
+ >::type
+ type;
+ };
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/mpl/size.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/mpl/size.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_MPL_SIZE_HPP
+#define BOOST_FUSION_MPL_SIZE_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+
+namespace boost { namespace mpl
+{
+ template <typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<fusion::fusion_sequence_tag>
+ {
+ template <typename Seq>
+ struct apply
+ : fusion::result_of::size<Seq>
+ {};
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_HPP
+#define BOOST_FUSION_SEQUENCE_HPP
+
+#include <boost/fusion/sequence/comparison.hpp>
+#include <boost/fusion/sequence/convert.hpp>
+#include <boost/fusion/sequence/intrinsic.hpp>
+#include <boost/fusion/sequence/io.hpp>
+#include <boost/fusion/sequence/sequence_facade.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_HPP
+
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/enable_comparison.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/enable_comparison.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_DETAIL_ENABLE_COMPARISON_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_DETAIL_ENABLE_COMPARISON_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1Ref, typename Seq2Ref>
+ struct enable_equality
+ : mpl::or_<
+ traits::is_sequence<Seq1Ref>
+ , traits::is_sequence<Seq2Ref>
+ >
+ {};
+
+ template <typename Seq1Ref, typename Seq2Ref>
+ struct enable_comparison
+ : mpl::and_<
+ mpl::or_<
+ traits::is_sequence<Seq1Ref>
+ , traits::is_sequence<Seq2Ref>
+ >
+ , mpl::equal_to<result_of::size<Seq1Ref>, result_of::size<Seq2Ref> >
+ >
+ {};
+
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/equal_to.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/equal_to.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_DETAIL_EQUAL_TO_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_DETAIL_EQUAL_TO_HPP
+
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1Ref, typename Seq2Ref, bool same_size>
+ struct sequence_equal_to
+ {
+ typedef typename result_of::end<Seq1Ref>::type end1_type;
+ typedef typename result_of::end<Seq2Ref>::type end2_type;
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const&, It2 const&, mpl::true_)
+ {
+ return true;
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2, mpl::false_)
+ {
+ return fusion::deref(it1) == fusion::deref(it2)&&
+ call(fusion::next(it1), fusion::next(it2));
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2)
+ {
+ return call(it1,
+ it2,
+ typename result_of::equal_to<It1, end1_type>::type());
+ }
+ };
+
+ template <typename Seq1Ref, typename Seq2Ref>
+ struct sequence_equal_to<Seq1Ref, Seq2Ref, false>
+ {
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const&, It2 const&)
+ {
+ return false;
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/greater.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/greater.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_DETAIL_GREATER_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_DETAIL_GREATER_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2>
+ struct sequence_greater
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename It1, typename I2>
+ static bool
+ call(It1 const&, I2 const&, mpl::true_)
+ {
+ return false;
+ }
+
+ template <typename It1, typename I2>
+ static bool
+ call(It1 const& it1, It2 const& it2, mpl::false_)
+ {
+ return fusion::deref(it1) > fusion::deref(it2)||
+ (!(fusion::deref(it2) > fusion::deref(it)) &&
+ call(fusion::next(it1), fusion::next(it2)));
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2)
+ {
+ return call(
+ it1,
+ it2,
+ typename result_of::equal_to<It1, end1_type>::type());
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/greater_equal.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/greater_equal.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_DETAIL_GREATER_EQUAL_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_DETAIL_GREATER_EQUAL_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1Ref, typename Seq2Ref>
+ struct sequence_greater_equal
+ {
+ typedef typename result_of::end<Seq1Ref>::type end1_type;
+ typedef typename result_of::end<Seq2Ref>::type end2_type;
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const&, It2 const&, mpl::true_)
+ {
+ return true;
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it1, mpl::false_)
+ {
+ return fusion::deref(it1) >= fusion::deref(it2) ||
+ (!(*fusion::deref(it2) >= *fusion::deref(it1)) &&
+ call(fusion::next(a), fusion::next(b)));
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2)
+ {
+ return call(
+ it1,
+ it2,
+ typename result_of::equal_to<It1, end1_type>::type());
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/less.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/less.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_DETAIL_LESS_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_DETAIL_LESS_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2>
+ struct sequence_less
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const&, It2 const&, mpl::true_)
+ {
+ return false;
+ }
+
+ template <typename It1, typename I2>
+ static bool
+ call(It1 const& it1, I2 const& it2, mpl::false_)
+ {
+ return fusion::deref(it1) < fusion::deref(it2) ||
+ (!(fusion::deref(it2) < fusion::deref(it1)) &&
+ call(fusion::next(it1), fusion::next(it2)));
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2)
+ {
+ return call(
+ it1,
+ it2,
+ typename result_of::equal_to<It1, end1_type>::type());
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/less_equal.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/less_equal.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_DETAIL_LESS_EQUAL_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_DETAIL_LESS_EQUAL_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1, typename Seq2>
+ struct sequence_less_equal
+ {
+ typedef typename result_of::end<Seq1>::type end1_type;
+ typedef typename result_of::end<Seq2>::type end2_type;
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const&, It2 const&, mpl::true_)
+ {
+ return true;
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2, mpl::false_)
+ {
+ return fusion::deref(it1) <= fusion::deref(it2) ||
+ (!(fusion::deref(it2) <= fusion::deref(it1)) &&
+ call(fusion::next(it1), fusion::next(it2)));
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2)
+ {
+ return call(
+ it1,
+ it2,
+ typename result_of::equal_to<It1, end1_type>::type());
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/detail/not_equal_to.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_DETAIL_NOT_EQUAL_TO_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_DETAIL_NOT_EQUAL_TO_HPP
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Seq1Ref, typename Seq2Ref, bool same_size>
+ struct sequence_not_equal_to
+ {
+ typedef typename result_of::end<Seq1Ref>::type end1_type;
+ typedef typename result_of::end<Seq2Ref>::type end2_type;
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const&, It2 const&, mpl::true_)
+ {
+ return false;
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2, mpl::false_)
+ {
+ return fusion::deref(it1) != fusion::deref(it2) ||
+ call(fusion::next(it1), fusion::next(it2));
+ }
+
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const& it1, It2 const& it2)
+ {
+ return call(
+ it1,
+ it2,
+ typename result_of::equal_to<It1, end1_type>::type());
+ }
+ };
+
+ template <typename Seq1Ref, typename Seq2Ref>
+ struct sequence_not_equal_to<Seq1Ref, Seq2Ref, false>
+ {
+ template <typename It1, typename It2>
+ static bool
+ call(It1 const&, It2 const&)
+ {
+ return true;
+ }
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/equal_to.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/equal_to.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_EQUAL_TO_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_EQUAL_TO_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/sequence/comparison/detail/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ equal_to(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return
+ detail::sequence_equal_to<
+ Seq1 const&
+ , Seq2 const&
+ , result_of::size<Seq1 const&>::value==
+ result_of::size<Seq2 const&>::value
+ >::call(fusion::begin(seq1), fusion::begin(seq2));
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_equality<Seq1 const&, Seq2 const&>
+ , bool
+ >::type
+ operator==(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return fusion::equal_to(seq1, seq2);
+ }
+ }
+ using operators::operator==;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/greater.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/greater.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,66 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_GREATER_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_GREATER_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+#ifdef FUSION_DIRECT_OPERATOR_USAGE
+# include <boost/fusion/sequence/comparison/detail/greater.hpp>
+#else
+# include <boost/fusion/sequence/comparison/less.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ greater(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+#ifdef FUSION_DIRECT_OPERATOR_USAGE
+ return
+ detail::sequence_greater<
+ Seq1 const&
+ , Seq2 const&
+ >::call(fusion::begin(seq1), fusion::begin(seq2));
+#else
+ return seq2 < seq1;
+#endif
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_comparison<Seq1 const&, Seq2 const&>
+ , bool
+ >::type
+ operator>(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return fusion::greater(seq1, seq2);
+ }
+ }
+ using operators::operator>;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/greater_equal.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/greater_equal.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,66 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_GREATER_EQUAL_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_GREATER_EQUAL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+#ifdef FUSION_DIRECT_OPERATOR_USAGE
+# include <boost/fusion/sequence/comparison/detail/greater_equal.hpp>
+#else
+# include <boost/fusion/sequence/comparison/less.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ greater_equal(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+#ifdef FUSION_DIRECT_OPERATOR_USAGE
+ return
+ detail::sequence_greater_equal<
+ Seq1 const&
+ , Seq2 const&
+ >::call(fusion::begin(seq1), fusion::begin(seq2));
+#else
+ return !(seq1 < seq2);
+#endif
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_comparison<Seq1 const&, Seq2 const&>
+ , bool
+ >::type
+ operator>=(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return fusion::greater_equal(seq1, seq2);
+ }
+ }
+ using operators::operator>=;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/less.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/less.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,58 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_LESS_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_LESS_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/sequence/comparison/detail/less.hpp>
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ less(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return
+ detail::sequence_less<
+ Seq1 const&
+ , Seq2 const&
+ >::call(fusion::begin(seq1), fusion::begin(seq2));
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_equality<Seq1 const&, Seq2 const&>
+ , bool
+ >::type
+ operator<(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return fusion::less(seq1, seq2);
+ }
+ }
+ using operators::operator<;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/less_equal.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/less_equal.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,96 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_LESS_EQUAL_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_LESS_EQUAL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+# ifdef FUSION_DIRECT_OPERATOR_USAGE
+#include <boost/fusion/sequence/comparison/detail/less_equal.hpp>
+#else
+# include <boost/fusion/sequence/comparison/less.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ less_equal(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+#ifdef FUSION_DIRECT_OPERATOR_USAGE
+ return
+ detail::sequence_less_equal<
+ Seq1 const&
+ , Seq2 const&
+ , result_of::size<Seq1 const&>::value==
+ result_of::size<Seq2 const&>::value
+ >::call(fusion::begin(seq1), fusion::begin(seq2));
+#else
+ return !(seq2 < seq1);
+#endif
+ }
+
+ namespace operators
+ {
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1400)
+// Workaround for VC8.0 and VC7.1
+ template <typename Seq1, typename Seq2>
+ inline bool
+ operator<=(sequence_base<Seq1> const& seq1, sequence_base<Seq2 const&> const& seq2)
+ {
+ return less_equal(seq1.derived(), seq2.derived());
+ }
+
+ template <typename Seq1, typename Seq2>
+ inline typename disable_if<detail::is_native_fusion_sequence<Seq2 const&>, bool>::type
+ operator<=(sequence_base<Seq1> const& seq1, Seq2 const& seq2)
+ {
+ return less_equal(seq1.derived(), seq2);
+ }
+
+ template <typename Seq1, typename Seq2>
+ inline typename disable_if<detail::is_native_fusion_sequence<Seq1 const&>, bool>::type
+ operator<=(Seq1 const& seq1, sequence_base<Seq2> const& b)
+ {
+ return less_equal(seq1, seq2.derived());
+ }
+
+#else
+// Somehow VC8.0 and VC7.1 does not like this code
+// but barfs somewhere else.
+
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_comparison<Seq1 const&, Seq2 const&>
+ , bool
+ >::type
+ operator<=(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return fusion::less_equal(seq1, seq2);
+ }
+#endif
+ }
+ using operators::operator<=;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/not_equal_to.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/comparison/not_equal_to.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_COMPARISON_NOT_EQUAL_TO_HPP
+#define BOOST_FUSION_SEQUENCE_COMPARISON_NOT_EQUAL_TO_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/fusion/sequence/comparison/detail/enable_comparison.hpp>
+#ifdef FUSION_DIRECT_OPERATOR_USAGE
+# include <boost/fusion/sequence/comparison/detail/not_equal_to.hpp>
+#else
+# include <boost/fusion/sequence/comparison/equal_to.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ template <typename Seq1, typename Seq2>
+ inline bool
+ not_equal_to(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+#ifdef FUSION_DIRECT_OPERATOR_USAGE
+ return
+ detail::sequence_not_equal_to<
+ Seq1 const&
+ , Seq2 const&
+ , result_of::size<Seq1 const&>::value==
+ result_of::size<Seq2 const&>::value
+ >::call(fusion::begin(seq1), fusion::begin(seq2));
+#else
+ return !(seq1 == seq2);
+#endif
+ }
+
+ namespace operators
+ {
+ template <typename Seq1, typename Seq2>
+ inline typename
+ enable_if<
+ detail::enable_equality<Seq1 const&, Seq2 const&>
+ , bool
+ >::type
+ operator!=(Seq1 const& seq1, Seq2 const& seq2)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ return fusion::not_equal_to(seq1, seq2);
+ }
+ }
+ using operators::operator!=;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/convert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/convert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_CONVERT_HPP
+#define BOOST_FUSION_SEQUENCE_CONVERT_HPP
+
+#include <boost/config.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+//TODO doc!!!
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename Tag>
+ struct convert_impl
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ typedef typename result_of::as_vector<SeqRef>::type type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return fusion::as_vector(seq);
+ }
+ };
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Tag, typename Seq>
+ struct convert
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef typename extension::convert_impl<Tag> gen;
+
+ typedef typename
+ gen::template apply<typename detail::add_lref<Seq>::type>::type
+ type;
+ };
+ }
+
+ template <typename Tag, typename Seq>
+ inline typename
+ result_of::convert<Tag, BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ convert(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return result_of::convert<Tag, BOOST_FUSION_R_ELSE_CLREF(Seq)>::
+ gen::call(seq);
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,26 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_HPP
+
+#include <boost/fusion/sequence/intrinsic/at_c.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/swap.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at_c.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,118 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_AT_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_AT_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/container/list/list_fwd.hpp>
+# include <boost/fusion/sequence/intrinsic/size.hpp>
+#endif
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/int.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/mpl/or.hpp>
+# include <boost/type_traits/is_same.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::template at<SeqRef, N>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename N>
+ struct at
+ : extension::at_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type, N>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((
+ mpl::or_<
+ traits::is_random_access<Seq>
+ , is_same<
+ typename traits::tag_of<Seq>::type
+ , list_tag
+ >
+ >));
+
+ BOOST_FUSION_INDEX_CHECK(N::value,size<Seq>::value);
+ };
+
+ template <typename Seq, int N>
+ struct at_c
+ : at<Seq, mpl::int_<N> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((
+ mpl::or_<
+ traits::is_random_access<Seq>
+ , is_same<
+ typename traits::tag_of<Seq>::type
+ , list_tag
+ >
+ >));
+ BOOST_FUSION_INDEX_CHECK(N,size<Seq>::value);
+ };
+ }
+
+ template <typename N, typename Seq>
+ inline typename result_of::at<BOOST_FUSION_R_ELSE_CLREF(Seq), N>::type
+ at(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return result_of::at<BOOST_FUSION_R_ELSE_CLREF(Seq), N>::call(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename N, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::at<,Seq,&,N>)
+ at(Seq& seq)
+ {
+ return result_of::at<Seq&, N>::call(seq);
+ }
+#endif
+
+ template <int N, typename Seq>
+ inline typename
+ result_of::at_c<BOOST_FUSION_R_ELSE_CLREF(Seq), N>::type
+ at_c(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return fusion::at<mpl::int_<N> >(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <int N, typename Seq>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::at_c<,Seq,&, N>)
+ at_c(Seq& seq)
+ {
+ return fusion::at<mpl::int_<N> >(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_c.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_c.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_AT_C_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_AT_C_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/at_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,98 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_SEQUENCE_INTRINSIC_AT_KEY_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_AT_KEY_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#endif
+#include <boost/fusion/iterator/deref_data.hpp>
+#include <boost/fusion/algorithm/query/find_key.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct at_key_impl
+ {
+ template <typename SeqRef, typename Key>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<
+ typename result_of::find_key<SeqRef, Key>::type
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return deref_data(find_key<Key>(
+ BOOST_FUSION_FORWARD(SeqRef,seq)));
+ }
+ };
+ };
+
+ template <>
+ struct at_key_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef, typename Key>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::
+ template at_key<SeqRef, Key>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename Key>
+ struct at_key
+ : extension::at_key_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type, Key>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_associative<Seq>));
+ BOOST_FUSION_MPL_ASSERT((has_key<Seq,Key>));
+ };
+ }
+
+ template <typename Key, typename Seq>
+ inline typename
+ result_of::at_key<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , Key
+ >::type
+ at_key(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return
+ result_of::at_key<
+ BOOST_FUSION_R_ELSE_CLREF(Seq)
+ , Key
+ >::call(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Key, typename Seq>
+ inline typename result_of::at_key<Seq&, Key>::type
+ at_key(Seq& seq)
+ {
+ return result_of::at_key<Seq&, Key>::call(seq);
+ }
+#endif
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/back.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/back.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,55 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_BACK_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_BACK_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/empty.hpp>
+#endif
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace result_of
+ {
+ template <typename Seq>
+ struct back
+ : deref<typename prior<typename end<Seq>::type>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ BOOST_FUSION_MPL_ASSERT_NOT((empty<Seq>));
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::back<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ back(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return *fusion::prior(fusion::end(seq));
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq>
+ inline typename result_of::back<Seq&>::type
+ back(Seq& seq)
+ {
+ return *fusion::prior(fusion::end(seq));
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/begin.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,65 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_BEGIN_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_BEGIN_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::template begin<SeqRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq>
+ struct begin
+ : extension::begin_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ };
+ }
+
+ template <typename Seq>
+ inline typename
+ result_of::begin<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ begin(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return result_of::begin<BOOST_FUSION_R_ELSE_CLREF(Seq)>::call(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq>
+ inline typename result_of::begin<Seq&>::type
+ begin(Seq& seq)
+ {
+ return result_of::begin<Seq&>::call(seq);
+ }
+#endif
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/empty.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/empty.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_EMPTY_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_EMPTY_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct empty_impl
+ {
+ template <typename SeqRef>
+ struct apply
+ : mpl::bool_<!result_of::size<SeqRef>::value>
+ {};
+ };
+
+ template <>
+ struct empty_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::template empty<SeqRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq>
+ struct empty
+ : extension::empty_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type>::type
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::empty<Seq const&>::type
+ empty(Seq const&)
+ {
+ return typename result_of::empty<Seq const&>::type();
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/end.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_END_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_END_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::template end<SeqRef>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq>
+ struct end
+ : extension::end_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ };
+ }
+
+ template <typename Seq>
+ inline typename
+ result_of::end<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type const
+ end(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return result_of::end<BOOST_FUSION_R_ELSE_CLREF(Seq)>::call(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq>
+ inline typename result_of::end<Seq&>::type
+ end(Seq& seq)
+ {
+ return result_of::end<Seq&>::call(seq);
+ }
+#endif
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/front.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/front.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,54 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_FRONT_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_FRONT_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/empty.hpp>
+#endif
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ namespace result_of
+ {
+ template <typename Seq>
+ struct front
+ : deref<typename begin<Seq>::type>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ BOOST_FUSION_MPL_ASSERT_NOT((empty<Seq>));
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::front<BOOST_FUSION_R_ELSE_CLREF(Seq)>::type
+ front(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return *fusion::begin(seq);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename Seq>
+ inline typename result_of::front<Seq&>::type
+ front(Seq& seq)
+ {
+ return *fusion::begin(seq);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/has_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/has_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,71 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_HAS_KEY_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_HAS_KEY_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/algorithm/query/find_key.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/not.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct has_key_impl
+ {
+ template <typename SeqRef, typename Key>
+ struct apply
+ : mpl::not_<
+ typename result_of::equal_to<
+ typename result_of::find_key<SeqRef, Key>::type
+ , typename result_of::end<SeqRef>::type
+ >::type
+ >::type
+ {};
+ };
+
+ template <>
+ struct has_key_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef, typename Key>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::
+ template has_key<SeqRef, Key>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename Key>
+ struct has_key
+ : extension::has_key_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type, Key>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_associative<Seq>));
+ };
+ }
+
+ template <typename Key, typename Seq>
+ inline typename result_of::has_key<Seq const&, Key>::type
+ has_key(Seq const& seq)
+ {
+ return typename result_of::has_key<Seq const&, Key>::type();
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/size.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/size.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_SIZE_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_SIZE_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct size_impl
+ {
+ template <typename SeqRef>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::size
+ {};
+ };
+
+ template <>
+ struct size_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::
+ template size<SeqRef>::type
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq>
+ struct size
+ : extension::size_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type>::type
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+ };
+ }
+
+ template <typename Seq>
+ inline typename result_of::size<Seq const&>::type
+ size(Seq const&)
+ {
+ return typename result_of::size<Seq const&>::type();
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/swap.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/swap.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,73 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_SEQUENCE_INTRINSIC_SWAP_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_SWAP_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_RVALUE_REFERENCES
+# include <boost/fusion/container/generation/vector_tie.hpp>
+# include <boost/fusion/view/zip_view.hpp>
+# include <boost/fusion/algorithm/iteration/for_each.hpp>
+# include <boost/fusion/sequence/intrinsic/front.hpp>
+# include <boost/fusion/sequence/intrinsic/back.hpp>
+#endif
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/size.hpp>
+#endif
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <algorithm>
+
+namespace boost { namespace fusion {
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ namespace detail
+ {
+ struct swap
+ {
+ typedef void result_type;
+
+ template<typename Elem>
+ void operator()(Elem const& e) const
+ {
+ std::swap(fusion::front(e), fusion::back(e));
+ }
+ };
+ }
+#endif
+
+ namespace result_of
+ {
+ template<typename Seq1, typename Seq2>
+ struct swap
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+ BOOST_FUSION_STATIC_ASSERT((size<Seq1>::value==size<Seq2>::value));
+
+ typedef void type;
+ };
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template<typename Seq1, typename Seq2>
+ typename result_of::swap<Seq1&,Seq2&>::type
+ swap(Seq1& seq1, Seq2& seq2)
+ {
+ for_each(zip_view<typename result_of::vector_tie<Seq1&,Seq2&>::type>(
+ vector_tie(seq1, seq2))
+ , detail::swap());
+ }
+#else
+ using std::swap;
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,84 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_INTRINSIC_VALUE_AT_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_VALUE_AT_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/container/list/list_fwd.hpp>
+# include <boost/fusion/sequence/intrinsic/size.hpp>
+#endif
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/int.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/mpl/or.hpp>
+# include <boost/type_traits/is_same.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::
+ template value_at<SeqRef, N>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename N>
+ struct value_at
+ : extension::value_at_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type, N>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((
+ mpl::or_<
+ traits::is_random_access<Seq>
+ , is_same<
+ typename traits::tag_of<Seq>::type
+ , list_tag
+ >
+ >));
+ BOOST_FUSION_INDEX_CHECK(N::value,size<Seq>::value);
+ BOOST_FUSION_INDEX_CHECK(N::value,size<Seq>::value);
+ };
+
+ template <typename Seq, int N>
+ struct value_at_c
+ : result_of::value_at<Seq,mpl::int_<N> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((
+ mpl::or_<
+ traits::is_random_access<Seq>
+ , is_same<
+ typename traits::tag_of<Seq>::type
+ , list_tag
+ >
+ >));
+ BOOST_FUSION_INDEX_CHECK(N,size<Seq>::value);
+ BOOST_FUSION_INDEX_CHECK(N,size<Seq>::value);
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_c.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_c.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,11 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SEQUENCE_INTRINSIC_VALUE_AT_C_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_VALUE_AT_C_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_key.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/intrinsic/value_at_key.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_SEQUENCE_INTRINSIC_VALUE_AT_KEY_HPP
+#define BOOST_FUSION_SEQUENCE_INTRINSIC_VALUE_AT_KEY_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#endif
+#include <boost/fusion/iterator/value_of_data.hpp>
+#include <boost/fusion/algorithm/query/find_key.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/int.hpp>
+
+namespace boost { namespace fusion
+{
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_key_impl
+ {
+ template <typename SeqRef, typename Key>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of_data<
+ typename result_of::find_key<SeqRef, Key>::type
+ >::type
+ type;
+ };
+ };
+
+ template <>
+ struct value_at_key_impl<sequence_facade_tag>
+ {
+ template <typename SeqRef, typename Key>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::
+ template value_at_key<SeqRef, Key>
+ {};
+ };
+ }
+
+ namespace result_of
+ {
+ template <typename Seq, typename Key>
+ struct value_at_key
+ : extension::value_at_key_impl<typename traits::tag_of<Seq>::type>::
+ template apply<typename detail::add_lref<Seq>::type, Key>
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_associative<Seq>));
+ BOOST_FUSION_MPL_ASSERT((has_key<Seq,Key>));
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/io.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/io.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_IO_HPP
+#define BOOST_FUSION_SEQUENCE_IO_HPP
+
+#include <boost/fusion/sequence/io/in.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/in.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/in.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,93 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_IO_DETAIL_IN_HPP
+#define BOOST_FUSION_SEQUENCE_IO_DETAIL_IN_HPP
+
+#include <istream>
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/sequence/io/detail/manip.hpp>
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Tag>
+ struct delimiter_in
+ {
+ // read a delimiter
+ template <typename IS>
+ static void
+ read(IS& is, char const* delim, mpl::false_ = mpl::false_())
+ {
+ detail::string_ios_manip<Tag, IS> manip(is);
+ manip.read(delim);
+ }
+
+ template <typename IS>
+ static void
+ read(IS& is, char const* delim, mpl::true_)
+ {
+ }
+ };
+
+ struct read_sequence_loop
+ {
+ template <typename IS, typename First, typename Last>
+ static void
+ call(IS& is, First const&, Last const&, mpl::true_)
+ {
+ }
+
+ template <typename IS, typename First, typename Last>
+ static void
+ call(IS& is, First const& first, Last const& last, mpl::false_)
+ {
+ typedef typename
+ result_of::equal_to<
+ typename result_of::next<First>::type
+ , Last
+ >::type
+ is_last;
+
+ is >> fusion::deref(first);
+ delimiter_in<tuple_delimiter_tag>::read(is, " ", is_last());
+ call(is, fusion::next(first), last, is_last());
+ }
+
+ template <typename IS, typename First, typename Last>
+ static void
+ call(IS& is, First const& first, Last const& last)
+ {
+ call(is,
+ first,
+ last,
+ typename result_of::equal_to<
+ First const&
+ , Last const&
+ >::type());
+ }
+ };
+
+ template <typename IS, typename Seq>
+ inline void
+ read_sequence(IS& is, Seq& seq)
+ {
+ delimiter_in<tuple_open_tag>::read(is, "(");
+ read_sequence_loop::call(is, fusion::begin(seq), fusion::end(seq));
+ delimiter_in<tuple_close_tag>::read(is, ")");
+ }
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/manip.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/manip.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,311 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_IO_DETAIL_MANIP_HPP
+#define BOOST_FUSION_SEQUENCE_IO_DETAIL_MANIP_HPP
+
+#include <boost/config.hpp>
+#include <string>
+#include <vector>
+#include <cctype>
+
+// Tuple I/O manipulators
+
+#if defined (BOOST_NO_TEMPLATED_STREAMS)
+# define BOOST_FUSION_STRING_OF_STREAM(Stream) std::string
+#else
+# define BOOST_FUSION_STRING_OF_STREAM(Stream) \
+ std::basic_string< \
+ typename Stream::char_type \
+ , typename Stream::traits_type \
+ >
+#endif
+
+//$$$ these should be part of the public API$$$
+//$$$ rename tuple_open, tuple_close and tuple_delimiter to
+// open, close and delimeter and add these synonyms to the
+// TR1 tuple module.
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template <typename Tag>
+ int get_xalloc_index(Tag* = 0)
+ {
+ // each Tag will have a unique index
+ static int index = std::ios::xalloc();
+ return index;
+ }
+
+ template <typename Stream, typename Tag, typename T>
+ struct stream_data
+ {
+ struct arena
+ {
+ ~arena()
+ {
+ for (
+ typename std::vector<T*>::iterator i = data.begin()
+ ; i != data.end()
+ ; ++i)
+ {
+ delete *i;
+ }
+ }
+
+ std::vector<T*> data;
+ };
+
+ static void attach(Stream& stream, T const& data)
+ {
+ static arena ar; // our arena
+ ar.data.push_back(new T(data));
+ stream.pword(get_xalloc_index<Tag>()) = ar.data.back();
+ }
+
+ static T const* get(Stream& stream)
+ {
+ return (T const*)stream.pword(get_xalloc_index<Tag>());
+ }
+ };
+
+ template <typename Tag, typename Stream>
+ class string_ios_manip
+ {
+ public:
+ typedef BOOST_FUSION_STRING_OF_STREAM(Stream) string_type;
+
+ typedef stream_data<Stream, Tag, string_type> stream_data_t;
+
+ string_ios_manip(Stream& str_)
+ : stream(str_)
+ {}
+
+ void
+ set(string_type const& s)
+ {
+ stream_data_t::attach(stream, s);
+ }
+
+ void
+ print(char const* default_) const
+ {
+ // print a delimiter
+ string_type const* p = stream_data_t::get(stream);
+ if (p)
+ stream << *p;
+ else
+ stream << default_;
+ }
+
+ void
+ read(char const* default_) const
+ {
+ // read a delimiter
+ string_type const* p = stream_data_t::get(stream);
+ using namespace std;
+ ws(stream);
+
+ if (p)
+ {
+ typedef typename string_type::const_iterator iterator;
+ for (iterator i = p->begin(); i != p->end(); ++i)
+ check_delim(*i);
+ }
+ else
+ {
+ while (*default_)
+ check_delim(*default_++);
+ }
+ }
+
+ private:
+
+ template <typename Char>
+ void
+ check_delim(Char c) const
+ {
+ if (!isspace(c))
+ {
+ if (stream.get() != c)
+ {
+ stream.unget();
+ stream.setstate(std::ios::failbit);
+ }
+ }
+ }
+
+ Stream& stream;
+ };
+
+ } // detail
+
+#if defined (BOOST_NO_TEMPLATED_STREAMS)
+
+#define STD_TUPLE_DEFINE_MANIPULATOR(name) \
+ namespace detail \
+ { \
+ struct name##_tag; \
+ \
+ struct name##_type \
+ { \
+ typedef std::string string_type; \
+ string_type data; \
+ name##_type(const string_type& d): data(d) {} \
+ }; \
+ \
+ template <typename Stream> \
+ Stream& operator>>(Stream& s, const name##_type& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ \
+ template <typename Stream> \
+ Stream& operator<<(Stream& s, const name##_type& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ }
+
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
+ inline detail::name##_type \
+ name(const std::string& s) \
+ { \
+ return detail::name##_type(s); \
+ } \
+ \
+ inline detail::name##_type \
+ name(const char* s) \
+ { \
+ return detail::name##_type(std::string(s)); \
+ } \
+ \
+ inline detail::name##_type \
+ name(char c) \
+ { \
+ return detail::name##_type(std::string(1, c)); \
+ }
+
+#else // defined(BOOST_NO_TEMPLATED_STREAMS)
+
+#if defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
+ template <typename Char, typename Traits> \
+ inline detail::name##_type<Char, Traits> \
+ name(const std::basic_string<Char, Traits>& s) \
+ { \
+ return detail::name##_type<Char, Traits>(s); \
+ } \
+ \
+ inline detail::name##_type<char> \
+ name(char const* s) \
+ { \
+ return detail::name##_type<char>(std::basic_string<char>(s)); \
+ } \
+ \
+ inline detail::name##_type<wchar_t> \
+ name(wchar_t const* s) \
+ { \
+ return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(s)); \
+ } \
+ \
+ inline detail::name##_type<char> \
+ name(char c) \
+ { \
+ return detail::name##_type<char>(std::basic_string<char>(1, c)); \
+ } \
+ \
+ inline detail::name##_type<wchar_t> \
+ name(wchar_t c) \
+ { \
+ return detail::name##_type<wchar_t>(std::basic_string<wchar_t>(1, c)); \
+ }
+
+#else // defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
+
+#define STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(name) \
+ template <typename Char, typename Traits> \
+ inline detail::name##_type<Char, Traits> \
+ name(const std::basic_string<Char, Traits>& s) \
+ { \
+ return detail::name##_type<Char, Traits>(s); \
+ } \
+ \
+ template <typename Char> \
+ inline detail::name##_type<Char> \
+ name(Char s[]) \
+ { \
+ return detail::name##_type<Char>(std::basic_string<Char>(s)); \
+ } \
+ \
+ template <typename Char> \
+ inline detail::name##_type<Char> \
+ name(Char const s[]) \
+ { \
+ return detail::name##_type<Char>(std::basic_string<Char>(s)); \
+ } \
+ \
+ template <typename Char> \
+ inline detail::name##_type<Char> \
+ name(Char c) \
+ { \
+ return detail::name##_type<Char>(std::basic_string<Char>(1, c)); \
+ }
+
+#endif
+
+#define STD_TUPLE_DEFINE_MANIPULATOR(name) \
+ namespace detail \
+ { \
+ struct name##_tag; \
+ \
+ template <typename Char, typename Traits = std::char_traits<Char> > \
+ struct name##_type \
+ { \
+ typedef std::basic_string<Char, Traits> string_type; \
+ string_type data; \
+ name##_type(const string_type& d): data(d) {} \
+ }; \
+ \
+ template <typename Stream, typename Char, typename Traits> \
+ Stream& operator>>(Stream& s, const name##_type<Char,Traits>& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ \
+ template <typename Stream, typename Char, typename Traits> \
+ Stream& operator<<(Stream& s, const name##_type<Char,Traits>& m) \
+ { \
+ string_ios_manip<name##_tag, Stream>(s).set(m.data); \
+ return s; \
+ } \
+ } \
+
+#endif // defined(BOOST_NO_TEMPLATED_STREAMS)
+
+ STD_TUPLE_DEFINE_MANIPULATOR(tuple_open)
+ STD_TUPLE_DEFINE_MANIPULATOR(tuple_close)
+ STD_TUPLE_DEFINE_MANIPULATOR(tuple_delimiter)
+
+ STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_open)
+ STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_close)
+ STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS(tuple_delimiter)
+
+#undef STD_TUPLE_DEFINE_MANIPULATOR
+#undef STD_TUPLE_DEFINE_MANIPULATOR_FUNCTIONS
+#undef BOOST_FUSION_STRING_OF_STREAM
+
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/out.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/io/detail/out.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,92 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_IO_DETAIL_OUT_HPP
+#define BOOST_FUSION_SEQUENCE_IO_DETAIL_OUT_HPP
+
+#include <ostream>
+#include <boost/fusion/sequence/io/detail/manip.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename Tag>
+ struct delimiter_out
+ {
+ // print a delimiter
+ template <typename OS>
+ static void
+ print(OS& os, char const* delim, mpl::false_ = mpl::false_())
+ {
+ detail::string_ios_manip<Tag, OS> manip(os);
+ manip.print(delim);
+ }
+
+ template <typename OS>
+ static void
+ print(OS& os, char const* delim, mpl::true_)
+ {
+ }
+ };
+
+ struct print_sequence_loop
+ {
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const&, Last const&, mpl::true_)
+ {
+ }
+
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const& first, Last const& last, mpl::false_)
+ {
+ typedef typename
+ result_of::equal_to<
+ typename result_of::next<First>::type
+ , Last
+ >::type
+ is_last;
+
+ os << fusion::deref(first);
+ delimiter_out<tuple_delimiter_tag>::print(os, " ", is_last());
+ call(os, fusion::next(first), last, is_last());
+ }
+
+ template <typename OS, typename First, typename Last>
+ static void
+ call(OS& os, First const& first, Last const& last)
+ {
+ call(os,
+ first,
+ last,
+ typename result_of::equal_to<
+ First const&
+ , Last const&
+ >::type());
+ }
+ };
+
+ template <typename OS, typename Seq>
+ inline void
+ print_sequence(OS& os, Seq const& seq)
+ {
+ delimiter_out<tuple_open_tag>::print(os, "(");
+ print_sequence_loop::call(os, fusion::begin(seq), fusion::end(seq));
+ delimiter_out<tuple_close_tag>::print(os, ")");
+ }
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/io/in.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/io/in.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_IO_IN_HPP
+#define BOOST_FUSION_SEQUENCE_IO_IN_HPP
+
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <istream>
+
+#include <boost/fusion/sequence/io/detail/in.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Seq>
+ inline std::istream&
+ in(std::istream& is, Seq& seq)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ detail::read_sequence(is, seq);
+ return is;
+ }
+
+ namespace operators
+ {
+ template <typename Seq>
+ inline typename
+ enable_if<
+ fusion::traits::is_sequence<Seq>
+ , std::istream&
+ >::type
+ operator>>(std::istream& is, Seq& seq)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ return fusion::in(is, seq);
+ }
+ }
+
+ using operators::operator>>;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/io/out.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/io/out.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,55 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 1999-2003 Jeremiah Willcock
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SEQUENCE_IO_OUT_HPP
+#define BOOST_FUSION_SEQUENCE_IO_OUT_HPP
+
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/or.hpp>
+
+#include <ostream>
+
+#include <boost/fusion/sequence/io/detail/out.hpp>
+
+namespace boost { namespace fusion
+{
+ template <typename Seq>
+ inline std::ostream&
+ out(std::ostream& os, Seq& seq)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ detail::print_sequence(os, seq);
+ return os;
+ }
+
+ namespace operators
+ {
+ template <typename Seq>
+ inline typename
+ enable_if<
+ fusion::traits::is_sequence<Seq>
+ , std::ostream&
+ >::type
+ operator<<(std::ostream& os, Seq const& seq)
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ return fusion::out(os, seq);
+ }
+ }
+ using operators::operator<<;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/sequence/sequence_facade.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/sequence/sequence_facade.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,89 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SEQUENCE_SEQUENCE_FACADE_HPP
+#define BOOST_FUSION_SEQUENCE_SEQUENCE_FACADE_HPP
+
+#include <boost/fusion/support/sequence_base.hpp>
+
+#include <boost/mpl/apply.hpp>
+#include <boost/mpl/always.hpp>
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct sequence_facade_tag;
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_key_impl;
+
+ template<typename Tag>
+ struct empty_impl;
+
+ template<typename Tag>
+ struct size_impl;
+
+ template<typename Tag>
+ struct has_key_impl;
+
+ template<typename Tag>
+ struct value_at_key_impl;
+ }
+
+ template<
+ typename Derived
+ , typename Category
+ , typename IsView = mpl::false_
+ >
+ struct sequence_facade
+ : sequence_base<Derived>
+ {
+ typedef sequence_facade_tag fusion_tag;
+ typedef Derived derived_type;
+ typedef Category category;
+ typedef IsView is_view;
+
+ template<typename SeqRef,typename Key>
+ struct at_key
+ : extension::at_key_impl<
+ typename mpl::apply<mpl::always<void_>,SeqRef>::type
+ >::template apply<SeqRef,Key>
+ {};
+
+ template<typename SeqRef>
+ struct empty
+ : extension::empty_impl<
+ typename mpl::apply<mpl::always<void_>,SeqRef>::type
+ >::template apply<SeqRef>
+ {};
+
+ template<typename SeqRef>
+ struct size
+ : extension::size_impl<
+ typename mpl::apply<mpl::always<void_>,SeqRef>::type
+ >::template apply<SeqRef>
+ {};
+
+ template<typename SeqRef,typename Key>
+ struct has_key
+ : extension::has_key_impl<
+ typename mpl::apply<mpl::always<void_>,SeqRef>::type
+ >::template apply<SeqRef,Key>
+ {};
+
+ template<typename SeqRef,typename Key>
+ struct value_at_key
+ : extension::value_at_key_impl<
+ typename mpl::apply<mpl::always<void_>,SeqRef>::type
+ >::template apply<SeqRef,Key>
+ {};
+
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,24 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_HPP
+#define BOOST_FUSION_SUPPORT_HPP
+
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/deduce_sequence.hpp>
+#include <boost/fusion/support/deduce.hpp>
+#include <boost/fusion/support/is_iterator.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/category_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,157 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_CATEGORY_OF_HPP
+#define BOOST_FUSION_SUPPORT_CATEGORY_OF_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+#include <boost/config.hpp>
+#include <boost/mpl/iterator_tags.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct incrementable_traversal_tag
+ {};
+
+ struct single_pass_traversal_tag
+ : incrementable_traversal_tag
+ {};
+
+ //cschmidt: to ensure full compatibility between fusion and mpl iterators,
+ //the tags should inheritate the corresponding mpl tags.
+ //Fusion tags may be used as template arguments for iterator base classes
+ //(e.g. fusion::iterator_facade), therefore emulate the mpl tags (see
+ //(3.4.2/2) for more details.
+ struct forward_traversal_tag
+ : single_pass_traversal_tag
+ {
+ typedef mpl::forward_iterator_tag::tag tag;
+ typedef mpl::forward_iterator_tag::value_type value_type;
+ typedef forward_traversal_tag type;
+ BOOST_STATIC_CONSTANT(
+ value_type,
+ value=mpl::forward_iterator_tag::value);
+
+ operator value_type() const
+ {
+ return value;
+ }
+ };
+
+ struct bidirectional_traversal_tag
+ : forward_traversal_tag
+ {
+ typedef mpl::bidirectional_iterator_tag::tag tag;
+ typedef mpl::bidirectional_iterator_tag::value_type value_type;
+ typedef bidirectional_traversal_tag type;
+ BOOST_STATIC_CONSTANT(
+ value_type,
+ value=mpl::bidirectional_iterator_tag::value);
+
+ operator value_type() const
+ {
+ return value;
+ }
+ };
+
+ struct random_access_traversal_tag
+ : bidirectional_traversal_tag
+ {
+ typedef mpl::random_access_iterator_tag::tag tag;
+ typedef mpl::random_access_iterator_tag::value_type value_type;
+ typedef bidirectional_traversal_tag type;
+ BOOST_STATIC_CONSTANT(
+ value_type,
+ value=mpl::random_access_iterator_tag::value);
+
+ operator value_type() const
+ {
+ return value;
+ }
+ };
+
+ struct associative_sequence_tag
+ {};
+
+ namespace extension
+ {
+ template<typename>
+ struct category_of_impl
+ {
+ template<typename T>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<T>::type::category
+ type;
+ };
+ };
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct category_of
+ : extension::category_of_impl<
+ typename fusion::traits::tag_of<T>::type
+ >::template apply<typename detail::add_lref<T>::type>
+ {};
+
+ template <typename T>
+ struct is_associative
+ : is_base_of<
+ associative_sequence_tag
+ , typename category_of<T>::type
+ >
+ {};
+
+ template <typename T>
+ struct is_incrementable
+ : is_base_of<
+ incrementable_traversal_tag
+ , typename category_of<T>::type
+ >
+ {};
+
+ template <typename T>
+ struct is_single_pass
+ : is_base_of<
+ single_pass_traversal_tag
+ , typename category_of<T>::type
+ >
+ {};
+
+ template <typename T>
+ struct is_forward
+ : is_base_of<
+ forward_traversal_tag
+ , typename category_of<T>::type
+ >
+ {};
+
+ template <typename T>
+ struct is_bidirectional
+ : is_base_of<
+ bidirectional_traversal_tag
+ , typename category_of<T>::type
+ >
+ {};
+
+ template <typename T>
+ struct is_random_access
+ : is_base_of<
+ random_access_traversal_tag
+ , typename category_of<T>::type
+ >
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/deduce.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/deduce.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,77 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_DEDUCE_HPP
+#define BOOST_FUSION_SUPPORT_DEDUCE_HPP
+
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_RVALUE_REFERENCES
+# include <boost/mpl/eval_if.hpp>
+# include <boost/mpl/identity.hpp>
+#else
+# include <boost/mpl/if.hpp>
+#endif
+
+namespace boost { namespace fusion { namespace traits
+{
+ //TODO doc!
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <typename T>
+ struct deduce_impl
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct deduce_impl<T const&>
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct deduce_impl<T const volatile&>
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct deduce
+ {
+ typedef typename detail::as_fusion_element<T>::type element;
+
+ typedef typename
+ mpl::eval_if<
+ mpl::and_<
+ detail::is_lrref<T>
+ , is_same<typename detail::identity<T>::type,element>
+ >
+ , deduce_impl<T>
+ , mpl::identity<element>
+ >::type
+ type;
+ };
+#else
+ template <typename T>
+ struct deduce
+ {
+ typedef typename detail::as_fusion_element<T>::type element;
+
+ typedef typename
+ mpl::if_<
+ mpl::and_<
+ detail::is_lrref<T>
+ , is_same<typename detail::identity<T>::type,element>
+ >
+ , T
+ , element
+ >::type
+ type;
+ };
+#endif
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/deduce_sequence.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/deduce_sequence.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,41 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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_FUSION_SUPPORT_DEDUCE_SEQUENCE_HPP
+#define BOOST_FUSION_SUPPORT_DEDUCE_SEQUENCE_HPP
+
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/view/transform_view.hpp>
+#include <boost/fusion/support/deduce.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct deducer
+ {
+ template <typename Sig>
+ struct result;
+
+ template<typename Self,typename T>
+ struct result<Self(T)>
+ : fusion::traits::deduce<T>
+ {};
+ };
+ }
+
+ namespace traits
+ {
+ template <typename Seq>
+ struct deduce_sequence
+ : result_of::as_vector<fusion::transform_view<Seq, detail::deducer> >
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/as_fusion_element.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/as_fusion_element.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,95 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_INTERNAL_AS_FUSION_ELEMENT_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_AS_FUSION_ELEMENT_HPP
+
+//TODO cschmidt: rref
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/ref.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ struct as_fusion_element
+ {
+ typedef T type;
+ };
+
+ template <typename T>
+ struct as_fusion_element<reference_wrapper<T> >
+ {
+ typedef T& type;
+ };
+
+#define BOOST_FUSION_CV_REF_SPECIALIZATION(COMBINATION,_)\
+ template <typename T>\
+ struct as_fusion_element<T COMBINATION>\
+ : as_fusion_element<T>\
+ {};\
+ \
+ template <typename T>\
+ struct as_fusion_element<reference_wrapper<T> COMBINATION>\
+ {\
+ typedef T& type;\
+ };
+
+ BOOST_FUSION_CV_REF_SPECIALIZATION(volatile&,_)
+ BOOST_FUSION_CV_REF_SPECIALIZATION(const volatile&,_)
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(BOOST_FUSION_CV_REF_SPECIALIZATION,_)
+
+#undef BOOST_FUSION_CV_REF_SPECIALIZATION
+
+ template <typename T, int N>
+ struct as_fusion_element<T(&)[N]>
+ {
+ typedef T(&type)[N];
+ };
+
+ template <typename T, int N>
+ struct as_fusion_element<const T(&)[N]>
+ {
+ typedef const T(&type)[N];
+ };
+
+ template <typename T, int N>
+ struct as_fusion_element<volatile T(&)[N]>
+ {
+ typedef volatile T(&type)[N];
+ };
+
+ template <typename T, int N>
+ struct as_fusion_element<const volatile T(&)[N]>
+ {
+ typedef const volatile T(&type)[N];
+ };
+
+ template <typename T>
+ struct as_fusion_element_ref
+ {
+ typedef typename as_fusion_element<T>::type element;
+
+ typedef typename
+ mpl::if_<
+ mpl::and_<
+ is_lrref<T>
+ , is_same<typename identity<T>::type,element>
+ >
+ , T
+ , typename add_lref<element>::type
+ >::type
+ type;
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/assert.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/assert.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,106 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_ASSERT_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_ASSERT_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/config.hpp>
+# include <boost/type_traits/is_base_of.hpp>
+
+# ifdef BOOST_NO_STATIC_ASSERT
+# include <boost/mpl/assert.hpp>
+# include <boost/static_assert.hpp>
+
+# define BOOST_FUSION_MPL_ASSERT(PRED)\
+ BOOST_MPL_ASSERT(PRED)
+# define BOOST_FUSION_MPL_ASSERT_NOT(PRED)\
+ BOOST_MPL_ASSERT_NOT(PRED)
+# define BOOST_FUSION_STATIC_ASSERT(PRED)\
+ BOOST_STATIC_ASSERT(PRED)
+# define BOOST_FUSION_MPL_ASSERT_MSG(PRED,MESSAGE)\
+ BOOST_FUSION_MPL_ASSERT(PRED)
+# define BOOST_FUSION_MPL_ASSERT_NOT_MSG(PRED,MESSAGE)\
+ BOOST_FUSION_MPL_ASSERT_NOT(PRED)
+# define BOOST_FUSION_STATIC_ASSERT_MSG(PRED,MESSAGE)\
+ BOOST_FUSION_STATIC_ASSERT(PRED)
+# else
+# include <boost/preprocessor/stringize.hpp>
+# include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ typedef char small_type;
+ struct big_type
+ {
+ char data[1024];
+ };
+
+ template<typename Pred>
+ typename mpl::if_<Pred,small_type,big_type>::type
+ evaluate_pred(void(*)(Pred));
+}}}
+
+# define BOOST_FUSION_MPL_ASSERT(PRED)\
+ static_assert(\
+ sizeof(detail::evaluate_pred(\
+ reinterpret_cast<void (*) PRED>(0)))==\
+ sizeof(detail::small_type)\
+ , "assert failed: " BOOST_PP_STRINGIZE(PRED))
+# define BOOST_FUSION_MPL_ASSERT_NOT(PRED)\
+ static_assert(\
+ sizeof(detail::evaluate_pred(\
+ reinterpret_cast<void (*) PRED>(0)))==\
+ sizeof(detail::big_type)\
+ , "assert failed: " BOOST_PP_STRINGIZE(PRED))
+# define BOOST_FUSION_STATIC_ASSERT(PRED)\
+ static_assert(\
+ PRED\
+ , "assert failed: " BOOST_PP_STRINGIZE(PRED))
+# define BOOST_FUSION_MPL_ASSERT_MSG(PRED,MESSAGE)\
+ static_assert(\
+ sizeof(detail::evaluate_pred(\
+ reinterpret_cast<void (*) PRED>(0)))==\
+ sizeof(detail::small_type)\
+ , "assert failed: " MESSAGE\
+ " - assert expression: " BOOST_PP_STRINGIZE(PRED))
+# define BOOST_FUSION_MPL_ASSERT_NOT_MSG(PRED,MESSAGE)\
+ static_assert(\
+ sizeof(detail::evaluate_pred(\
+ reinterpret_cast<void (*) PRED>(0)))!=\
+ , sizeof(detail::small_type)\
+ , "assert failed: " MESSAGE\
+ " - assert expression: " BOOST_PP_STRINGIZE(PRED))
+# define BOOST_FUSION_STATIC_ASSERT_MSG(PRED,MESSAGE)\
+ static_assert(\
+ PRED\
+ , "assert failed: " MESSAGE\
+ " - assert expression: " BOOST_PP_STRINGIZE(PRED))
+# endif
+#else
+# define BOOST_FUSION_MPL_ASSERT(PRED)
+# define BOOST_FUSION_MPL_ASSERT_NOT(PRED)
+# define BOOST_FUSION_STATIC_ASSERT(PRED)
+# define BOOST_FUSION_MPL_ASSERT_MSG(PRED,MESSAGE)
+# define BOOST_FUSION_MPL_ASSERT_NOT_MSG(PRED,MESSAGE)
+# define BOOST_FUSION_STATIC_ASSERT_MSG(PRED,MESSAGE)
+#endif
+
+#define BOOST_FUSION_INDEX_CHECK(INDEX,MAX)\
+ BOOST_FUSION_STATIC_ASSERT_MSG(\
+ (INDEX) >= 0 && (INDEX) < (MAX),\
+ "Index (" BOOST_PP_STRINGIZE(INDEX) ") out of range " \
+ "( [0..." BOOST_PP_STRINGIZE(MAX) ") )" \
+ )
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/support/is_view.hpp>
+# include <boost/fusion/support/is_sequence.hpp>
+# include <boost/fusion/support/is_iterator.hpp>
+# include <boost/fusion/support/category_of.hpp>
+# include <boost/fusion/support/tag_of.hpp>
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/assign_tags.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/assign_tags.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_ASSIGN_TAGS_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_ASSIGN_TAGS_HPP
+
+namespace boost { namespace fusion { namespace detail
+{
+ struct assign_directly
+ {};
+
+ struct assign_by_deref
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/ref.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/ref.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,198 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_REF_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_REF_HPP
+
+#include <boost/config.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+#include <boost/mpl/eval_if.hpp>
+#ifndef BOOST_NO_RVALUE_REFERENCES
+# include <boost/mpl/or.hpp>
+#endif
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/bool.hpp>
+
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_volatile.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+# include <utility>
+#endif
+
+//cschmidt: We ignore volatile in the BOOST_FUSION_ALL_CV_*-Macros, as we would
+//get a lot of problems with older compilers. On top of that, fusion
+//types are not meant to be volatile anyway.
+#ifdef BOOST_NO_RVALUE_REFERENCES
+# define BOOST_FUSION_R_ELSE_LREF(OBJECT) OBJECT&
+# define BOOST_FUSION_R_ELSE_CLREF(OBJECT) OBJECT const&
+
+# define BOOST_FUSION_FORWARD(TYPE,ARGUMENT) ARGUMENT
+
+# define BOOST_FUSION_ALL_CTOR_COMBINATIONS(MACRO,ARG)\
+ MACRO(const&,ARG)
+# define BOOST_FUSION_ALL_CV_REF_COMBINATIONS(MACRO,ARG)\
+ MACRO(const&,ARG)\
+ MACRO(&,ARG)
+#else
+# define BOOST_FUSION_R_ELSE_LREF(OBJECT) OBJECT&&
+# define BOOST_FUSION_R_ELSE_CLREF(OBJECT) OBJECT&&
+
+# define BOOST_FUSION_FORWARD(TYPE,ARGUMENT) std::forward<TYPE>(ARGUMENT)
+
+# define BOOST_FUSION_ALL_CTOR_COMBINATIONS(MACRO,ARG)\
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(MACRO,ARG)
+# define BOOST_FUSION_ALL_CV_REF_COMBINATIONS(MACRO,ARG)\
+ MACRO(&,ARG)\
+ MACRO(const&,ARG)\
+ MACRO(&&,ARG)\
+ MACRO(const&&,ARG)
+#endif
+#define BOOST_FUSION_ALL_CV_REF_NON_REF_COMBINATIONS(MACRO,ARG)\
+ BOOST_FUSION_ALL_CV_REF_COMBINATIONS(MACRO,ARG)\
+ MACRO(BOOST_PP_EMPTY(),ARG)\
+ MACRO(const,ARG)
+
+namespace boost { namespace fusion { namespace detail
+{
+ //cschmidt: workaround until boost::is_reference supports rvalues
+ template<typename T>
+ struct is_lrref
+ : mpl::false_
+ {
+ };
+
+ template<typename T>
+ struct is_lrref<T&>
+ : mpl::true_
+ {
+ };
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ template<typename T>
+ struct is_lrref<T&&>
+ : mpl::true_
+ {
+ };
+
+ template<typename T>
+ struct is_rref
+ : mpl::false_
+ {
+ };
+
+ template<typename T>
+ struct is_rref<T&&>
+ : mpl::true_
+ {
+ };
+#endif
+
+ //cschmidt: workaround until boost::is_reference supports rvalues
+ template<typename T>
+ struct remove_reference
+ {
+ typedef T type;
+ };
+
+ template<typename T>
+ struct remove_reference<T&>
+ {
+ typedef T type;
+ };
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ template<typename T>
+ struct remove_reference<T&&>
+ {
+ typedef T type;
+ };
+#endif
+
+ template <typename T>
+ struct add_lref
+ : add_reference<T>
+ {};
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ template <typename T>
+ struct add_lref<T&&>
+ {
+ typedef T&& type;
+ };
+#endif
+
+ template <typename T>
+ struct identity
+ {
+ typedef typename remove_const<
+ typename remove_cv<
+ typename remove_reference<T>::type
+ >::type
+ >::type type;
+ };
+
+ template <typename T>
+ struct non_ref_parameter
+ {
+ typedef typename boost::remove_cv<T>::type const& type;
+ };
+
+ template <typename TestType,typename Type>
+ struct forward_as
+ {
+ typedef typename remove_reference<TestType>::type test_type;
+
+ typedef typename
+ mpl::if_<
+ is_const<test_type>
+ , typename add_const<Type>::type
+ , Type
+ >::type
+ const_type;
+
+ typedef typename
+ mpl::if_<
+ is_volatile<test_type>
+ , typename add_volatile<const_type>::type
+ , const_type
+ >::type
+ cv_type;
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ typedef typename add_reference<cv_type>::type type;
+#else
+ typedef typename
+ mpl::eval_if<
+ //8.5.3p5...
+ mpl::or_<is_class<Type>
+ , is_array<Type>
+ //cschmidt: workaround until Boost.type_traits supports
+ //rvalue refs!
+ , mpl::not_<is_rref<TestType> >
+ >,
+ mpl::eval_if<
+ is_rref<TestType>
+ , mpl::identity<cv_type&&>
+ , detail::add_lref<cv_type>
+ >,
+ mpl::identity<cv_type>
+ >::type
+ type;
+#endif
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/result_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/result_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,219 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_RESULT_OF_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_RESULT_OF_HPP
+
+//cschmidt: fusion might call result_of on class types without an operator().
+//Therefore we emulate the old behavior if (and only if) the boost
+//implementation falls back to decltype by default.
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/utility/result_of.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+# include <boost/mpl/if.hpp>
+#else
+# include <boost/mpl/eval_if.hpp>
+# include <boost/mpl/has_xxx.hpp>
+#endif
+
+namespace boost { namespace fusion { namespace detail
+{
+//cschmidt: a pp implementation won't be worth the effort
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+ template<typename FRef>
+ struct is_preevaluable
+ : mpl::false_
+ {};
+
+ template<typename FRef>
+ struct preevaluate;
+#else
+ //cschmidt: These metafunction needs to handle
+ //T()
+ //T(&)()
+ //T(cv&)()
+ //T(*)()
+ //T(*cv)()
+ //T(*cv&)()
+ //T(C::*)()
+ //T(C::*cv)()
+ //T(C::*&)()
+ //T(C::*cv&)()
+ //T(C::*)()cv
+ //T(C::*cv)()cv
+ //T(C::*&)()cv
+ //T(C::*cv&)()cv
+ //T(C::*)()cv&
+ //T(C::*cv)()cv&
+ //T(C::*&)()cv&
+ //T(C::*cv&)()cv&
+ //& -> &&
+
+ template<typename FRef>
+ struct is_preevaluable
+ {
+ typedef typename
+ remove_pointer<
+ typename detail::identity<FRef>::type
+ >::type
+ f;
+
+ typedef
+ mpl::or_<
+ typename is_function<f>::type
+ , typename is_member_function_pointer<f>::type
+ >
+ type;
+ };
+
+ template<typename FRef>
+ struct preevaluate_impl;
+
+ template<typename Result,typename... Args>
+ struct preevaluate_impl<Result (Args...)>
+ {
+ typedef Result type;
+ };
+
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...)>
+ {
+ typedef Class& class_type;
+
+ typedef Result type;
+ };
+
+ //cschmidt: Once we get a macro to find out whether the compiler
+ //supports rvalue references for this, use
+ //BOOST_FUSION_ALL_CV_REF_COMBINATIONS
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...) const>
+ {
+ typedef Class const& class_type;
+
+ typedef Result type;
+ };
+
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...) const volatile>
+ {
+ typedef Class const volatile& class_type;
+
+ typedef Result type;
+ };
+
+ template<typename Result,typename Class,typename... Args>
+ struct preevaluate_impl<Result(Class::*)(Args...) volatile>
+ {
+ typedef Class volatile& class_type;
+
+ typedef Result type;
+ };
+
+ template<typename FRef>
+ struct preevaluate
+ : preevaluate_impl<
+ typename remove_pointer<
+ typename detail::identity<FRef>::type
+ >::type
+ >
+ {};
+#endif
+
+#if defined(BOOST_NO_DECLTYPE) || defined(BOOST_NO_VARIADIC_TEMPLATES) || defined(BOOST_FUSION_CPP0X_NO_DEPRECEATED)
+ namespace internal
+ {
+ using boost::result_of;
+ }
+
+ //cschmidt: The non-decltype result_of does not like ref-qualified
+ //'class type' functions
+ template<typename FRef>
+ struct get_func_base
+ {
+ typedef typename
+ remove_pointer<
+ typename detail::identity<FRef>::type
+ >::type
+ f;
+
+ typedef typename
+ mpl::if_<
+ mpl::or_<
+ typename is_function<f>::type
+ , typename is_member_function_pointer<f>::type
+ >
+ , FRef
+ , f
+ >::type
+ type;
+ };
+#else
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type)
+
+ template<typename IdentityF>
+ struct get_result_type
+ {
+ typedef typename IdentityF::result_type type;
+ };
+
+ template<typename IdentityF, typename Sig>
+ struct get_result
+ : IdentityF::template result<Sig>
+ {};
+
+ template<typename IdentityF,typename F,typename... Args>
+ struct result_of_class_type
+ {
+ typedef typename
+ mpl::eval_if<
+ detail::has_result_type<IdentityF>
+ , detail::get_result_type<IdentityF>
+ //TODO cschmidt: fallback to boost::result_of (decltype) if
+ //'F::template result' does not exist.
+ //Is this even possible?
+ , detail::get_result<IdentityF,F(Args...)>
+ >::type
+ type;
+ };
+
+ namespace internal
+ {
+ template<typename Sig>
+ struct result_of
+ : boost::result_of<Sig>
+ {};
+
+ template<typename F, typename... Args>
+ struct result_of<F(Args...)>
+ {
+ typedef typename detail::identity<F>::type f;
+
+ typedef typename
+ mpl::eval_if<
+ is_function<f>
+ , boost::result_of<F(Args...)>
+ , result_of_class_type<f,F,Args...>
+ >::type
+ type;
+ };
+ }
+
+ template<typename FRef>
+ struct get_func_base
+ {
+ typedef FRef type;
+ };
+#endif
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/sequence_assign.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/sequence_assign.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_SEQUENCE_ASSIGN_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_SEQUENCE_ASSIGN_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename Seq>
+ struct sequence_assign_type
+ {
+ typedef Seq seq_type;
+
+ sequence_assign_type(Seq seq)
+ : seq(seq)
+ {}
+
+ Seq get()const
+ {
+ return seq;
+ }
+
+ private:
+ Seq seq;
+ };
+ }
+
+ template<typename Seq>
+ detail::sequence_assign_type<BOOST_FUSION_R_ELSE_CLREF(Seq)>
+ sequence_assign(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ return seq;
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/template.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/template.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_TEMPLATE_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_TEMPLATE_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/support/internal/ref.hpp>
+
+# include <boost/preprocessor/expand.hpp>
+# include <boost/preprocessor/empty.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/control/if.hpp>
+# include <boost/preprocessor/facilities/intercept.hpp>
+# include <boost/preprocessor/comparison/equal.hpp>
+# include <boost/preprocessor/arithmetic/sub.hpp>
+# include <boost/preprocessor/repetition/enum.hpp>
+# include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
+# include <boost/preprocessor/repetition/enum_params.hpp>
+# include <boost/preprocessor/repetition/enum_binary_params.hpp>
+# include <boost/call_traits.hpp>
+#endif
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# define DUMMY1(_)
+# define DUMMY2(_,__)
+
+ //cschmidt: for clarity’s sake no linebreaks
+# define VARIADIC_TEMPLATE(N) template<BOOST_PP_ENUM_PARAMS(N, typename T)>
+# define VARIADIC_TEMPLATE_WITH_DEFAULT(N) template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(N, typename T, void_)>
+# define EXPAND_TEMPLATE_ARGUMENTS(N) BOOST_PP_ENUM_PARAMS(N, T)
+# ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+# define EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION_IMPL(MAX,N)<EXPAND_TEMPLATE_ARGUMENTS(N), BOOST_PP_ENUM_PARAMS(BOOST_PP_SUB(MAX,N), void_)>
+# else
+# define EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION_IMPL(MAX,N)<EXPAND_TEMPLATE_ARGUMENTS(N)>
+# endif
+# define EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION(MAX,N)BOOST_PP_IF(BOOST_PP_EQUAL(MAX,N),DUMMY2,EXPAND_TEMPLATE_ARGUMENTS_SPECIALIZATION_IMPL)(MAX,N)
+# define EXPAND_TEMPLATE_ARGUMENTS_BINARY(N,PRE,POST)BOOST_PP_ENUM_BINARY_PARAMS(N, PRE T, POST BOOST_PP_INTERCEPT)
+# define EXPAND_TEMPLATE_ARGUMENTS_CALL_PARAMS(N)BOOST_PP_ENUM_BINARY_PARAMS(N, typename call_traits<T, >::param_type _)
+# define EXPAND_PARAMETERS(N) BOOST_PP_ENUM_PARAMS(N, _)
+
+# define VARIADIC_TEMPLATE_A_IMPL(N) template<BOOST_PP_ENUM_PARAMS(N, typename A)>
+# define VARIADIC_TEMPLATE_A(N) BOOST_PP_IF(N,VARIADIC_TEMPLATE_A_IMPL,DUMMY1)(N)
+# define EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_LREF(N)BOOST_PP_ENUM_BINARY_PARAMS(N, A, BOOST_FUSION_R_ELSE_LREF(BOOST_PP_EMPTY()) BOOST_PP_INTERCEPT)
+# define EXPAND_TEMPLATE_ARGUMENTS_A_R_ELSE_CLREF(N)BOOST_PP_ENUM_BINARY_PARAMS(N, A,BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()) BOOST_PP_INTERCEPT)
+# define EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_LREF(N)BOOST_PP_ENUM_BINARY_PARAMS(N, A, BOOST_FUSION_R_ELSE_LREF(BOOST_PP_EMPTY()) _)
+# define EXPAND_TEMPLATE_ARGUMENTS_PARAMETERS_A_R_ELSE_CLREF(N)BOOST_PP_ENUM_BINARY_PARAMS(N, A,BOOST_FUSION_R_ELSE_CLREF(BOOST_PP_EMPTY()) _)
+# define EXPAND_PARAMETERS_A_IMPL(Z,N,__) BOOST_FUSION_FORWARD(BOOST_PP_CAT(A,N),BOOST_PP_CAT(_,N))
+# define EXPAND_PARAMETERS_A(N) BOOST_PP_ENUM(N,EXPAND_PARAMETERS_A_IMPL,_)
+
+namespace boost { namespace fusion
+{
+ struct void_;
+}}
+#else
+# define VARIADIC_TEMPLATE_WITH_DEFAULT(MAX) template<typename... Arguments>
+# define VARIADIC_TEMPLATE(MAX) template<typename... Arguments>
+# define EXPAND_TEMPLATE_ARGUMENTS(MAX) Arguments...
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_n.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_n.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+ template<BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PP_ITERATION(), typename T)>
+ struct variadic_arguments_to_vector<
+ BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PP_ITERATION(), T)
+ >
+ {
+ public:
+ typedef
+ mpl::BOOST_PP_CAT(vector,BOOST_PP_ITERATION())<
+ BOOST_PP_ENUM_PARAMS_Z(1, BOOST_PP_ITERATION(), T)
+ >
+ type;
+ };

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_arguments_to_vector.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_VARIADIC_TEMPLATES_VARIADIC_ARGUMENTS_TO_VECTOR_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_VARIADIC_TEMPLATES_VARIADIC_ARGUMENTS_TO_VECTOR_HPP
+
+//cschmdit: workaround to get variadic template arguments into a fixed-length
+//template argument list. We definitely need a boost config macro for this issue
+//though.
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/iteration/iterate.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+
+#include <boost/mpl/vector/vector10.hpp>
+#include <boost/mpl/vector/vector20.hpp>
+#include <boost/mpl/vector/vector30.hpp>
+#include <boost/mpl/vector/vector40.hpp>
+#include <boost/mpl/vector/vector50.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename...>
+ struct variadic_arguments_to_vector;
+
+#define BOOST_PP_ITERATION_PARAMS_1\
+ (3, (0, 50, <boost/fusion/support/internal/variadic_templates/detail/variadic_arguments_to_vector_n.hpp>))
+#include BOOST_PP_ITERATE()
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_quote.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/internal/variadic_templates/variadic_quote.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_INTERNAL_VARIADIC_TEMPLATES_VARIADIC_QUOTE_HPP
+#define BOOST_FUSION_SUPPORT_INTERNAL_VARIADIC_TEMPLATES_VARIADIC_QUOTE_HPP
+
+//TODO cschmidt: Are there any compiler that support variadic templates but
+//BOOST_MPL_CFG_NO_HAS_XXX ?!
+
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(type)
+
+ template<template<typename...> class Type>
+ struct variadic_quote
+ {
+ private:
+ template<typename ConcreteType,bool/* HasType*/>
+ struct apply_impl
+ {
+ typedef ConcreteType type;
+ };
+
+ template<typename ConcreteType>
+ struct apply_impl<ConcreteType,true>
+ : ConcreteType
+ {};
+
+ public:
+ template<typename... Argument>
+ struct apply
+ : apply_impl<
+ Type<Argument...>
+ , has_type<Type<Argument...> >::type::value
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/is_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/is_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_IS_ITERATOR_HPP
+#define BOOST_FUSION_SUPPORT_IS_ITERATOR_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+
+#include <boost/type_traits/is_base_of.hpp>
+
+//TODO doc!!!
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_iterator_impl
+ {
+ template <typename T>
+ struct apply
+ : is_base_of<iterator_root, typename detail::identity<T>::type>
+ {};
+ };
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_iterator
+ : extension::is_iterator_impl<
+ typename fusion::traits::tag_of<T>::type
+ >::template apply<typename detail::add_lref<T>::type>::type
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/is_sequence.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/is_sequence.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_IS_SEQUENCE_HPP
+#define BOOST_FUSION_SUPPORT_IS_SEQUENCE_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+
+#include <boost/type_traits/is_base_of.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template <typename Tag>
+ struct is_sequence_impl
+ {
+ template <typename SeqRef>
+ struct apply
+ : is_base_of<
+ sequence_root
+ , typename detail::identity<SeqRef>::type
+ >
+ {};
+ };
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_sequence
+ : extension::is_sequence_impl<typename traits::tag_of<T>::type>::
+ template apply<typename detail::add_lref<T>::type>
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/is_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/is_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_IS_VIEW_HPP
+#define BOOST_FUSION_SUPPORT_IS_VIEW_HPP
+
+#include <boost/fusion/support/tag_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl
+ {
+ template <typename SeqRef>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::is_view
+ {};
+ };
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_view
+ : extension::is_view_impl<typename fusion::traits::tag_of<T>::type>::
+ template apply<typename detail::add_lref<T>::type>::type
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/iterator_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/iterator_base.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,34 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_ITERATOR_BASE_HPP
+#define BOOST_FUSION_SUPPORT_ITERATOR_BASE_HPP
+
+namespace boost { namespace fusion
+{
+ struct iterator_root
+ {};
+
+ template <typename It>
+ struct iterator_base
+ : iterator_root
+ {
+ It&
+ cast()
+ {
+ return static_cast<It&>(*this);
+ }
+
+ It const&
+ cast() const
+ {
+ return static_cast<It const&>(*this);
+ }
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/pair.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/pair.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,152 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2006 Tobias Schwinger
+
+ 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_FUSION_SUPPORT_PAIR_HPP
+#define BOOST_FUSION_SUPPORT_PAIR_HPP
+
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+#if defined(BOOST_NO_VARIADIC_TEMPLATES) && defined(BOOST_NO_RVALUE_REFERENCES)
+# include <boost/call_traits.hpp>
+#endif
+
+namespace boost { namespace fusion
+{
+ // A half runtime pair where the first type does not have data
+ template <typename First, typename Second>
+ struct pair
+ {
+ pair()
+ : second()
+ {}
+
+#define BOOST_FUSION_PAIR_CTOR(COMBINATION,_)\
+ template<typename OtherFirst,typename OtherSecond>\
+ pair(pair<OtherFirst,OtherSecond> COMBINATION pair_)\
+ : second(static_cast<pair<OtherFirst,OtherSecond> COMBINATION>(pair_)\
+ .second)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_PAIR_CTOR,_)
+
+#undef BOOST_FUSION_PAIR_CTOR
+
+
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# ifdef BOOST_NO_RVALUE_REFERENCES
+ pair(typename call_traits<Second>::param_type second)
+ : second(second)
+ {}
+# else
+ template<typename Arg>
+ pair(Arg&& arg)
+ : second(std::forward<Arg>(arg))
+ {}
+# endif
+#else
+ template<typename Arg1,typename... Args>
+ pair(Arg1&& arg1, Args&&... args)
+ : second(std::forward<Arg1>(arg1),std::forward<Args>(args)...)
+ {}
+#endif
+
+ template <typename Second2>
+ pair& operator=(pair<First, Second2> const& rhs)
+ {
+ second = rhs.second;
+ return *this;
+ }
+
+#ifndef BOOST_NO_RVALUE_REFERENCES
+ template <typename Second2>
+ pair& operator=(pair<First, Second2>&& rhs)
+ {
+ second = std::forward<Second2>(rhs.second);
+ return *this;
+ }
+#endif
+
+ typedef First first_type;
+ typedef Second second_type;
+ Second second;
+ };
+
+ namespace result_of
+ {
+ template<typename First, typename Second>
+ struct make_pair
+ {
+ typedef
+ fusion::pair<
+ First
+ , typename detail::as_fusion_element<Second>::type
+ >
+ type;
+ };
+
+ template<typename Pair>
+ struct first
+ {
+ typedef typename Pair::first_type type;
+ };
+
+ template<typename Pair>
+ struct second
+ {
+ typedef typename Pair::second_type type;
+ };
+ }
+
+ template <typename First, typename Second>
+ inline typename
+ result_of::make_pair<First,BOOST_FUSION_R_ELSE_CLREF(Second)>::type
+ make_pair(BOOST_FUSION_R_ELSE_CLREF(Second) val)
+ {
+ return typename result_of::
+ make_pair<First,BOOST_FUSION_R_ELSE_CLREF(Second)>::type(val);
+ }
+
+ template <typename OStream, typename First, typename Second>
+ inline BOOST_FUSION_R_ELSE_LREF(OStream)
+ operator<<(
+ BOOST_FUSION_R_ELSE_LREF(OStream) os,
+ pair<First, Second> const& p)
+ {
+ os << p.second;
+ return os;
+ }
+
+ template <typename IStream, typename First, typename Second>
+ inline BOOST_FUSION_R_ELSE_LREF(IStream)
+ operator>>(
+ BOOST_FUSION_R_ELSE_LREF(IStream) is
+#define BOOST_FUSION_ARG pair<First, Second>
+ , BOOST_FUSION_R_ELSE_LREF(BOOST_FUSION_ARG) p)
+ {
+ is >> BOOST_FUSION_FORWARD(BOOST_FUSION_ARG,p).second;
+#undef BOOST_FUSION_ARG
+ return is;
+ }
+
+ template <typename First, typename SecondL, typename SecondR>
+ inline bool
+ operator==(pair<First, SecondL> const& l, pair<First, SecondR> const& r)
+ {
+ return l.second == r.second;
+ }
+
+ template <typename First, typename SecondL, typename SecondR>
+ inline bool
+ operator!=(pair<First, SecondL> const& l, pair<First, SecondR> const& r)
+ {
+ return l.second != r.second;
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/sequence_base.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/sequence_base.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,52 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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_FUSION_SUPPORT_SEQUENCE_BASE_HPP
+#define BOOST_FUSION_SUPPORT_SEQUENCE_BASE_HPP
+
+#include <boost/mpl/begin_end_fwd.hpp>
+
+namespace boost
+{
+ namespace fusion
+ {
+ struct sequence_root
+ {};
+
+ template <typename Seq>
+ struct sequence_base
+ : sequence_root
+ {
+ Seq const&
+ derived() const
+ {
+ return static_cast<Seq const&>(*this);
+ }
+
+ Seq&
+ derived()
+ {
+ return static_cast<Seq&>(*this);
+ }
+ };
+
+ struct fusion_sequence_tag;
+ }
+
+ namespace mpl
+ {
+ // Deliberately break mpl::begin, so it doesn't lie that a Fusion
+ // sequence is not an MPL sequence by returning mpl::void_.
+ // In other words: Fusion Sequences are always MPL Sequences, but they
+ // can be incompletely defined.
+ template<>
+ struct begin_impl<fusion::fusion_sequence_tag>;
+ }
+}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/tag_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/tag_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,48 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_SUPPORT_TAG_OF_HPP
+#define BOOST_FUSION_SUPPORT_TAG_OF_HPP
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/has_xxx.hpp>
+
+namespace boost { namespace fusion
+{
+ struct non_fusion_tag;
+
+ namespace detail
+ {
+ BOOST_MPL_HAS_XXX_TRAIT_DEF(fusion_tag);
+
+ template<typename IdentityT>
+ struct get_fusion_tag
+ {
+ typedef typename IdentityT::fusion_tag type;
+ };
+ }
+
+ namespace traits
+ {
+ template <typename T, typename Dummy>
+ struct tag_of
+ {
+ typedef typename detail::identity<T>::type identity_t;
+
+ typedef typename
+ mpl::eval_if<
+ detail::has_fusion_tag<identity_t>
+ , detail::get_fusion_tag<identity_t>
+ , mpl::identity<non_fusion_tag>
+ >::type
+ type;
+ };
+ }
+}}
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/tag_of_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/tag_of_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_SUPPORT_TAG_OF_FWD_HPP
+#define BOOST_FUSION_SUPPORT_TAG_OF_FWD_HPP
+
+//cschmidt: only provided for backwards compatibility
+namespace boost { namespace fusion
+{
+ namespace traits
+ {
+ template<typename Seq, typename Dummy=void>
+ struct tag_of;
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/support/unused.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/support/unused.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_SUPPORT_UNUSED_HPP
+#define BOOST_FUSION_SUPPORT_UNUSED_HPP
+
+#include <boost/config.hpp>
+#if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable: 4522) // multiple assignment operators specified warning
+#endif
+
+namespace boost { namespace fusion {
+ struct unused_type
+ {
+ unused_type()
+ {
+ }
+
+ template <typename T>
+ unused_type(T const&)
+ {
+ }
+
+ template <typename T>
+ unused_type const&
+ operator=(T const&) const
+ {
+ return *this;
+ }
+
+ template <typename T>
+ unused_type&
+ operator=(T const&)
+ {
+ return *this;
+ }
+
+ unused_type const&
+ operator=(unused_type const&) const
+ {
+ return *this;
+ }
+
+ unused_type&
+ operator=(unused_type const&)
+ {
+ return *this;
+ }
+ };
+
+ unused_type const unused = unused_type();
+}}
+
+#if defined(BOOST_MSVC)
+# pragma warning(pop)
+#endif
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/tuple.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,15 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_TUPLE_HPP
+#define BOOST_FUSION_TUPLE_HPP
+
+#include <boost/fusion/tuple/make_tuple.hpp>
+#include <boost/fusion/tuple/tuple_fwd.hpp>
+#include <boost/fusion/tuple/tuple_tie.hpp>
+#include <boost/fusion/tuple/tuple.hpp>
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/tuple/make_tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/tuple/make_tuple.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,17 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_TUPLE_MAKE_TUPLE_HPP
+#define BOOST_FUSION_TUPLE_MAKE_TUPLE_HPP
+
+#include <boost/fusion/tuple/tuple.hpp>
+
+#define BOOST_FUSION_SEQ_NAME tuple
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/generation/detail/make_seq.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,97 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ 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_FUSION_TUPLE_TUPLE_HPP
+#define BOOST_FUSION_TUPLE_TUPLE_HPP
+
+#include <boost/fusion/tuple/tuple_fwd.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/intrinsic/at_c.hpp>
+#include <boost/fusion/sequence/comparison.hpp>
+#include <boost/fusion/sequence/io.hpp>
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/workaround.hpp>
+
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+
+namespace boost { namespace fusion
+{
+ VARIADIC_TEMPLATE(FUSION_MAX_VECTOR_SIZE)
+ struct tuple
+ : vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_VECTOR_SIZE)>
+ {
+ typedef
+ vector<EXPAND_TEMPLATE_ARGUMENTS(FUSION_MAX_VECTOR_SIZE)>
+ base_type;
+
+ tuple()
+ {}
+
+#define TUPLE_CTOR(COMBINATION,_)\
+ tuple(tuple COMBINATION tuple)\
+ : base_type(static_cast<base_type COMBINATION>(tuple))\
+ {}\
+ \
+ template <typename A1, typename A2>\
+ tuple(std::pair<A1, A2> COMBINATION pair)\
+ : base_type(sequence_assign(\
+ static_cast<std::pair<A1, A2> COMBINATION>(pair)))\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(TUPLE_CTOR,_)
+
+#undef TUPLE_CTOR
+
+#define BOOST_FUSION_USE_BASE_TYPE
+#define BOOST_FUSION_SEQ_NAME tuple
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/detail/forward_ctor.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+#undef BOOST_FUSION_USE_BASE_TYPE
+
+ template <typename Seq>
+ tuple&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(Seq) seq)
+ {
+ *static_cast<base_type*>(this) = BOOST_FUSION_FORWARD(Seq, seq);
+ return *this;
+ }
+ };
+
+ template <typename Tuple>
+ struct tuple_size
+ : result_of::size<Tuple>
+ {};
+
+ template <int N, typename Tuple>
+ struct tuple_element
+ : result_of::value_at_c<Tuple, N>
+ {};
+
+ template <int N, typename Tuple>
+ inline typename result_of::at_c<BOOST_FUSION_R_ELSE_CLREF(Tuple), N>::type
+ get(BOOST_FUSION_R_ELSE_CLREF(Tuple) tuple)
+ {
+ return at_c<N>(tuple);
+ }
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ template <int N, typename Tuple>
+ inline BOOST_FUSION_EXPLICIT_TEMPLATE_NON_CONST_ARG_OVERLOAD(
+ result_of::at_c<,Tuple,&, N>)
+ get(Tuple& tuple)
+ {
+ return at_c<N>(tuple);
+ }
+#endif
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+
+ 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_FUSION_TUPLE_TUPLE_FWD_HPP
+#define BOOST_FUSION_TUPLE_TUPLE_FWD_HPP
+
+#include <boost/fusion/container/vector/limits.hpp>
+#include <boost/fusion/support/internal/template.hpp>
+
+namespace boost { namespace fusion
+{
+ VARIADIC_TEMPLATE_WITH_DEFAULT(FUSION_MAX_VECTOR_SIZE)
+ struct tuple;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple_tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/tuple/tuple_tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_TUPLE_TUPLE_TIE_HPP
+#define BOOST_FUSION_TUPLE_TUPLE_TIE_HPP
+
+#include <boost/fusion/tuple/tuple.hpp>
+
+#define BOOST_FUSION_FUNCTION_NAME tie
+#define BOOST_FUSION_SEQ_NAME tuple
+#define BOOST_FUSION_MAX_SEQ_SIZE FUSION_MAX_VECTOR_SIZE
+#include <boost/fusion/container/generation/detail/seq_tie.hpp>
+#undef BOOST_FUSION_MAX_SEQ_SIZE
+#undef BOOST_FUSION_SEQ_NAME
+#undef BOOST_FUSION_FUNCTION_NAME
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_HPP
+#define BOOST_FUSION_VIEW_HPP
+
+#include <boost/fusion/view/filter_view.hpp>
+#include <boost/fusion/view/iterator_range.hpp>
+#include <boost/fusion/view/joint_view.hpp>
+#include <boost/fusion/view/reverse_view.hpp>
+#include <boost/fusion/view/single_view.hpp>
+#include <boost/fusion/view/transform_view.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/detail/strictest_traversal.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/detail/strictest_traversal.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,57 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_DETAIL_STRICTEST_TRAVERSAL_HPP
+#define BOOST_FUSION_VIEW_DETAIL_STRICTEST_TRAVERSAL_HPP
+
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct strictest_traversal_impl
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self, typename NextSeq, typename StrictestSoFar>
+ struct result<Self(NextSeq, StrictestSoFar)>
+ {
+ typedef typename traits::category_of<NextSeq>::type next_tag;
+ typedef typename
+ identity<StrictestSoFar>::type
+ strictest_so_far_identity;
+
+ typedef typename
+ mpl::if_<
+ is_base_of<strictest_so_far_identity,next_tag>
+ , strictest_so_far_identity
+ , next_tag
+ >::type
+ type;
+ };
+ };
+
+ template<typename Seq>
+ struct strictest_traversal
+ : result_of::fold<
+ Seq
+ , fusion::random_access_traversal_tag
+ , strictest_traversal_impl
+ >
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/detail/view_storage.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,122 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_DETAIL_VIEW_STORAGE_HPP
+#define BOOST_FUSION_VIEW_DETAIL_VIEW_STORAGE_HPP
+
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/utility/enable_if.hpp>
+
+namespace boost { namespace fusion { namespace detail
+{
+ template<typename T>
+ struct view_storage
+ {
+ private:
+ template<typename OtherT>
+ static BOOST_FUSION_R_ELSE_CLREF(OtherT)
+ get_init_type(BOOST_FUSION_R_ELSE_LREF(OtherT) other_t, mpl::true_)
+ {
+ return other_t;
+ }
+
+ template<typename OtherT>
+ static typename detail::remove_reference<OtherT>::type*
+ get_init_type(BOOST_FUSION_R_ELSE_LREF(OtherT) other_t, mpl::false_)
+ {
+ return &other_t;
+ }
+
+ public:
+ typedef typename
+ mpl::if_<
+ traits::is_view<T>
+ , typename detail::remove_reference<T>::type
+ , typename detail::add_lref<T>::type
+ >::type
+ type;
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ typedef typename
+ mpl::if_<
+ traits::is_view<T>
+ , typename detail::add_lref<typename add_const<T>::type>::type
+ , type
+ >::type
+ call_param;
+#endif
+
+#define BOOST_FUSION_VIEW_STORAGE_CTOR(COMBINATION,_)\
+ template<typename OtherT>\
+ view_storage(view_storage<OtherT> COMBINATION storage)\
+ : t(get_init_type(storage.get(), typename traits::is_view<T>::type()))\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_VIEW_STORAGE_CTOR,_)
+
+#undef BOOST_FUSION_VIEW_STORAGE_CTOR
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ view_storage(call_param t)
+ : t(get_init_type(t, typename traits::is_view<T>::type()))
+ {}
+#else
+ template<typename OtherT>
+ view_storage(OtherT&& t)
+ : t(get_init_type(
+ std::forward<OtherT>(t),
+ typename traits::is_view<T>::type()))
+ {}
+#endif
+
+ template<typename OtherViewStorage>
+ view_storage&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherViewStorage) other_storage)
+ {
+ t=BOOST_FUSION_FORWARD(OtherViewStorage,other_storage).t;
+ return *this;
+ }
+
+ typename mpl::if_<
+ traits::is_view<T>
+ , typename detail::add_lref<type>::type
+ , type
+ >::type
+ get() const
+ {
+ return get(typename traits::is_view<T>::type());
+ }
+
+ private:
+ typename detail::add_lref<type>::type
+ get(mpl::true_ /*is_view*/)const
+ {
+ return t;
+ }
+
+ type
+ get(mpl::false_ /*is_view*/)const
+ {
+ return *t;
+ }
+
+ typedef typename detail::remove_reference<T>::type non_ref_t;
+ mutable typename
+ mpl::if_<
+ traits::is_view<T>
+ , typename remove_const<non_ref_t>::type
+ , non_ref_t*
+ >::type
+ t;
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_HPP
+
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<filter_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef
+ filter_iterator<
+ typename result_of::begin<typename seq::seq_type>::type
+ , typename result_of::end<typename seq::seq_type>::type
+ , typename seq::pred_type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(fusion::begin(seq.seq.get()),0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/deref_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/deref_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,37 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_data_impl;
+
+ template <>
+ struct deref_data_impl<filter_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return deref_data(it.first);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<filter_view_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ >::type
+ type;
+
+ static type call(ItRef it)
+ {
+ return fusion::deref(it.first);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<filter_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef
+ filter_iterator<
+ typename result_of::end<typename seq::seq_type>::type
+ , typename result_of::end<typename seq::seq_type>::type
+ , typename seq::pred_type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(fusion::end(seq.seq.get()),0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<filter_view_iterator_tag>
+ {
+ template<typename It1Ref, typename It2Ref>
+ struct apply
+ : result_of::equal_to<
+ typename detail::remove_reference<It1Ref>::type::first_type
+ , typename detail::remove_reference<It2Ref>::type::first_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/filter_view_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/filter_view_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_FILTER_VIEW_DETAIL_FILTER_VIEW_FWD_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_FILTER_VIEW_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct filter_view_tag;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/filter_view_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/filter_view_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,67 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_FILTER_VIEW_ITERATOR_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_FILTER_VIEW_ITERATOR_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+
+#include <boost/mpl/quote.hpp>
+#include <boost/mpl/lambda.hpp>
+#include <boost/mpl/bind.hpp>
+#include <boost/mpl/placeholders.hpp>
+
+namespace boost { namespace fusion
+{
+ struct filter_view_iterator_tag;
+ struct forward_traversal_tag;
+
+ template <typename First, typename Last, typename Pred>
+ struct filter_iterator
+ : iterator_base<filter_iterator<First, Last, Pred> >
+ {
+ typedef Pred pred_type;
+ typedef
+ detail::static_find_if<
+ First
+ , Last
+ , mpl::bind1<
+ typename mpl::lambda<Pred>::type
+ , mpl::bind1<mpl::quote1<result_of::value_of>,mpl::_1>
+ >
+ >
+ filter;
+ typedef typename filter::type first_type;
+ typedef Last last_type;
+
+ typedef filter_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+
+ template<typename OtherIt>
+ filter_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ : first(BOOST_FUSION_FORWARD(OtherIt,it).first)
+ {}
+
+ filter_iterator(First const& first,int)
+ : first(filter::call(first))
+ {}
+
+ template<typename OtherIt>
+ filter_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ {
+ first=BOOST_FUSION_FORWARD(OtherIt,it).first;
+ return *this;
+ }
+
+ first_type first;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/key_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/key_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <>
+ struct key_of_impl<filter_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::key_of<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,56 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_NEXT_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_NEXT_IMPL_HPP
+
+#include <boost/fusion/algorithm/query/detail/find_if.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<filter_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+ typedef typename
+ detail::static_find_if<
+ typename result_of::next<typename it::first_type>::type
+ , typename it::last_type
+ , mpl::bind1<
+ typename mpl::lambda<typename it::pred_type>::type
+ , mpl::bind1<mpl::quote1<result_of::value_of>,mpl::_1>
+ >
+ >
+ filter;
+
+ typedef
+ filter_iterator<
+ typename filter::type
+ , typename it::last_type
+ , typename it::pred_type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(filter::call(it.first),0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/size_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/size_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_SIZE_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_SIZE_IMPL_HPP
+
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct size_impl;
+
+ template <>
+ struct size_impl<filter_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ : result_of::distance<
+ typename result_of::begin<SeqRef>::type
+ , typename result_of::end<SeqRef>::type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/value_of_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <>
+ struct value_of_data_impl<filter_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::value_of_data<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<filter_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::value_of<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/filter_view/filter_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,99 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_FILTER_VIEW_FILTER_VIEW_HPP
+#define BOOST_FUSION_VIEW_FILTER_VIEW_FILTER_VIEW_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/fusion/view/filter_view/detail/filter_view_fwd.hpp>
+#include <boost/fusion/view/filter_view/detail/size_impl.hpp>
+
+#include <boost/fusion/view/filter_view/detail/filter_view_iterator.hpp>
+#include <boost/fusion/view/filter_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/end_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/next_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/equal_to_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/deref_data_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/key_of_impl.hpp>
+#include <boost/fusion/view/filter_view/detail/value_of_data_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ template <typename Seq, typename Pred>
+ struct filter_view
+ : sequence_base<filter_view<Seq, Pred> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef detail::view_storage<Seq> storage_type;
+ typedef typename storage_type::type seq_type;
+ typedef Pred pred_type;
+
+ typedef typename
+ mpl::eval_if<
+ traits::is_associative<seq_type>
+ , mpl::inherit2<forward_traversal_tag,associative_sequence_tag>
+ , mpl::identity<forward_traversal_tag>
+ >::type
+ category;
+ typedef filter_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+
+#define BOOST_FUSION_FILTER_VIEW_CTOR(COMBINATION,_)\
+ template<typename OtherSeq>\
+ filter_view(filter_view<OtherSeq, Pred> COMBINATION view)\
+ : seq(static_cast<filter_view<OtherSeq, Pred> COMBINATION>(view).seq)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_FILTER_VIEW_CTOR,_)
+
+#undef BOOST_FUSION_FILTER_VIEW_CTOR
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ explicit
+ filter_view(typename storage_type::call_param seq)
+ : seq(seq)
+ {}
+#else
+ template<typename OtherSeq>
+ explicit
+ filter_view(BOOST_FUSION_R_ELSE_CLREF(OtherSeq) seq)
+ : seq(BOOST_FUSION_FORWARD(OtherSeq,seq))
+ {}
+#endif
+
+ template<typename OtherFilterView>
+ filter_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherFilterView) other_view)
+ {
+ seq=BOOST_FUSION_FORWARD(OtherFilterView,other_view).seq;
+ return *this;
+ }
+
+ storage_type seq;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_ITERATOR_RANGE_HPP
+#define BOOST_FUSION_VIEW_ITERATOR_RANGE_HPP
+
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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_FUSION_VIEW_ITERATOR_RANGE_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_ITERATOR_RANGE_DETAIL_AT_IMPL_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct at_impl;
+
+ template <>
+ struct at_impl<iterator_range_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<SeqRef>::type::begin_type
+ begin_type;
+ typedef typename result_of::advance<begin_type,N>::type pos;
+ typedef typename result_of::deref<pos>::type type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return fusion::deref(advance<N>(seq.first));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_ITERATOR_RANGE_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_VIEW_ITERATOR_RANGE_DETAIL_BEGIN_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<iterator_range_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<SeqRef>::type::begin_type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return seq.first;
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_ITERATOR_RANGE_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_VIEW_ITERATOR_RANGE_DETAIL_END_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<iterator_range_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<SeqRef>::type::end_type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return seq.last;
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/iterator_range_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/iterator_range_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_ITERATOR_RANGE_DETAIL_ITERATOR_RANGE_FWD_HPP
+#define BOOST_FUSION_VIEW_ITERATOR_RANGE_DETAIL_ITERATOR_RANGE_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/detail/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,37 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ 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_FUSION_VIEW_ITERATOR_RANGE_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_ITERATOR_RANGE_DETAIL_VALUE_AT_IMPL_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<iterator_range_tag>
+ {
+ template <typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<SeqRef>::type::begin_type
+ begin_type;
+ typedef typename
+ result_of::advance<begin_type,N>::type
+ pos;
+
+ typedef typename result_of::value_of<pos>::type type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/iterator_range.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/iterator_range/iterator_range.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_ITERATOR_RANGE_ITERATOR_RANGE_HPP
+#define BOOST_FUSION_VIEW_ITERATOR_RANGE_ITERATOR_RANGE_HPP
+
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/type_traits/is_same.hpp>
+#endif
+
+#include <boost/fusion/view/iterator_range/detail/iterator_range_fwd.hpp>
+#include <boost/fusion/view/iterator_range/detail/begin_impl.hpp>
+#include <boost/fusion/view/iterator_range/detail/end_impl.hpp>
+#include <boost/fusion/view/iterator_range/detail/at_impl.hpp>
+#include <boost/fusion/view/iterator_range/detail/value_at_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct iterator_range_tag;
+ struct fusion_sequence_tag;
+
+ template <typename First, typename Last>
+ struct iterator_range
+ : sequence_base<iterator_range<First, Last> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<First>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<First>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_iterator<Last>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Last>));
+
+ typedef First begin_type;
+ typedef Last end_type;
+
+ typedef typename traits::category_of<First>::type category;
+ typedef typename result_of::distance<begin_type, end_type>::type size;
+ typedef iterator_range_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+
+ template<typename OtherIteratorRange>
+ iterator_range(BOOST_FUSION_R_ELSE_CLREF(OtherIteratorRange) range)
+ : first(range.first)
+ , last(range.last)
+ {}
+
+ iterator_range(First const& first, Last const& last)
+ : first(first)
+ , last(last)
+ {}
+
+ template<typename OtherIteratorRange>
+ iterator_range&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIteratorRange) other_range)
+ {
+ first=other_range.first;
+ last=other_range.last;
+ return *this;
+ }
+
+ begin_type first;
+ end_type last;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_HPP
+
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,73 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<joint_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+ typedef typename
+ result_of::begin<typename seq::seq1_type>::type
+ first_type;
+ typedef typename
+ result_of::end<typename seq::seq1_type>::type
+ last_type;
+ typedef typename
+ result_of::begin<typename seq::seq2_type>::type
+ concat_type;
+ typedef typename
+ result_of::equal_to<first_type, last_type>::type
+ equal_to;
+
+ typedef typename
+ mpl::if_<
+ equal_to
+ , concat_iterator<concat_type>
+ , joint_view_iterator<first_type, last_type, concat_type>
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq, mpl::true_)
+ {
+ return type(fusion::begin(seq.seq2.get()));
+ }
+
+ static type
+ call(SeqRef seq, mpl::false_)
+ {
+ return type(
+ fusion::begin(seq.seq1.get())
+ , fusion::begin(seq.seq2.get()));
+ }
+
+ static type
+ call(SeqRef seq)
+ {
+ return call(seq, equal_to());
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,42 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_data_impl;
+
+ template <>
+ struct deref_data_impl<joint_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return deref_data(it.first);
+ }
+ };
+ };
+
+ template <>
+ struct deref_data_impl<concat_iterator_tag>
+ : deref_data_impl<joint_view_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/iterator/deref.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<joint_view_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return fusion::deref(it.first);
+ }
+ };
+ };
+
+ template <>
+ struct deref_impl<concat_iterator_tag>
+ : deref_impl<joint_view_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<joint_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ concat_iterator<
+ typename result_of::end<
+ typename detail::remove_reference<
+ SeqRef
+ >::type::seq2_type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(fusion::end(seq.seq2.get()));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_JOINT_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+
+#include <boost/mpl/and.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename It1, typename It2>
+ struct same_joint_view_iterator
+ : result_of::equal_to<
+ typename It1::first_type
+ , typename It2::first_type
+ >
+ {
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<joint_view_iterator_tag>
+ {
+ template<typename It1Ref, typename It2Ref>
+ struct apply
+ {
+ typedef typename detail::remove_reference<It1Ref>::type it1;
+ typedef typename detail::remove_reference<It2Ref>::type it2;
+
+ typedef
+ mpl::and_<
+ is_same<
+ typename it1::fusion_tag
+ , typename it2::fusion_tag
+ >
+ , detail::same_joint_view_iterator<it1,it2>
+ >
+ type;
+ };
+ };
+
+ template <>
+ struct equal_to_impl<concat_iterator_tag>
+ : equal_to_impl<joint_view_iterator_tag>
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/joint_view_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/joint_view_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_JOINT_VIEW_DETAIL_JOINT_VIEW_FWD_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_JOINT_VIEW_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct joint_view_tag;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/joint_view_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/joint_view_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,58 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_DETAIL_JOINT_VIEW_ITERATOR_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_JOINT_VIEW_ITERATOR_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+
+namespace boost { namespace fusion
+{
+ struct joint_view_iterator_tag;
+ struct concat_iterator_tag;
+ struct forward_traversal_tag;
+
+ template <typename First, typename Last, typename Concat>
+ struct joint_view_iterator
+ : iterator_base<joint_view_iterator<First, Last, Concat> >
+ {
+ typedef joint_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+
+ typedef First first_type;
+ typedef Last last_type;
+ typedef Concat concat_type;
+
+ joint_view_iterator(First const& first, Concat const& concat)
+ : first(first)
+ , concat(concat)
+ {}
+
+ first_type first;
+ concat_type concat;
+ };
+
+ template <typename First>
+ struct concat_iterator
+ : iterator_base<concat_iterator<First> >
+ {
+ typedef First first_type;
+
+ typedef concat_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+
+ explicit
+ concat_iterator(First const& first)
+ : first(first)
+ {}
+
+ first_type first;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/key_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/key_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_JOINT_VIEW_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <>
+ struct key_of_impl<joint_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::key_of<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+
+ template <>
+ struct key_of_impl<concat_iterator_tag>
+ : key_of_impl<joint_view_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,89 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_DETAIL_NEXT_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_NEXT_IMPL_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/mpl/if.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<joint_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename it::first_type first_type;
+ typedef typename it::last_type last_type;
+ typedef typename it::concat_type concat_type;
+ typedef typename result_of::next<first_type>::type next_type;
+ typedef typename
+ result_of::equal_to<next_type, last_type>::type
+ equal_to;
+
+ typedef typename
+ mpl::if_<
+ equal_to
+ , concat_iterator<concat_type>
+ , joint_view_iterator<next_type, last_type, concat_type>
+ >::type
+ type;
+
+ static type
+ call(ItRef it, mpl::true_)
+ {
+ return type(it.concat);
+ }
+
+ static type
+ call(ItRef it, mpl::false_)
+ {
+ return type(fusion::next(it.first), it.concat);
+ }
+
+ static type
+ call(ItRef it)
+ {
+ return call(it, equal_to());
+ }
+ };
+ };
+
+ template <>
+ struct next_impl<concat_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef
+ concat_iterator<
+ typename result_of::next<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ >::type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(fusion::next(it.first));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <>
+ struct value_of_data_impl<joint_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::value_of_data<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+
+ template <>
+ struct value_of_data_impl<concat_iterator_tag>
+ : value_of_data_impl<joint_view_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<joint_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::value_of<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+
+ template <>
+ struct value_of_impl<concat_iterator_tag>
+ : value_of_impl<joint_view_iterator_tag>
+ {};
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/joint_view/joint_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,114 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_JOINT_VIEW_JOINT_VIEW_HPP
+#define BOOST_FUSION_VIEW_JOINT_VIEW_JOINT_VIEW_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/and.hpp>
+
+#include <boost/fusion/view/joint_view/detail/joint_view_fwd.hpp>
+#include <boost/fusion/view/joint_view/detail/joint_view_iterator.hpp>
+#include <boost/fusion/view/joint_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/end_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/equal_to_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/next_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/deref_data_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/key_of_impl.hpp>
+#include <boost/fusion/view/joint_view/detail/value_of_data_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+
+ template <typename Seq1, typename Seq2>
+ struct joint_view
+ : sequence_base<joint_view<Seq1, Seq2> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+
+ typedef detail::view_storage<Seq1> storage1_type;
+ typedef typename storage1_type::type seq1_type;
+ typedef detail::view_storage<Seq2> storage2_type;
+ typedef typename storage2_type::type seq2_type;
+
+ typedef typename
+ mpl::eval_if<
+ mpl::and_<
+ traits::is_associative<seq1_type>
+ , traits::is_associative<seq2_type>
+ >
+ , mpl::inherit2<forward_traversal_tag,associative_sequence_tag>
+ , mpl::identity<forward_traversal_tag>
+ >::type
+ category;
+ typedef joint_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+
+ typedef typename
+ mpl::plus<
+ result_of::size<seq1_type>
+ , result_of::size<seq2_type>
+ >::type
+ size;
+
+ template<typename OtherJointView>
+ joint_view(BOOST_FUSION_R_ELSE_CLREF(OtherJointView) view)
+ : seq1(BOOST_FUSION_FORWARD(OtherJointView,view).seq1)
+ , seq2(BOOST_FUSION_FORWARD(OtherJointView,view).seq2)
+ {}
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ joint_view(typename storage1_type::call_param seq1,
+ typename storage2_type::call_param seq2)
+ : seq1(seq1)
+ , seq2(seq2)
+ {}
+#else
+ template<typename OtherSeq1, typename OtherSeq2>
+ joint_view(BOOST_FUSION_R_ELSE_CLREF(OtherSeq1) seq1,
+ BOOST_FUSION_R_ELSE_CLREF(OtherSeq2) seq2)
+ : seq1(BOOST_FUSION_FORWARD(OtherSeq1,seq1))
+ , seq2(BOOST_FUSION_FORWARD(OtherSeq2,seq2))
+ {}
+#endif
+
+ template<typename OtherJointView>
+ joint_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherJointView) other_view)
+ {
+ seq1=BOOST_FUSION_FORWARD(OtherJointView,other_view).seq1;
+ seq2=BOOST_FUSION_FORWARD(OtherJointView,other_view).seq2;
+ return *this;
+ }
+
+ storage1_type seq1;
+ storage2_type seq2;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_HPP
+
+#include <boost/fusion/view/reverse_view/reverse_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/advance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/advance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,48 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_ADVANCE_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_ADVANCE_IMPL_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/mpl/negate.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct advance_impl;
+
+ template<>
+ struct advance_impl<reverse_view_iterator_tag>
+ {
+ template<typename ItRef, typename Dist>
+ struct apply
+ {
+ typedef typename mpl::negate<Dist>::type neg_dist;
+
+ typedef
+ reverse_view_iterator<
+ typename result_of::advance<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ , neg_dist
+ >::type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(boost::fusion::advance<neg_dist>(it.first));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<reverse_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ reverse_view_iterator<
+ typename result_of::end<
+ typename detail::remove_reference<
+ SeqRef
+ >::type::seq_type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(fusion::end(seq.seq.get()));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,37 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/deref_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_data_impl;
+
+ template <>
+ struct deref_data_impl<reverse_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::deref_data<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return deref_data(it.first);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<reverse_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::deref<
+ typename result_of::prior<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ >::type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return fusion::deref(fusion::prior(it.first));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/distance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/distance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,39 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_DISTANCE_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DISTANCE_IMPL_HPP
+
+#include <boost/fusion/iterator/distance.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct distance_impl;
+
+ template<>
+ struct distance_impl<reverse_view_iterator_tag>
+ {
+ template<typename FirstRef, typename LastRef>
+ struct apply
+ {
+ typedef typename
+ result_of::distance<
+ typename detail::remove_reference<
+ FirstRef
+ >::type::first_type
+ , typename detail::remove_reference<
+ LastRef
+ >::type::first_type
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<reverse_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef
+ reverse_view_iterator<
+ typename result_of::begin<
+ typename detail::remove_reference<
+ SeqRef
+ >::type::seq_type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(fusion::begin(seq.seq.get()));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,32 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<reverse_view_iterator_tag>
+ {
+ template<typename It1Ref, typename It2Ref>
+ struct apply
+ : is_same<
+ typename detail::remove_reference<It1Ref>::type::first_type
+ , typename detail::remove_reference<It2Ref>::type::first_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/key_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/key_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_KEY_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/key_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct key_of_impl;
+
+ template <>
+ struct key_of_impl<reverse_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::key_of<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_NEXT_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_NEXT_IMPL_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <>
+ struct next_impl<reverse_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef
+ reverse_view_iterator<
+ typename result_of::prior<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ >::type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(fusion::prior(it.first));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/prior_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/prior_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_PRIOR_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_PRIOR_IMPL_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <>
+ struct prior_impl<reverse_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef
+ reverse_view_iterator<
+ typename result_of::next<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ >::type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(next(it.first));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_REVERSE_VIEW_FWD_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_REVERSE_VIEW_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_tag;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_REVERSE_VIEW_ITERATOR_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_REVERSE_VIEW_ITERATOR_HPP
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+namespace boost { namespace fusion
+{
+ struct reverse_view_iterator_tag;
+
+ template <typename First>
+ struct reverse_view_iterator
+ : iterator_base<reverse_view_iterator<First> >
+ {
+ typedef First first_type;
+
+ typedef reverse_view_iterator_tag fusion_tag;
+ typedef typename traits::category_of<first_type>::type category;
+
+ reverse_view_iterator(First const& first)
+ : first(first)
+ {}
+
+ first_type first;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_DATA_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of_data.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_data_impl;
+
+ template <>
+ struct value_of_data_impl<reverse_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ : result_of::value_of_data<
+ typename detail::remove_reference<ItRef>::type::first_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<reverse_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::value_of<
+ typename result_of::prior<
+ typename detail::remove_reference<
+ ItRef
+ >::type::first_type
+ >::type
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/reverse_view/reverse_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,104 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_REVERSE_VIEW_REVERSE_VIEW_HPP
+#define BOOST_FUSION_VIEW_REVERSE_VIEW_REVERSE_VIEW_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/fusion/view/reverse_view/detail/reverse_view_fwd.hpp>
+#include <boost/fusion/view/reverse_view/detail/reverse_view_iterator.hpp>
+#include <boost/fusion/view/reverse_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/end_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/next_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/prior_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/advance_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/distance_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/equal_to_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/deref_data_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/key_of_impl.hpp>
+#include <boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct fusion_sequence_tag;
+
+ template <typename Seq>
+ struct reverse_view
+ : sequence_base<reverse_view<Seq> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_bidirectional<Seq>));
+
+ typedef detail::view_storage<Seq> storage_type;
+ typedef typename storage_type::type seq_type;
+ typedef typename traits::category_of<seq_type>::type seq_category;
+
+ typedef typename
+ mpl::eval_if<
+ traits::is_associative<seq_type>
+ , mpl::inherit2<seq_category,associative_sequence_tag>
+ , mpl::identity<seq_category>
+ >::type
+ category;
+ typedef typename result_of::size<seq_type>::type size;
+ typedef reverse_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+
+#define BOOST_FUSION_REVERSE_VIEW_CTOR(COMBINATION,_)\
+ template<typename OtherSeq>\
+ reverse_view(reverse_view<OtherSeq> COMBINATION view)\
+ : seq(BOOST_FUSION_FORWARD(\
+ reverse_view<OtherSeq> COMBINATION,view).seq)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_REVERSE_VIEW_CTOR,_)
+
+#undef BOOST_FUSION_REVERSE_VIEW_CTOR
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ explicit
+ reverse_view(typename storage_type::call_param seq)
+ : seq(seq)
+ {}
+#else
+ template<typename OtherSeq>
+ explicit
+ reverse_view(OtherSeq&& seq)
+ : seq(std::forward<OtherSeq>(seq))
+ {}
+#endif
+
+ template<typename OtherReverseView>
+ reverse_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherReverseView) other_view)
+ {
+ seq=BOOST_FUSION_FORWARD(OtherReverseView,other_view).seq;
+ return *this;
+ }
+
+ detail::view_storage<Seq> seq;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_HPP
+
+#include <boost/fusion/view/single_view/single_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_BEGIN_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ template <>
+ struct begin_impl<single_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef single_view_iterator<SeqRef> type;
+
+ static type
+ call(SeqRef s)
+ {
+ return type(s,0);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,37 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ template <>
+ struct deref_impl<single_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<ItRef>::type::value_type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return it.view->val;
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_END_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ template <>
+ struct end_impl<single_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef single_view_iterator_end<SeqRef> type;
+
+ static type
+ call(SeqRef)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<single_view_iterator_tag>
+ {
+ template<typename It1Ref, typename It2Ref>
+ struct apply
+ : is_same<
+ typename detail::identity<
+ typename detail::remove_reference<
+ It1Ref
+ >::type::view_type
+ >::type
+ , typename detail::identity<
+ typename detail::remove_reference<
+ It2Ref
+ >::type::view_type
+ >::type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,39 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_NEXT_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_NEXT_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct next_impl;
+
+ template <>
+ struct next_impl<single_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef
+ single_view_iterator_end<
+ typename detail::remove_reference<
+ ItRef
+ >::type::view_type
+ >
+ type;
+
+ static type
+ call(ItRef)
+ {
+ return type();
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_SINGLE_VIEW_FWD_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_SINGLE_VIEW_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/single_view_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_SINGLE_VIEW_ITERATOR_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_SINGLE_VIEW_ITERATOR_HPP
+
+#include <boost/fusion/support/iterator_base.hpp>
+
+namespace boost { namespace fusion
+{
+ struct single_view_iterator_tag;
+ struct forward_traversal_tag;
+
+ struct void_;
+
+ template <typename SingleView>
+ struct single_view_iterator_end
+ : iterator_base<single_view_iterator_end<SingleView> >
+ {
+ typedef void_ view_type;
+
+ typedef single_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+ };
+
+ template <typename SingleViewRef>
+ struct single_view_iterator
+ : iterator_base<single_view_iterator<SingleViewRef> >
+ {
+ typedef SingleViewRef view_type;
+ typedef typename
+ detail::forward_as<
+ SingleViewRef,
+ typename detail::remove_reference<
+ SingleViewRef
+ >::type::value_type
+ >::type
+ value_type;
+
+ typedef single_view_iterator_tag fusion_tag;
+ typedef forward_traversal_tag category;
+
+ template<typename OtherIt>
+ single_view_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ : view(it.view)
+ {}
+
+ single_view_iterator(SingleViewRef view, int)
+ : view(&view)
+ {}
+
+ template<typename OtherIt>
+ single_view_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ {
+ view=it.view;
+ return *this;
+ }
+
+ typename detail::remove_reference<SingleViewRef>::type* view;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ template <>
+ struct value_of_impl<single_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<
+ typename detail::remove_reference<
+ ItRef
+ >::type::view_type
+ >::type::value_type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/single_view/single_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,136 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_SINGLE_VIEW_SINGLE_VIEW_HPP
+#define BOOST_FUSION_VIEW_SINGLE_VIEW_SINGLE_VIEW_HPP
+
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/fusion/sequence/intrinsic/size.hpp>
+#endif
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/sequence_assign.hpp>
+#include <boost/fusion/support/internal/as_fusion_element.hpp>
+
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/int.hpp>
+#ifdef BOOST_NO_RVALUE_REFERENCES
+# include <boost/call_traits.hpp>
+#endif
+
+#include <boost/fusion/view/single_view/detail/single_view_fwd.hpp>
+#include <boost/fusion/view/single_view/detail/single_view_iterator.hpp>
+#include <boost/fusion/view/single_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/single_view/detail/end_impl.hpp>
+#include <boost/fusion/view/single_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/single_view/detail/next_impl.hpp>
+#include <boost/fusion/view/single_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/single_view/detail/equal_to_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct single_view_tag;
+ struct forward_traversal_tag;
+ struct fusion_sequence_tag;
+
+ template <typename T>
+ struct single_view
+ : sequence_base<single_view<T> >
+ {
+ typedef T value_type;
+
+ typedef single_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef forward_traversal_tag category;
+ typedef mpl::true_ is_view;
+ typedef mpl::int_<1> size;
+
+ single_view()
+ : val()
+ {}
+
+#define BOOST_FUSION_SINGLE_VIEW_CTOR(COMBINATION,_)\
+ single_view(single_view COMBINATION view)\
+ : val(BOOST_FUSION_FORWARD(single_view COMBINATION,view).val)\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_SINGLE_VIEW_CTOR,_)
+
+#undef BOOST_FUSION_SINGLE_VIEW_CTOR
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ explicit
+ single_view(typename call_traits<T>::param_type val)
+ : val(val)
+ {}
+#else
+ template<typename OtherT>
+ explicit
+ single_view(OtherT&& val)
+ : val(std::forward<OtherT>(val))
+ {}
+#endif
+
+#define BOOST_FUSION_SINGLE_VIEW_ASSIGN_CTOR(COMBINATION,_)\
+ template<typename SeqRef>\
+ single_view(\
+ detail::sequence_assign_type<SeqRef> COMBINATION seq_assign)\
+ : val(fusion::front(seq_assign.get()))\
+ {\
+ BOOST_FUSION_STATIC_ASSERT((result_of::size<SeqRef>::value==1));\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_SINGLE_VIEW_ASSIGN_CTOR,_)
+
+#undef BOOST_FUSION_SINGLE_VIEW_ASSIGN_CTOR
+
+ template<typename OtherT>
+ single_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherT) val)
+ {
+ val=BOOST_FUSION_FORWARD(OtherT,val);
+ return *this;
+ }
+
+#define BOOST_FUSION_SINGLE_VIEW_SEQ_ASSIGN(COMBINATION,_)\
+ template<typename SeqRef>\
+ single_view&\
+ operator=(detail::sequence_assign_type<SeqRef> COMBINATION seq_assign)\
+ {\
+ BOOST_FUSION_STATIC_ASSERT((result_of::size<SeqRef>::value==1));\
+ \
+ val=fusion::front(seq_assign.get());\
+ return *this;\
+ }
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_SINGLE_VIEW_SEQ_ASSIGN,_)
+
+#undef BOOST_FUSION_SINGLE_VIEW_SEQ_ASSIGN
+
+ value_type val;
+ };
+
+ template <typename T>
+ inline single_view<
+ typename detail::as_fusion_element<BOOST_FUSION_R_ELSE_CLREF(T)>::type
+ >
+ make_single_view(BOOST_FUSION_R_ELSE_CLREF(T) v)
+ {
+ typedef
+ single_view<
+ typename detail::as_fusion_element<
+ BOOST_FUSION_R_ELSE_CLREF(T)
+ >::type
+ >
+ view;
+
+ return view(BOOST_FUSION_FORWARD(T,v));
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,13 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_HPP
+
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/advance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/advance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,84 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_ADVANCE_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_ADVANCE_IMPL_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct advance_impl;
+
+ // Unary Version
+ template<>
+ struct advance_impl<transform_view_iterator_tag>
+ {
+ template<typename ItRef, typename Dist>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<ItRef>::type
+ it;
+
+ typedef
+ transform_view_iterator<
+ typename result_of::advance<
+ typename it::first_type
+ , Dist
+ >::type
+ , typename it::transform_type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(boost::fusion::advance<Dist>(it.first), *it.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template<>
+ struct advance_impl<transform_view_iterator2_tag>
+ {
+ template<typename ItRef, typename Dist>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<ItRef>::type
+ it;
+
+ typedef
+ transform_view_iterator2<
+ typename result_of::advance<
+ typename it::first1_type
+ , Dist
+ >::type
+ , typename result_of::advance<
+ typename it::first2_type
+ , Dist
+ >::type
+ , typename it::transform_type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(boost::fusion::advance<Dist>(it.first1)
+ , boost::fusion::advance<Dist>(it.first2)
+ , it.f);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,80 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct at_impl;
+
+ template<>
+ struct at_impl<transform_view_tag>
+ {
+ template<typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename seq::transform_type
+ >::type(
+ typename result_of::at<typename seq::seq_type, N>::type
+ )
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return seq.f(boost::fusion::at<N>(seq.seq.get()));
+ }
+ };
+ };
+
+ template<>
+ struct at_impl<transform_view2_tag>
+ {
+ template<typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename seq::transform_type
+ >::type(
+ typename boost::fusion::result_of::at<
+ typename seq::seq1_type
+ , N
+ >::type
+ , typename boost::fusion::result_of::at<
+ typename seq::seq2_type
+ , N
+ >::type)
+ >::type
+ type;
+
+ static type call(SeqRef seq)
+ {
+ return seq.f(
+ boost::fusion::at<N>(seq.seq1.get()),
+ boost::fusion::at<N>(seq.seq2.get()));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct begin_impl;
+
+ // Unary Version
+ template <>
+ struct begin_impl<transform_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<SeqRef>::type
+ seq;
+
+ typedef
+ transform_view_iterator<
+ typename result_of::begin<typename seq::seq_type>::type
+ , typename detail::forward_as<
+ SeqRef
+ , typename seq::transform_type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(fusion::begin(seq.seq.get()), seq.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct begin_impl<transform_view2_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef
+ transform_view_iterator2<
+ typename result_of::begin<typename seq::seq1_type>::type
+ , typename result_of::begin<typename seq::seq2_type>::type
+ , typename detail::forward_as<
+ SeqRef
+ , typename seq::transform_type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(
+ fusion::begin(seq.seq1.get()),
+ fusion::begin(seq.seq2.get()),
+ seq.f);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct deref_impl;
+
+ // Unary Version
+ template <>
+ struct deref_impl<transform_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<ItRef>::type
+ it;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename it::transform_type
+ >::type(
+ typename result_of::deref<typename it::first_type>::type
+ )
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return (*it.f)(fusion::deref(it.first));
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct deref_impl<transform_view_iterator2_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename it::transform_type
+ >::type(
+ typename result_of::deref<typename it::first1_type>::type
+ , typename result_of::deref<typename it::first2_type>::type)
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return (*it.f)(
+ fusion::deref(it.first1)
+ , fusion::deref(it.first2));
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/distance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/distance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,48 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_DISTANCE_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_DISTANCE_IMPL_HPP
+
+#include <boost/fusion/iterator/distance.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct distance_impl;
+
+ // Unary Version
+ template<>
+ struct distance_impl<transform_view_iterator_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : result_of::distance<
+ typename detail::remove_reference<First>::type::first_type
+ , typename detail::remove_reference<Last>::type::first_type
+ >
+ {
+ };
+ };
+
+ // Binary Version
+ template<>
+ struct distance_impl<transform_view_iterator2_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : result_of::distance<
+ typename detail::remove_reference<First>::type::first1_type
+ , typename detail::remove_reference<Last>::type::first1_type
+ >
+ {
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,77 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct end_impl;
+
+ // Unary Version
+ template <>
+ struct end_impl<transform_view_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef
+ transform_view_iterator<
+ typename result_of::end<typename seq::seq_type>::type
+ , typename detail::forward_as<
+ SeqRef
+ , typename seq::transform_type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(fusion::end(seq.seq.get()), seq.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct end_impl<transform_view2_tag>
+ {
+ template <typename SeqRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef
+ transform_view_iterator2<
+ typename result_of::end<typename seq::seq1_type>::type
+ , typename result_of::end<typename seq::seq2_type>::type
+ , typename detail::forward_as<
+ SeqRef
+ , typename seq::transform_type
+ >::type
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(
+ fusion::end(seq.seq1.get())
+ , fusion::end(seq.seq2.get())
+ , seq.f);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+
+#include <boost/fusion/iterator/equal_to.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<transform_view_iterator_tag>
+ {
+ template<typename ItRef1, typename ItRef2>
+ struct apply
+ : result_of::equal_to<
+ typename detail::remove_reference<ItRef1>::type::first_type
+ , typename detail::remove_reference<ItRef2>::type::first_type
+ >
+ {};
+ };
+
+ template<>
+ struct equal_to_impl<transform_view_iterator2_tag>
+ {
+ template<typename ItRef1, typename ItRef2>
+ struct apply
+ : result_of::equal_to<
+ typename detail::remove_reference<ItRef1>::type::first1_type
+ , typename detail::remove_reference<ItRef2>::type::first1_type
+ >
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,76 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_NEXT_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_NEXT_IMPL_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct next_impl;
+
+ // Unary Version
+ template <>
+ struct next_impl<transform_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef
+ transform_view_iterator<
+ typename result_of::next<
+ typename it::first_type
+ >::type
+ , typename it::transform_type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(fusion::next(it.first), *it.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct next_impl<transform_view_iterator2_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef
+ transform_view_iterator2<
+ typename result_of::next<
+ typename it::first1_type
+ >::type
+ , typename result_of::next<
+ typename it::first2_type
+ >::type
+ , typename it::transform_type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(fusion::next(it.first1),
+ fusion::next(it.first2),
+ *it.f);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/prior_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/prior_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_PRIOR_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_PRIOR_IMPL_HPP
+
+#include <boost/fusion/iterator/prior.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct prior_impl;
+
+ // Unary Version
+ template<>
+ struct prior_impl<transform_view_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef
+ transform_view_iterator<
+ typename result_of::prior<
+ typename it::first_type
+ >::type
+ , typename it::transform_type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(fusion::prior(it.first), *it.f);
+ }
+ };
+ };
+
+ // Binary Version
+ template<>
+ struct prior_impl<transform_view_iterator2_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<ItRef>::type
+ it;
+
+ typedef
+ transform_view_iterator2<
+ typename result_of::prior<
+ typename it::first1_type
+ >::type
+ , typename result_of::prior<
+ typename it::first2_type
+ >::type
+ , typename it::transform_type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(fusion::prior(it.first1),
+ fusion::prior(it.first2),
+ it.f);
+ }
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/transform_view_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,99 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_TRANSFORM_VIEW_ITERATOR_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_TRANSFORM_VIEW_ITERATOR_HPP
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Unary Version
+ struct transform_view_iterator_tag;
+
+ template <typename First, typename FRef>
+ struct transform_view_iterator
+ : iterator_base<transform_view_iterator<First, FRef> >
+ {
+ typedef FRef transform_type;
+ typedef First first_type;
+
+ typedef transform_view_iterator_tag fusion_tag;
+ typedef typename traits::category_of<first_type>::type category;
+
+ template<typename OtherIt>
+ transform_view_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ : first(BOOST_FUSION_FORWARD(OtherIt,it).first)
+ , f(BOOST_FUSION_FORWARD(OtherIt,it).f)
+ {}
+
+ transform_view_iterator(First const& first, transform_type f)
+ : first(first)
+ , f(&f)
+ {}
+
+ template<typename OtherIt>
+ transform_view_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ {
+ first=BOOST_FUSION_FORWARD(OtherIt,it).first;
+ f=BOOST_FUSION_FORWARD(OtherIt,it).f;
+ return *this;
+ }
+
+ first_type first;
+ typename detail::remove_reference<transform_type>::type* f;
+ };
+
+ // Binary Version
+ struct transform_view_iterator2_tag;
+
+ template <typename First1, typename First2, typename FRef>
+ struct transform_view_iterator2
+ : iterator_base<transform_view_iterator2<First1, First2, FRef> >
+ {
+ typedef First1 first1_type;
+ typedef First2 first2_type;
+ typedef FRef transform_type;
+
+ typedef transform_view_iterator2_tag fusion_tag;
+ typedef typename traits::category_of<first1_type>::type category;
+
+ template<typename OtherIt>
+ transform_view_iterator2(
+ BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ : first1(BOOST_FUSION_FORWARD(OtherIt,it).first1)
+ , first2(BOOST_FUSION_FORWARD(OtherIt,it).first2)
+ , f(BOOST_FUSION_FORWARD(OtherIt,it).f)
+ {}
+
+ transform_view_iterator2(First1 const& first1,
+ First2 const& first2,
+ FRef f)
+ : first1(first1)
+ , first2(first2)
+ , f(&f)
+ {}
+
+ template<typename OtherIt>
+ transform_view_iterator2&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ {
+ first1=BOOST_FUSION_FORWARD(OtherIt,it).first1;
+ first2=BOOST_FUSION_FORWARD(OtherIt,it).first2;
+ f=BOOST_FUSION_FORWARD(OtherIt,it).f;
+ return *this;
+ }
+
+ first1_type first1;
+ first2_type first2;
+ typename detail::remove_reference<transform_type>::type* f;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,67 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct value_at_impl;
+
+ template<>
+ struct value_at_impl<transform_view_tag>
+ {
+ template<typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename seq::transform_type
+ >::type(
+ typename boost::fusion::result_of::value_at<
+ typename seq::seq_type
+ , N
+ >::type)
+ >::type
+ type;
+ };
+ };
+
+ template<>
+ struct value_at_impl<transform_view2_tag>
+ {
+ template<typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename seq::transform_type
+ >::type(
+ typename boost::fusion::result_of::value_at<
+ typename seq::seq1_type, N
+ >::type
+ , typename boost::fusion::result_of::value_at<
+ typename seq::seq2_type, N
+ >::type)
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/support/internal/result_of.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Tag>
+ struct value_of_impl;
+
+ // Unary Version
+ template <>
+ struct value_of_impl<transform_view_iterator_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename it::transform_type
+ >::type(
+ typename result_of::value_of<typename it::first_type>::type)
+ >::type
+ type;
+ };
+ };
+
+ // Binary Version
+ template <>
+ struct value_of_impl<transform_view_iterator2_tag>
+ {
+ template <typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+
+ typedef typename
+ detail::internal::result_of<
+ typename detail::get_func_base<
+ typename it::transform_type
+ >::type(
+ typename result_of::value_of<typename it::first1_type>::type
+ , typename result_of::value_of<typename it::first2_type>::type)
+ >::type
+ type;
+ };
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,268 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_TRANSFORM_VIEW_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_TRANSFORM_VIEW_HPP
+
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+# include <boost/fusion/container/vector/vector10.hpp>
+#else
+# include <boost/fusion/container/vector/vector.hpp>
+#endif
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
+#include <boost/fusion/view/detail/view_storage.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/inherit.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/bool.hpp>
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# include <boost/mpl/equal_to.hpp>
+#endif
+#include <boost/call_traits.hpp>
+
+#include <boost/fusion/view/transform_view/transform_view_fwd.hpp>
+#include <boost/fusion/view/transform_view/detail/at_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/value_at_impl.hpp>
+
+#include <boost/fusion/view/transform_view/detail/transform_view_iterator.hpp>
+#include <boost/fusion/view/transform_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/end_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/next_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/prior_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/advance_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/distance_impl.hpp>
+#include <boost/fusion/view/transform_view/detail/equal_to_impl.hpp>
+
+namespace boost { namespace fusion
+{
+ struct void_;
+ struct transform_view_tag;
+ struct transform_view2_tag;
+ struct fusion_sequence_tag;
+
+ // Binary Version
+ template <typename Seq1, typename Seq2, typename F, typename IsAssociative>
+ struct transform_view
+ : sequence_base<transform_view<Seq1, Seq2, F,IsAssociative> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq1>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq2>));
+ BOOST_FUSION_MPL_ASSERT((
+ mpl::equal_to<result_of::size<Seq1>,result_of::size<Seq1> >));
+
+ typedef detail::view_storage<Seq1> storage1_type;
+ typedef typename storage1_type::type seq1_type;
+ typedef detail::view_storage<Seq2> storage2_type;
+ typedef typename storage2_type::type seq2_type;
+ typedef F transform_type;
+ typedef typename
+ detail::strictest_traversal<
+#ifdef BOOST_NO_VARIADIC_TEMPLATES
+ fusion::vector2<seq1_type, seq2_type>
+#else
+ fusion::vector<seq1_type, seq2_type>
+#endif
+ >::type
+ strictest_traversal;
+
+ typedef transform_view2_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+ //TODO implement IsAssociative
+ typedef typename
+ mpl::eval_if<
+ IsAssociative
+ , mpl::inherit2<strictest_traversal,associative_sequence_tag>
+ , mpl::identity<strictest_traversal>
+ >::type
+ category;
+ typedef typename result_of::size<seq1_type>::type size;
+
+ template<typename OtherTransformView>
+ transform_view(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) view)
+ : seq1(BOOST_FUSION_FORWARD(OtherTransformView,view).seq1)
+ , seq2(BOOST_FUSION_FORWARD(OtherTransformView,view).seq2)
+ , f(BOOST_FUSION_FORWARD(OtherTransformView,view).f)
+ {}
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ transform_view(typename storage1_type::call_param seq1,
+ typename storage2_type::call_param seq2,
+ typename call_traits<F>::param_type f)
+ : seq1(seq1)
+ , seq2(seq2)
+ , f(f)
+ {}
+#else
+ template<typename OtherSeq1, typename OtherSeq2,typename OtherF>
+ transform_view(BOOST_FUSION_R_ELSE_CLREF(OtherSeq1) seq1,
+ BOOST_FUSION_R_ELSE_CLREF(OtherSeq2) seq2,
+ BOOST_FUSION_R_ELSE_CLREF(OtherF) f)
+ : seq1(BOOST_FUSION_FORWARD(OtherSeq1,seq1))
+ , seq2(BOOST_FUSION_FORWARD(OtherSeq2,seq2))
+ , f(BOOST_FUSION_FORWARD(OtherF,f))
+ {}
+#endif
+
+ template<typename OtherTransformView>
+ OtherTransformView&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) other_view)
+ {
+ seq1=BOOST_FUSION_FORWARD(OtherTransformView,other_view).seq1;
+ seq2=BOOST_FUSION_FORWARD(OtherTransformView,other_view).seq2;
+ f=BOOST_FUSION_FORWARD(OtherTransformView,other_view).f;
+ return *this;
+ }
+
+ storage1_type seq1;
+ storage2_type seq2;
+ transform_type f;
+ };
+
+ // Unary Version implementation
+ template<typename Seq, typename F, typename IsAssociative>
+ struct unary_transform_view
+ : sequence_base<unary_transform_view<Seq, F, void_> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seq>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seq>));
+
+ typedef detail::view_storage<Seq> storage_type;
+ typedef typename storage_type::type seq_type;
+ typedef typename traits::category_of<seq_type>::type seq_category;
+ typedef F transform_type;
+
+ typedef typename
+ mpl::eval_if<
+ IsAssociative
+ , mpl::inherit2<seq_category,associative_sequence_tag>
+ , mpl::identity<seq_category>
+ >::type
+ category;
+ typedef typename result_of::size<seq_type>::type size;
+ typedef transform_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+
+ template<typename OtherTransformView>
+ unary_transform_view(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) view)
+ : seq(BOOST_FUSION_FORWARD(OtherTransformView,view).seq)
+ , f(BOOST_FUSION_FORWARD(OtherTransformView,view).f)
+ {}
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ unary_transform_view(
+ typename storage_type::call_param seq,
+ typename call_traits<transform_type>::param_type f)
+ : seq(seq)
+ , f(f)
+ {}
+#else
+ template<typename OtherSeq, typename OtherF>
+ unary_transform_view(OtherSeq&& seq,OtherF&& f)
+ : seq(std::forward<OtherSeq>(seq))
+ , f(std::forward<OtherF>(f))
+ {}
+#endif
+
+ template<typename OtherTransformView>
+ unary_transform_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) view)
+ {
+ seq=BOOST_FUSION_FORWARD(OtherTransformView,view).seq;
+ f=BOOST_FUSION_FORWARD(OtherTransformView,view).f;
+ return *this;
+ }
+
+ storage_type seq;
+ transform_type f;
+ };
+
+ //TODO cschmidt: template typedef
+ template<typename Seq, typename F>
+ struct transform_view<Seq, F, mpl::true_,mpl::false_>
+ : unary_transform_view<Seq, F, mpl::true_>
+ {
+ typedef unary_transform_view<Seq, F, mpl::true_> base;
+
+ template<typename OtherTransformView>
+ transform_view(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) view)
+ : base(BOOST_FUSION_FORWARD(OtherTransformView,view))
+ {}
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ transform_view(
+ typename base::storage_type::call_param seq,
+ typename call_traits<typename base::transform_type>::param_type f)
+ : base(seq,f)
+ {}
+#else
+ template<typename OtherSeq, typename OtherF>
+ transform_view(OtherSeq&& seq,OtherF&& f)
+ : base(std::forward<OtherSeq>(seq),std::forward<OtherF>(f))
+ {}
+#endif
+
+ template<typename OtherTransformView>
+ transform_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) view)
+ {
+ *static_cast<base*>(this)=
+ BOOST_FUSION_FORWARD(OtherTransformView,view);
+ return *this;
+ }
+ };
+
+ template<typename Seq, typename F>
+ struct transform_view<Seq, F, mpl::false_,mpl::false_>
+ : unary_transform_view<Seq, F, mpl::false_>
+ {
+ typedef unary_transform_view<Seq, F, mpl::false_> base;
+
+ template<typename OtherTransformView>
+ transform_view(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) view)
+ : base(BOOST_FUSION_FORWARD(OtherTransformView,view))
+ {}
+
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ transform_view(
+ typename base::storage_type::call_param seq,
+ typename call_traits<typename base::transform_type>::param_type f)
+ : base(seq,f)
+ {}
+#else
+ template<typename OtherSeq, typename OtherF>
+ transform_view(OtherSeq&& seq,OtherF&& f)
+ : base(std::forward<OtherSeq>(seq),std::forward<OtherF>(f))
+ {}
+#endif
+
+ template<typename OtherTransformView>
+ transform_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherTransformView) view)
+ {
+ *static_cast<base*>(this)=
+ BOOST_FUSION_FORWARD(OtherTransformView,view);
+ return *this;
+ }
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/transform_view/transform_view_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,27 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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_FUSION_VIEW_TRANSFORM_VIEW_TRANSFORM_VIEW_FWD_HPP
+#define BOOST_FUSION_VIEW_TRANSFORM_VIEW_TRANSFORM_VIEW_FWD_HPP
+
+#include <boost/mpl/bool.hpp>
+
+namespace boost { namespace fusion
+{
+ struct transform_view_tag;
+ struct transform_view2_tag;
+
+ template<
+ typename A
+ , typename B
+ , typename C = mpl::false_
+ , typename D = mpl::false_
+ >
+ struct transform_view;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_HPP
+
+#include <boost/fusion/view/zip_view/zip_view.hpp>
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/advance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,77 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_ADVANCE_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_ADVANCE_IMPL_HPP
+
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename N>
+ struct poly_advance
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self, typename It>
+ struct result<Self(It)>
+ {
+ typedef typename result_of::advance<It,N>::type type;
+ };
+
+ template<typename It>
+ typename result_of::advance<It const&,N>::type
+ operator()(It const& it) const
+ {
+ return fusion::advance<N>(it);
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+
+ template<>
+ struct advance_impl<zip_view_iterator_tag>
+ {
+ template<typename ItRef, typename N>
+ struct apply
+ {
+ typedef
+ zip_view_iterator<
+ typename result_of::transform<
+ typename detail::remove_reference<
+ ItRef
+ >::type::iterators
+ , detail::poly_advance<N>
+ >::type
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(
+ fusion::transform(
+ it.iterators_
+ , detail::poly_advance<N>()
+ )
+ , 0);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,90 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_AT_IMPL_HPP
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename N>
+ struct poly_at
+ {
+ template<typename T>
+ struct result;
+
+ template<typename Self, typename SeqRef>
+ struct result<Self(SeqRef)>
+ : mpl::eval_if<
+ is_same<SeqRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , result_of::at<SeqRef, N>
+ >
+ {};
+
+ template<typename Seq>
+ typename result<poly_at(BOOST_FUSION_R_ELSE_LREF(Seq))>::type
+ operator()(BOOST_FUSION_R_ELSE_LREF(Seq) seq) const
+ {
+ return fusion::at<N>(BOOST_FUSION_FORWARD(Seq,seq));
+ }
+
+ unused_type const&
+ operator()(unused_type const& unused) const
+ {
+ return unused;
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+
+ template<>
+ struct at_impl<zip_view_tag>
+ {
+ template<typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ result_of::as_vector<
+ typename result_of::transform<
+ typename detail::remove_reference<
+ SeqRef
+ >::type::seqs_type
+ , detail::poly_at<N>
+ >::type
+ >::type
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(sequence_assign(fusion::transform(
+ seq.seqs, detail::poly_at<N>())));
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,90 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_BEGIN_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_BEGIN_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct poly_begin
+ {
+ template<typename T>
+ struct result;
+
+ template<typename Self, typename SeqRef>
+ struct result<Self(SeqRef)>
+ : mpl::eval_if<
+ is_same<SeqRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , result_of::begin<SeqRef>
+ >
+ {};
+
+ template<typename Seq>
+ typename result<poly_begin(BOOST_FUSION_R_ELSE_LREF(Seq))>::type
+ operator()(BOOST_FUSION_R_ELSE_LREF(Seq) seq) const
+ {
+ return fusion::begin(seq);
+ }
+
+ unused_type const&
+ operator()(unused_type const& unused) const
+ {
+ return unused;
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct begin_impl;
+
+ template<>
+ struct begin_impl<zip_view_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ typedef typename
+ detail::remove_reference<SeqRef>::type
+ seq;
+
+ typedef
+ zip_view_iterator<
+ typename result_of::transform<
+ typename seq::seqs_type
+ , detail::poly_begin
+ >::type
+ , typename seq::category
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(
+ fusion::transform(seq.seqs, detail::poly_begin())
+ , 0);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_DEREF_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_DEREF_IMPL_HPP
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct poly_deref
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self, typename ItRef>
+ struct result<Self(ItRef)>
+ : mpl::eval_if<
+ is_same<ItRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , result_of::deref<ItRef>
+ >
+ {};
+
+ template<typename It>
+ typename result<poly_deref(It const&)>::type
+ operator()(It const& it) const
+ {
+ return fusion::deref(it);
+ }
+
+ unused_type const&
+ operator()(unused_type const& unused) const
+ {
+ return unused;
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct deref_impl;
+
+ template<>
+ struct deref_impl<zip_view_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::as_vector<
+ typename result_of::transform<
+ typename detail::remove_reference<
+ ItRef
+ >::type::iterators
+ , detail::poly_deref
+ >::type
+ >::type
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(sequence_assign(fusion::transform(
+ it.iterators_, detail::poly_deref())));
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/distance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/distance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,97 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_DISTANCE_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_DISTANCE_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ struct random_access_iterator_tag;
+
+ namespace detail
+ {
+ template<typename FoundIt, typename SearchIt>
+ struct best_distance
+ {
+ typedef typename
+ result_of::distance<
+ FoundIt
+ , typename result_of::find_if<
+ typename SearchIt::iterators
+ , is_same<
+ traits::category_of<mpl::_1>
+ , random_access_iterator_tag
+ >
+ >::type
+ >::type
+ type;
+ };
+
+ template<typename It1, typename It2>
+ struct default_distance
+ : result_of::distance<
+ typename result_of::front<typename It1::iterators>::type
+ , typename result_of::front<typename It2::iterators>::type
+ >
+ {};
+
+ template<typename It1, typename It2>
+ struct zip_view_iterator_distance
+ {
+ typedef typename
+ result_of::find_if<
+ typename It1::iterators
+ , is_same<traits::category_of<mpl::_1>
+ , random_access_iterator_tag>
+ >::type
+ found_it;
+
+ typedef typename
+ mpl::eval_if<
+ is_same<
+ found_it
+ , typename result_of::end<typename It1::iterators>::type
+ >
+ , detail::default_distance<It1, It2>
+ , detail::best_distance<found_it, It2>
+ >::type
+ type;
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+
+ template<>
+ struct distance_impl<zip_view_iterator_tag>
+ {
+ template<typename ItRef1, typename ItRef2>
+ struct apply
+ : detail::zip_view_iterator_distance<
+ typename detail::remove_reference<ItRef1>::type
+ , typename detail::remove_reference<ItRef2>::type
+ >
+ {
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,104 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_END_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_END_IMPL_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+
+#include <boost/mpl/min.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename Seq, typename M>
+ struct get_endpoint
+ {
+ typedef typename result_of::begin<Seq>::type begin;
+
+ typedef typename result_of::advance<begin, M>::type type;
+ };
+
+ template<typename M>
+ struct endpoints
+ {
+ template<typename T>
+ struct result;
+
+ template<typename Self, typename SeqRef>
+ struct result<Self(SeqRef)>
+ : mpl::eval_if<
+ is_same<SeqRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , get_endpoint<SeqRef, M>
+ >
+ {};
+
+ template<typename Seq>
+ typename result<endpoints(BOOST_FUSION_R_ELSE_LREF(Seq))>::type
+ operator()(BOOST_FUSION_R_ELSE_LREF(Seq) seq) const
+ {
+ return fusion::advance<M>(fusion::begin(seq));
+ }
+
+ unused_type const&
+ operator()(unused_type const& unused) const
+ {
+ return unused;
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct end_impl;
+
+ template<>
+ struct end_impl<zip_view_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<SeqRef>::type seq;
+
+ typedef
+ zip_view_iterator<
+ typename result_of::transform<
+ typename seq::seqs_type
+ , detail::endpoints<typename seq::size>
+ >::type
+ , typename seq::category
+ >
+ type;
+
+ static type
+ call(SeqRef seq)
+ {
+ return type(
+ fusion::transform(
+ seq.seqs
+ , detail::endpoints<typename seq::size>()
+ )
+ , 0);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,79 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_EQUAL_TO_IMPL_HPP
+
+#include <boost/fusion/mpl.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/transform_view.hpp>
+#include <boost/mpl/zip_view.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/unpack_args.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/end.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename It1, typename It2>
+ struct zip_iterators_equal
+ {
+ typedef
+ mpl::zip_view<
+ mpl::vector2<
+ typename It1::iterators
+ , typename It2::iterators
+ >
+ >
+ zipped;
+ typedef
+ mpl::transform_view<
+ zipped
+ , mpl::unpack_args<result_of::equal_to<mpl::_1,mpl::_1> >
+ >
+ transformed;
+ typedef typename
+ mpl::find_if<
+ transformed
+ , mpl::equal_to<mpl::_1, mpl::false_>
+ >::type
+ found;
+
+ typedef typename
+ is_same<typename mpl::end<transformed>::type, found>::type
+ type;
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<zip_view_iterator_tag>
+ {
+ template<typename ItRef1, typename ItRef2>
+ struct apply
+ : detail::zip_iterators_equal<
+ typename detail::remove_reference<ItRef1>::type
+ , typename detail::remove_reference<ItRef2>::type
+ >::type
+ {};
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_NEXT_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_NEXT_IMPL_HPP
+
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct poly_next
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self, typename ItRef>
+ struct result<Self(ItRef)>
+ : mpl::eval_if<
+ is_same<ItRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , result_of::next<ItRef>
+ >
+ {};
+
+ template<typename It>
+ typename result<poly_next(It const&)>::type
+ operator()(It const& it) const
+ {
+ return fusion::next(it);
+ }
+
+ unused_type const&
+ operator()(unused_type const& unused) const
+ {
+ return unused;
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct next_impl;
+
+ template<>
+ struct next_impl<zip_view_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+ typedef
+ fusion::zip_view_iterator<
+ typename result_of::transform<
+ typename it::iterators
+ , detail::poly_next
+ >::type
+ , typename it::category
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(
+ fusion::transform(it.iterators_, detail::poly_next())
+ , 0);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/prior_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_PRIOR_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_PRIOR_IMPL_HPP
+
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct poly_prior
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self, typename ItRef>
+ struct result<Self(ItRef)>
+ : mpl::eval_if<
+ is_same<ItRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , result_of::prior<ItRef>
+ >
+ {};
+
+ template<typename It>
+ typename result<poly_prior(It const&)>::type
+ operator()(It const& it) const
+ {
+ return fusion::prior(it);
+ }
+
+ unused_type const&
+ operator()(unused_type const& unused) const
+ {
+ return unused;
+ }
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct prior_impl;
+
+ template<>
+ struct prior_impl<zip_view_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename detail::remove_reference<ItRef>::type it;
+ typedef
+ zip_view_iterator<
+ typename result_of::transform<
+ typename it::iterators
+ , detail::poly_prior
+ >::type
+ , typename it::category
+ >
+ type;
+
+ static type
+ call(ItRef it)
+ {
+ return type(
+ fusion::transform(it.iterators_, detail::poly_prior())
+ , 0);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/size_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/size_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,27 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_SIZE_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_SIZE_IMPL_HPP
+
+namespace boost { namespace fusion { namespace extension
+{
+ template<typename Tag>
+ struct size_impl;
+
+ template<>
+ struct size_impl<zip_view_tag>
+ {
+ template<typename SeqRef>
+ struct apply
+ : detail::remove_reference<SeqRef>::type::size
+ {};
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_VALUE_AT_IMPL_HPP
+
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/support/unused.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ template<typename N>
+ struct poly_value_at
+ {
+ template<typename T>
+ struct result;
+
+ template<typename Self, typename SeqRef>
+ struct result<Self(SeqRef)>
+ : mpl::eval_if<
+ is_same<SeqRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , result_of::value_at<SeqRef, N>
+ >
+ {};
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_at_impl;
+
+ template<>
+ struct value_at_impl<zip_view_tag>
+ {
+ template<typename SeqRef, typename N>
+ struct apply
+ {
+ typedef typename
+ result_of::transform<
+ typename detail::remove_reference<
+ SeqRef
+ >::type::seqs_type
+ , detail::poly_value_at<N>
+ >::type
+ values;
+
+ typedef typename result_of::as_vector<values>::type type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,67 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_VALUE_OF_IMPL_HPP
+
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace fusion
+{
+ namespace detail
+ {
+ struct poly_value_of
+ {
+ template<typename T>
+ struct result;
+
+ template<typename Self, typename ItRef>
+ struct result<Self(ItRef)>
+ : mpl::eval_if<
+ is_same<ItRef, unused_type const&>
+ , mpl::identity<unused_type const&>
+ , result_of::value_of<ItRef>
+ >
+ {};
+ };
+ }
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_of_impl;
+
+ template<>
+ struct value_of_impl<zip_view_iterator_tag>
+ {
+ template<typename ItRef>
+ struct apply
+ {
+ typedef typename
+ result_of::transform<
+ typename detail::remove_reference<
+ ItRef
+ >::type::iterators
+ , detail::poly_value_of
+ >::type
+ values;
+
+ typedef typename result_of::as_vector<values>::type type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/zip_view_fwd.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/zip_view_fwd.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,14 @@
+// Copyright Christopher Schmidt 2009.
+// 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_FUSION_VIEW_ZIP_VIEW_DETAIL_ZIP_VIEW_FWD_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_ZIP_VIEW_FWD_HPP
+
+namespace boost { namespace fusion
+{
+ struct zip_view_tag;
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/zip_view_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/detail/zip_view_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,54 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_DETAIL_ZIP_VIEW_ITERATOR_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_DETAIL_ZIP_VIEW_ITERATOR_HPP
+
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+
+namespace boost { namespace fusion {
+
+ struct zip_view_iterator_tag;
+
+ template<
+ typename ItSeq
+ , typename Traversal=typename detail::strictest_traversal<ItSeq>::type
+ >
+ struct zip_view_iterator
+ : iterator_base<zip_view_iterator<ItSeq, Traversal> >
+ {
+ typedef zip_view_iterator_tag fusion_tag;
+ typedef Traversal category;
+
+ template<typename OtherIt>
+ zip_view_iterator(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ : iterators_(sequence_assign(it.iterators_))
+ {}
+
+ template<typename Seq>
+ zip_view_iterator(BOOST_FUSION_R_ELSE_CLREF(Seq) seq,int)
+ : iterators_(
+ sequence_assign(BOOST_FUSION_FORWARD(Seq,seq)))
+ {}
+
+ template<typename OtherIt>
+ zip_view_iterator&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherIt) it)
+ {
+ iterators_=it.iterators_;
+ return *this;
+ }
+
+ typedef typename result_of::as_vector<ItSeq>::type iterators;
+ iterators iterators_;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/boost/fusion/view/zip_view/zip_view.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,198 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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_FUSION_VIEW_ZIP_VIEW_ZIP_VIEW_HPP
+#define BOOST_FUSION_VIEW_ZIP_VIEW_ZIP_VIEW_HPP
+
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/remove.hpp>
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/fusion/support/internal/ref.hpp>
+#include <boost/fusion/support/internal/assert.hpp>
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/placeholders.hpp>
+#include <boost/mpl/transform_view.hpp>
+#include <boost/mpl/at.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/eval_if.hpp>
+
+//#include <boost/integer_traits.hpp>
+
+#include <boost/fusion/view/detail/strictest_traversal.hpp>
+#include <boost/fusion/view/zip_view/detail/zip_view_fwd.hpp>
+#include <boost/fusion/view/zip_view/detail/size_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/at_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/value_at_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/zip_view_iterator.hpp>
+
+#include <boost/fusion/view/zip_view/detail/begin_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/end_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/deref_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/next_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/prior_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/advance_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/distance_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/value_of_impl.hpp>
+#include <boost/fusion/view/zip_view/detail/equal_to_impl.hpp>
+
+namespace boost { namespace fusion {
+
+ namespace detail
+ {
+#ifdef BOOST_FUSION_ENABLE_STATIC_ASSERTS
+ template<typename Seqs>
+ struct all_forward_seqs
+ : mpl::true_
+ {
+ BOOST_FUSION_MPL_ASSERT((
+ result_of::equal_to<
+ typename fusion::result_of::find_if<
+ Seqs
+ , mpl::not_<
+ traits::is_forward/*traits::is_sequence*/<mpl::_1>
+ >
+ >::type
+ , typename fusion::result_of::end<Seqs>::type
+ >));
+ BOOST_FUSION_MPL_ASSERT((
+ result_of::equal_to<
+ typename fusion::result_of::find_if<
+ Seqs
+ , mpl::not_<detail::is_lrref<mpl::_1> >
+ >::type
+ , typename fusion::result_of::end<Seqs>::type
+ >));
+ };
+#endif
+
+ struct seq_size
+ {
+ template<typename Params>
+ struct result;
+
+ template<typename Self,typename Seq>
+ struct result<Self(Seq)>
+ {
+ typedef typename
+ //mpl::eval_if<
+ // traits::is_forward<Seq>
+ /* ,*/ result_of::size<Seq>
+ // , mpl::identity<
+ // mpl::int_<integer_traits<int>::const_max>
+ // >
+ /*>*/::type
+ type;
+ };
+ };
+
+ struct poly_min
+ {
+ template<typename T>
+ struct result;
+
+ template<typename Self,typename MinSize, typename SeqSize>
+ struct result<Self(MinSize, SeqSize)>
+ : mpl::min<
+ typename detail::remove_reference<MinSize>::type,
+ typename detail::remove_reference<SeqSize>::type
+ >
+ {};
+ };
+
+ template<typename Seqs>
+ struct min_size
+ {
+ typedef typename
+ result_of::transform<Seqs, detail::seq_size>::type
+ sizes;
+
+ typedef typename
+ detail::remove_reference<
+ typename result_of::fold<
+ sizes
+ , typename result_of::front<sizes>::type
+ , detail::poly_min
+ >::type
+ >::type
+ type;
+ };
+ }
+
+ struct zip_view_tag;
+ struct fusion_sequence_tag;
+
+ template<typename Seqs>
+ struct zip_view
+ : sequence_base< zip_view<Seqs> >
+ {
+ BOOST_FUSION_MPL_ASSERT((traits::is_sequence<Seqs>));
+ BOOST_FUSION_MPL_ASSERT((traits::is_forward<Seqs>));
+
+ typedef typename
+ result_of::remove<Seqs, unused_type const&>::type
+ real_seqs;
+
+ BOOST_FUSION_MPL_ASSERT((detail::all_forward_seqs<real_seqs>));
+
+ typedef typename
+ fusion::result_of::as_vector<Seqs>::type
+ seqs_type;
+
+ typedef typename
+ detail::strictest_traversal<real_seqs>::type
+ category;
+ typedef zip_view_tag fusion_tag;
+ typedef fusion_sequence_tag tag;
+ typedef mpl::true_ is_view;
+ typedef typename
+ mpl::eval_if<
+ result_of::size<Seqs>
+ , detail::min_size<real_seqs>
+ , mpl::identity<mpl::int_<0> >
+ >::type
+ size;
+
+#define BOOST_FUSION_ZIP_VIEW_CTOR(COMBINATION,_)\
+ template<typename OtherSeqs>\
+ zip_view(zip_view<OtherSeqs> COMBINATION view)\
+ : seqs(sequence_assign(BOOST_FUSION_FORWARD(\
+ zip_view<OtherSeqs> COMBINATION,view).seqs))\
+ {}
+
+ BOOST_FUSION_ALL_CTOR_COMBINATIONS(BOOST_FUSION_ZIP_VIEW_CTOR,_)
+
+#undef BOOST_FUSION_ZIP_VIEW_CTOR
+
+ template<typename OtherSeqs>
+ explicit
+ zip_view(BOOST_FUSION_R_ELSE_CLREF(OtherSeqs) seqs)
+ : seqs(fusion::sequence_assign(
+ BOOST_FUSION_FORWARD(OtherSeqs,seqs)))
+ {}
+
+ template<typename OtherZipView>
+ zip_view&
+ operator=(BOOST_FUSION_R_ELSE_CLREF(OtherZipView) other_zip_view)
+ {
+ seqs=BOOST_FUSION_FORWARD(OtherZipView,other_zip_view).seqs;
+ return *this;
+ }
+
+ seqs_type seqs;
+ };
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/build.bat
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/build.bat 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,40 @@
+@echo off
+rem Copyright Christopher Schmidt 2009.
+rem Distributed under the Boost Software License, Version 1.0.
+rem (See accompanying file LICENSE_1_0.txt or copy at
+rem http://www.boost.org/LICENSE_1_0.txt)
+
+rem (re-)set environment variables
+set BOOST_ROOT=d:/projekte/libs/boost
+set BOOST_INCLUDES_PATH=%BOOST_ROOT%/include/boost-1_40
+
+rem call toolset specific procedure
+if "%1" == "gcc" (
+ call :gcc
+) else (
+ if "%1" == "msvc" (
+ call :msvc
+ ) else (
+ if "%1" == "" (
+ call :gcc
+ ) else (
+ echo Unknown toolset '%1'
+ goto :eof
+ )
+ )
+)
+
+rem compile...
+%BOOST_ROOT%\bjam -sHOME="z:\projekte\cl_link_frontend\util\boost" --toolset=%TOOLSET% %2 %3 %4 %5 %6 %7 %8 %9
+goto :eof
+
+:gcc
+set PATH=C:\Program Files (x86)\MinGWOld\bin;%PATH%
+rem set PATH=C:\Program Files (x86)\MinGW\bin;%PATH%
+set TOOLSET=gcc
+goto :eof
+
+:msvc
+call "%VS90COMNTOOLS%..\..\VC\vcvarsall" x86
+set TOOLSET=msvc
+goto :eof

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/Jamfile 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,25 @@
+#==============================================================================
+# Copyright (c) 2003-2007 Joel de Guzman
+#
+# Use, modification and distribution is subject to 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)
+#==============================================================================
+project boost/libs/fusion/doc ;
+import boostbook : boostbook ;
+using quickbook ;
+
+boostbook quickbook
+ :
+ fusion.qbk
+ :
+ <xsl:param>boost.root=../../../..
+ <xsl:param>boost.libraries=../../../libraries.htm
+ <xsl:param>html.stylesheet=../../../../doc/html/boostbook.css
+ <xsl:param>chunk.section.depth=4
+ <xsl:param>chunk.first.sections=1
+ <xsl:param>toc.section.depth=3
+ <xsl:param>toc.max.depth=3
+ <xsl:param>generate.section.toc.level=4
+ ;
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/acknowledgements.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/acknowledgements.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,23 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Acknowledgements]
+
+Special thanks to David Abrahams, Douglas Gregor, Hartmut Kaiser, Aleksey
+Gurtovoy, Peder Holt, Daniel Wallin, Jaakko Jarvi, Jeremiah Willcock, Dan
+Marsden, Eric Niebler, Joao Abecasis and Andy Little. These people are
+instrumental in the design and development of Fusion.
+
+Special thanks to Ronald Garcia, the review manager and to all the people in the
+boost community who participated in the review: Andreas Pokorny, Andreas Huber,
+Jeff Flinn, David Abrahams, Pedro Lamarao, Larry Evans, Ryan Gallagher, Andy
+Little, Gennadiy Rozental, Tobias Schwinger, Joao Abecasis, Eric Niebler, Oleg
+Abrosimov, Gary Powell, Eric Friedman, Darren Cook, Martin Bonner and Douglas
+Gregor.
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/adapted.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/adapted.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,257 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Adapted]
+
+Fusion provides a couple of adapters for other sequences such as
+`std::pair`, __mpl__ sequences, and `boost::array`. These adapters are
+written using Fusion's non-intrusive __extension__ mechanism. If you wish
+to use these sequences with fusion, simply include the necessary files and
+they will be regarded as first-class, fully conforming fusion sequences.
+
+Fusion also provides various schemes to make it easy for the user to adapt
+various data structures, non-intrusively, as full fledged Fusion sequences.
+
+[heading Header]
+
+ #include <boost/fusion/adapted.hpp>
+ #include <boost/fusion/include/adapted.hpp>
+
+Fusion sequences may also be adapted as fully conforming __mpl__ sequences (see
+__intrinsics__). That way, we can have 2-way adaptation to and from __mpl__ and
+Fusion. To make Fusion sequences fully conforming __mpl__ sequences, include:
+
+ #include <boost/fusion/mpl.hpp>
+
+If you want bi-directional adaptation to and from __mpl__ and Fusion, simply
+include:
+
+ #include <boost/fusion/include/mpl.hpp>
+
+The header includes all the necessary headers.
+
+[section std::pair]
+
+This module provides adapters for `std::pair`. Including the module header
+makes `std::pair` a fully conforming __random_access_sequence__.
+
+[heading Header]
+
+ #include <boost/fusion/adapted/std_pair.hpp>
+ #include <boost/fusion/include/std_pair.hpp>
+
+[heading Model of]
+
+* __random_access_sequence__
+
+[heading Example]
+
+ std::pair<int, std::string> p(123, "Hola!!!");
+ std::cout << __at_c__<0>(p) << std::endl;
+ std::cout << __at_c__<1>(p) << std::endl;
+ std::cout << p << std::endl;
+
+[heading See also]
+
+__std_pair_doc__, __tr1_tuple_pair__
+
+[endsect]
+
+[section mpl sequence]
+
+This module provides adapters for __mpl__ sequences. Including the module
+header makes all __mpl__ sequences fully conforming fusion sequences.
+
+[heading Header]
+
+ #include <boost/fusion/adapted/mpl.hpp>
+ #include <boost/fusion/include/mpl.hpp>
+
+[heading Model of]
+
+* __forward_sequence__ (If the __mpl__ sequence is a forward sequence.)
+* __bidirectional_sequence__ (If the __mpl__ sequence is a bidirectional sequence.)
+* __random_access_sequence__ (If the __mpl__ sequence is a random access sequence.)
+
+[heading Example]
+
+ mpl::vector_c<int, 123, 456> vec_c;
+ fusion::vector2<int, long> v(vec_c);
+ std::cout << __at_c__<0>(v) << std::endl;
+ std::cout << __at_c__<1>(v) << std::endl;
+
+ v = mpl::vector_c<int, 456, 789>();
+ std::cout << __at_c__<0>(v) << std::endl;
+ std::cout << __at_c__<1>(v) << std::endl;
+
+[heading See also]
+
+__mpl__
+
+[endsect]
+
+[section boost::array]
+
+This module provides adapters for `boost::array`. Including the module
+header makes `boost::array` a fully conforming __random_access_sequence__.
+
+[heading Header]
+
+ #include <boost/fusion/adapted/array.hpp>
+ #include <boost/fusion/include/array.hpp>
+
+[heading Model of]
+
+* __random_access_sequence__
+
+[heading Example]
+
+ boost::array<int,3> arr = {{1,2,3}};
+
+ std::cout << *__begin__(arr) << std::endl;
+ std::cout << *__next__(__begin__(arr)) << std::endl;
+ std::cout << *__advance_c__<2>(__begin__(arr)) << std::endl;
+ std::cout << *__prior__(__end__(arr)) << std::endl;
+ std::cout << __at_c__<2>(arr) << std::endl;
+
+[heading See also]
+
+__boost_array_library__
+
+[endsect]
+
+[section boost::tuple]
+This module provides adapters for `boost::tuple`. Including the module
+header makes `boost::tuple` a fully conforming __forward_sequence__.
+
+[heading Header]
+
+ #include <boost/fusion/adapted/boost_tuple.hpp>
+ #include <boost/fusion/include/boost_tuple.hpp>
+
+[heading Model of]
+
+* __forward_sequence__
+
+[heading Example]
+
+ boost::tuple<int,std::string> example_tuple(101, "hello");
+ std::cout << *boost::fusion::begin(example_tuple) << '\n';
+ std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n';
+
+[heading See also]
+
+__boost_tuple_library__
+
+[endsect]
+
+[section:adapt_struct BOOST_FUSION_ADAPT_STRUCT]
+
+[heading Description]
+BOOST_FUSION_ADAPT_STRUCT is a macro that can be used to generate all the
+necessary boilerplate to make an arbitrary struct into a __random_access_sequence__.
+
+[heading Synopsis]
+ BOOST_FUSION_ADAPT_STRUCT(
+ struct_name,
+ (member_type0, member_name0)
+ (member_type1, member_name1)
+ ...
+ )
+
+[heading Semantics]
+
+The above macro generates the necessary code to adapt `struct_name`
+as a model of __random_access_sequence__. The sequence of `(member_typeN, member_nameN)`
+pairs declare the type and names of each of the struct members that will be
+part of the sequence.
+
+The macro should be used at global scope, and `struct_name` should be the fully
+namespace qualified name of the struct to be converted.
+
+[heading Header]
+
+ #include <boost/fusion/adapted/struct/adapt_struct.hpp>
+ #include <boost/fusion/include/adapt_struct.hpp>
+
+[heading Example]
+ namespace demo
+ {
+ struct employee
+ {
+ std::string name;
+ int age;
+ };
+ }
+
+ // demo::employee is now a Fusion sequence
+ BOOST_FUSION_ADAPT_STRUCT(
+ demo::employee,
+ (std::string, name)
+ (int, age))
+
+[endsect]
+
+[section:adapt_assoc BOOST_FUSION_ADAPT_ASSOC_STRUCT]
+
+[heading Description]
+BOOST_FUSION_ADAPT_ASSOC_STRUCT is a macro that can be used to generate all the
+necessary boilerplate to make an arbitrary struct into a model of __random_access_sequence__
+and __associative_sequence__.
+
+[heading Synopsis]
+ BOOST_FUSION_ADAPT_ASSOC_STRUCT(
+ struct_name,
+ (member_type0, member_name0, key_type0)
+ (member_type1, member_name1, key_type1)
+ ...
+ )
+
+[heading Semantics]
+
+The above macro generates the necessary code to adapt `struct_name`
+as a model of __random_access_sequence__ and __associative_sequence__.
+The sequence of `(member_typeN, member_nameN, key_typeN)`
+triples declare the type, name and key type of each of the struct members
+that will be part of the sequence.
+
+The macro should be used at global scope, and `struct_name` should be the fully
+namespace qualified name of the struct to be converted.
+
+[heading Header]
+
+ #include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+ #include <boost/fusion/include/adapt_assoc_struct.hpp>
+
+[heading Example]
+ namespace demo
+ {
+ struct employee
+ {
+ std::string name;
+ int age;
+ };
+ }
+
+ namespace keys
+ {
+ struct name;
+ struct age;
+ }
+
+ // demo::employee is now a Fusion sequence
+ // It is also an associative sequence with
+ // keys keys::name and keys::age present.
+ BOOST_FUSION_ADAPT_ASSOC_STRUCT(
+ demo::employee,
+ (std::string, name, keys::name)
+ (int, age, keys::age))
+
+
+[endsect]
+
+[endsect]

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/algorithm.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/algorithm.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,2524 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Algorithm]
+
+[heading Lazy Evaluation]
+
+Unlike __mpl__, Fusion algorithms are lazy and non sequence-type
+preserving. What does that mean? It means that when you operate on a
+sequence through a Fusion algorithm that returns a sequence, the sequence
+returned may not be of the same class as the original. This is by design.
+Runtime efficiency is given a high priority. Like __mpl__, and unlike
+__stl__, fusion algorithms are functional in nature such that algorithms
+are non mutating (no side effects). However, due to the high cost of
+returning full sequences such as vectors and lists, /Views/ are returned
+from Fusion algorithms instead. For example, the __transform__ algorithm
+does not actually return a transformed version of the original sequence.
+__transform__ returns a __transform_view__. This view holds a reference to
+the original sequence plus the transform function. Iteration over the
+__transform_view__ will apply the transform function over the sequence
+elements on demand. This /lazy/ evaluation scheme allows us to chain as
+many algorithms as we want without incurring a high runtime penalty.
+
+[heading Sequence Extension]
+
+The /lazy/ evaluation scheme where __algorithms__ return __views__ also
+allows operations such as __push_back__ to be totally generic. In Fusion,
+__push_back__ is actually a generic algorithm that works on all sequences.
+Given an input sequence `s` and a value `x`, Fusion's __push_back__
+algorithm simply returns a __joint_view__: a view that holds a reference to
+the original sequence `s` and the value `x`. Functions that were once
+sequence specific and need to be implemented N times over N different
+sequences are now implemented only once. That is to say that Fusion
+sequences are cheaply extensible. However, an important caveat is that the
+result of a sequence extending operation like __push_back__ does not retain
+the properties of the original sequence such as associativity of __set__(s).
+To regain the original sequence, __conversion__ functions are provided. You
+may use one of the __conversion__ functions to convert back to the original
+sequence type.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm.hpp>
+ #include <boost/fusion/include/algorithm.hpp>
+
+[section Iteration]
+
+The iteration algorithms provide the fundamental algorithms for traversing
+a sequence repeatedly applying an operation to its elements.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/iteration.hpp>
+ #include <boost/fusion/include/iteration.hpp>
+
+[section Functions]
+
+[section fold]
+
+[heading Description]
+For a sequence `Seq`, initial state, and binary function object or function pointer `f`, fold repeatedly applies binary `f` to each element of `Seq` and the previous state.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename State,
+ typename F
+ >
+ typename __result_of_fold__<Sequence, State, F>::type fold(
+ Sequence& seq, State const& initial_state, F const& f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__,`f(e,s)` must be a valid expression for each element `e` in `seq`, and current state `s`][Operation's argument]]
+ [[`initial_state`][Any type][Initial state]]
+ [[`f`][`__boost_result_of_call__<F(E,S)>::type` is the return type of `f(e,s)` for each element `e` of type `E` in `seq`, and current state `s` of type `S`][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ fold(seq, initial_state, f);
+
+[*Return type]: Any type
+
+[*Semantics]: Equivalent to `f(eN ....f(e2,f(e1,initial_state)))` where `e1 ...eN` are the elements of `seq`.
+
+[heading Complexity]
+Linear, exactly `__result_of_size__<Sequence>::value` applications of `f`.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/iteration/fold.hpp>
+ #include <boost/fusion/include/fold.hpp>
+
+[heading Example]
+ struct make_string
+ {
+ typedef std::string result_type;
+
+ template<typename T>
+ std::string operator()(const T& t, const std::string& str) const
+ {
+ return str + boost::lexical_cast<std::string>(t);
+ }
+ };
+ ...
+ const __vector__<int,int> vec(1,2);
+ assert(__fold__(vec,std::string(""), make_string()) == "12");
+
+[endsect]
+
+[section accumulate]
+
+[heading Description]
+For a sequence `Seq`, initial state, and binary function object or function pointer `f`, accumulate repeatedly applies binary `f` to each element of `Seq` and the previous state.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename State,
+ typename F
+ >
+ typename __result_of_accumulate__<Sequence, State, F>::type accumulate(
+ Sequence& seq, State const& initial_state, F const& f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `f(eN ....f(e2,f(e1,initial_state)))` must be a valid expression for each element `e1` to `eN` in `seq`][Operation's argument]]
+ [[`initial_state`][Any type][Initial state]]
+ [[`f`][`__boost_result_of_call__<F(E,S)>::type` is the return type of `f(e,s)` for each element `e` of type `E` in `seq`, and current state `s` of type `S`][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ accumulate(seq, initial_state, f);
+
+[*Return type]: Any type
+
+[*Semantics]: Equivalent to `f(eN ....f(e2,f(e1,initial_state)))` where `e1 ...eN` are the elements of `seq`.
+
+[heading Complexity]
+Linear, exactly `__result_of_size__<Sequence>::value` applications of `f`.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/iteration/accumulate.hpp>
+ #include <boost/fusion/include/accumulate.hpp>
+
+[heading Example]
+ struct make_string
+ {
+ typedef std::string result_type;
+
+ template<typename T>
+ std::string operator()(const T& t, const std::string& str) const
+ {
+ return str + boost::lexical_cast<std::string>(t);
+ }
+ };
+ ...
+ const __vector__<int,int> vec(1,2);
+ assert(__accumulate__(vec,std::string(""), make_string()) == "12");
+
+[endsect]
+
+[section for_each]
+
+[heading Description]
+Applies a unary function object to each element of a sequence.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ typename __result_of_for_each__<Sequence, F>::type for_each(
+ Sequence& seq, F const& f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `f(e)` must be a valid expression for each element `e` in `seq`][Operation's argument]]
+ [[`f`][A unary __reg_callable_obj__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __for_each__(seq, f);
+
+[*Return type]: `void`
+
+[*Semantics]: Calls `f(e)` for each element `e` in `seq`.
+
+[heading Complexity]
+Linear, exactly `__result_of_size__<Sequence>::value` applications of `f`.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/iteration/for_each.hpp>
+ #include <boost/fusion/include/for_each.hpp>
+
+[heading Example]
+ struct increment
+ {
+ template<typename T>
+ void operator()(T& t) const
+ {
+ ++t;
+ }
+ };
+ ...
+ __vector__<int,int> vec(1,2);
+ __for_each__(vec, increment());
+ assert(vec == __make_vector__(2,3));
+
+[endsect]
+
+[endsect]
+
+[section Metafunctions]
+
+[section fold]
+
+[heading Description]
+Returns the result type of __fold__.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename State,
+ typename F>
+ struct fold
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [The sequence to iterate]]
+ [[`State`] [Any type] [The initial state for the first application of `F`]]
+ [[`F`] [`__boost_result_of_call__<F(E,S)>::type` is the return type of `f(e,s)` for each element `e` of type `E` in `seq`, and current state `s` of type `S`] [The operation to be applied on forward traversal]]
+]
+
+[heading Expression Semantics]
+ __result_of_fold__<Sequence, State, F>::type
+
+[*Return type]: Any type
+
+[*Semantics]: Returns the result of applying `fold` to a sequence of type `Sequence`, with an initial state of
+type `State` and binary function object or function pointer of type `F`.
+
+[heading Complexity]
+Linear, exactly `__result_of_size__<Sequence>::value` applications of `F`.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/iteration/fold.hpp>
+ #include <boost/fusion/include/fold.hpp>
+
+[endsect]
+
+[section accumulate]
+
+[heading Description]
+Returns the result type of __accumulate__.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename State,
+ typename F>
+ struct accumulate
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [The sequence to iterate]]
+ [[`State`] [Any type] [The initial state for the first application of `F`]]
+ [[`F`] [`__boost_result_of_call__<F(E,S)>::type` is the return type of `f(e,s)` for each element `e` of type `E` in `seq`, and current state `s` of type `S`] [The operation to be applied on forward traversal]]
+]
+
+[heading Expression Semantics]
+ __result_of_accumulate__<Sequence, State, F>::type
+
+[*Return type]: Any type
+
+[*Semantics]: Returns the result of applying `accumulate` to a sequence of type `Sequence`, with an initial state of
+type `State` and binary function object or function pointer of type `F`.
+
+[heading Complexity]
+Linear, exactly `__result_of_size__<Sequence>::value` applications of `F`.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/iteration/accumulate.hpp>
+ #include <boost/fusion/include/accumulate.hpp>
+
+[endsect]
+
+[section for_each]
+A metafunction returning the result type of applying __for_each__ to a sequence. The
+return type of __for_each__ is always `void`.
+
+[heading Description]
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ struct for_each
+ {
+ typedef void type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]]
+ [[`F`] [Any type] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_for_each__<Sequence, F>::type
+
+[*Return type]: `void`.
+
+[*Semantics]: Returns the return type of __for_each__ for a sequence of type `Sequence` and a unary function object `F`.
+The return type is always `void`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/iteration/for_each.hpp>
+ #include <boost/fusion/include/for_each.hpp>
+
+[endsect]
+
+[endsect]
+
+[endsect]
+
+[section Query]
+The query algorithms provide support for searching and analyzing sequences.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query.hpp>
+ #include <boost/fusion/include/query.hpp>
+
+[section Functions]
+
+[section any]
+
+[heading Description]
+For a sequence `seq` and unary function object `f`, `any` returns true if `f` returns true for at least one element of `seq`.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ typename __result_of_any__<Sequence,F>::type any(
+ Sequence const& seq, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `f(e)` must be a valid expression, convertible to `bool`, for each element `e` in `seq`][The sequence to search]]
+ [[`f`][A unary function object][The search predicate]]
+]
+
+[heading Expression semantics]
+ __any__(seq, f);
+
+[*Return type]: `bool`
+
+[*Semantics]: Returns true if and only if `f(e)` evaluates to `true` for some element `e` in `seq`.
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/any.hpp>
+ #include <boost/fusion/include/any.hpp>
+
+[heading Example]
+ struct odd
+ {
+ template<typename T>
+ bool operator()(T t) const
+ {
+ return t % 2;
+ }
+ };
+ ...
+ assert(__any__(__make_vector__(1,2), odd()));
+ assert(!__any__(__make_vector__(2,4), odd()));
+
+[endsect]
+
+[section all]
+
+[heading Description]
+For a sequence `seq` and unary function object `f`, `all` returns true if `f` returns true for every element of `seq`.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ typename __result_of_all__<Sequence,F>::type all(
+ Sequence const& seq, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `f(e)` is a valid expression, convertible to `bool`, for every element `e` in `seq`][The sequence to search]]
+ [[`f`][A unary function object][The search predicate]]
+]
+
+[heading Expression Semantics]
+ __all__(seq, f);
+
+[*Return type]: `bool`
+
+[*Semantics]: Returns true if and only if `f(e)` evaluates to `true` for every element `e` in `seq`.
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/all.hpp>
+ #include <boost/fusion/include/all.hpp>
+
+[heading Example]
+ struct odd
+ {
+ template<typename T>
+ bool operator()(T t) const
+ {
+ return t % 2;
+ }
+ };
+ ...
+ assert(__all__(__make_vector__(1,3), odd()));
+ assert(!__all__(__make_vector__(1,2), odd()));
+
+[endsect]
+
+[section none]
+
+[heading Description]
+For a sequence `seq` and unary function object `f`, `none` returns true if `f` returns false for every element of `seq`.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ typename __result_of_none__<Sequence,F>::type none(
+ Sequence const& seq, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `f(e)` is a valid expression, convertible to `bool`, for every element `e` in `seq`][The sequence to search]]
+ [[`f`][A unary function object][The search predicate]]
+]
+
+[heading Expression Semantics]
+ __none__(seq, f);
+
+[*Return type]: `bool`
+
+[*Semantics]: Returns true if and only if `f(e)` evaluates to `false` for every element `e` in `seq`. Result equivalent to `!any(seq, f)`.
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/none.hpp>
+ #include <boost/fusion/include/none.hpp>
+
+[heading Example]
+ struct odd
+ {
+ template<typename T>
+ bool operator()(T t) const
+ {
+ return t % 2;
+ }
+ };
+ ...
+ assert(__none__(__make_vector__(2,4), odd()));
+ assert(!__none__(__make_vector__(1,2), odd()));
+
+[endsect]
+
+[section find]
+
+[heading Description]
+Finds the first element of a given type within a sequence.
+
+[heading Synopsis]
+ template<
+ typename T,
+ typename Sequence
+ >
+ __unspecified__ find(Sequence const& seq);
+
+ template<
+ typename T,
+ typename Sequence
+ >
+ __unspecified__ find(Sequence& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][The sequence to search]]
+ [[`T`][Any type][The type to search for]]
+]
+
+[heading Expression Semantics]
+ __find__<T>(seq)
+
+[*Return type]: A model of the same iterator category as the iterators of `seq`.
+
+[*Semantics]: Returns an iterator to the first element of `seq` of type `T`, or `__end__(seq)` if there is no such element.
+Equivalent to `__find_if__<boost::is_same<_, T> >(seq)`
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/find.hpp>
+ #include <boost/fusion/include/find.hpp>
+
+[heading Example]
+ const __vector__<char,int> vec('a','0');
+ assert(*__find__<int>(vec) == '0');
+ assert(__find__<double>(vec) == __end__(vec));
+
+[endsect]
+
+[section find_if]
+Finds the first element within a sequence with a type for which a given __mpl_lambda_expression__ evaluates to
+`boost::mpl::true_`.
+
+[heading Description]
+
+[heading Synopsis]
+ template<
+ typename F,
+ typename Sequence
+ >
+ __unspecified__ find_if(Sequence const& seq);
+
+ template<
+ typename F,
+ typename Sequence
+ >
+ __unspecified__ find_if(Sequence& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][The sequence to search]]
+ [[`F`][A unary __mpl_lambda_expression__][The search predicate]]
+]
+
+[heading Expression Semantics]
+ __find_if__<F>(seq)
+
+[*Return type]: An iterator of the same iterator category as the iterators of `seq`.
+
+[*Semantics]: Returns the first element of `seq` for which __mpl_lambda_expression__ `F` evaluates to `boost::mpl::true_`,
+or `__end__(seq)` if there is no such element.
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/find_if.hpp>
+ #include <boost/fusion/include/find_if.hpp>
+
+[heading Example]
+ const __vector__<double,int> vec(1.0,2);
+ assert(*__find_if__<is_integral<mpl::_> >(vec) == 2);
+ assert(__find_if__<is_class<mpl::_> >(vec) == __end__(vec));
+
+[endsect]
+
+[section count]
+
+[heading Description]
+Returns the number of elements of a given type within a sequence.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ typename __result_of_count__<Sequence, T>::type count(
+ Sequence const& seq, T const& t);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `e == t` must be a valid expression, convertible to `bool`, for each element `e` in `seq`][The sequence to search]]
+ [[`T`][Any type][The type to count]]
+]
+
+[heading Expression Semantics]
+ __count__(seq, t);
+
+[*Return type]: `int`
+
+[*Semantics]: Returns the number of elements of type `T` and equal to `t` in `seq`.
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+ #include <boost/fusion/algorithm/query/count.hpp>
+ #include <boost/fusion/include/count.hpp>
+
+[heading Example]
+ const __vector__<double,int,int> vec(1.0,2,3);
+ assert(__count__(vec,2) == 1);
+
+[endsect]
+
+[section count_if]
+
+[heading Description]
+Returns the number of elements within a sequence with a type for which a given unary function object evaluates to
+`true`.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ typename __result_of_count_if__<Sequence, F>::type count_if(
+ Sequence const& seq, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `f(e)` is a valid expression, convertible to `bool`, for each element `e` in `seq`][The sequence to search]]
+ [[`f`][A unary function object][The search predicate]]
+]
+
+[heading Expression Semantics]
+ __count_if__(seq, f)
+
+[*Return type]: `int`
+
+[*Semantics]: Returns the number of elements in `seq` where `f` evaluates to `true`.
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/count_if.hpp>
+ #include <boost/fusion/include/count_if.hpp>
+
+[heading Example]
+ const __vector__<int,int,int> vec(1,2,3);
+ assert(__count_if__(vec,odd()) == 2);
+
+[endsect]
+
+[endsect]
+
+[section Metafunctions]
+
+[section any]
+
+[heading Description]
+A metafunction returning the result type of __any__.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ struct any
+ {
+ typedef bool type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]]
+ [[`F`] [A model of unary __poly_func_obj__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_any__<Sequence, F>::type
+
+[*Return type]: `bool`.
+
+[*Semantics]: Returns the return type of __any__ given a sequence of type `Sequence` and a unary __poly_func_obj__ of type `F`. The return type is always `bool`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/any.hpp>
+ #include <boost/fusion/include/any.hpp>
+
+[endsect]
+
+[section all]
+
+[heading Description]
+A metafunction returning the result type of __all__.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ struct all
+ {
+ typedef bool type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]]
+ [[`F`] [A model of unary __poly_func_obj__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_all__<Sequence, F>::type
+
+[*Return type]: `bool`.
+
+[*Semantics]: Returns the return type of __all__ given a sequence of type `Sequence` and a unary __poly_func_obj__ of type `F`. The return type is always `bool`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/all.hpp>
+ #include <boost/fusion/include/all.hpp>
+
+[endsect]
+
+[section none]
+
+[heading Description]
+A metafunction returning the result type of __none__.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ struct none
+ {
+ typedef bool type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]]
+ [[`F`] [A model of unary __poly_func_obj__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_none__<Sequence, F>::type
+
+[*Return type]: `bool`.
+
+[*Semantics]: Returns the return type of __none__ given a sequence of type `Sequence` and a unary __poly_func_obj__ of type `F`. The return type is always `bool`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/none.hpp>
+ #include <boost/fusion/include/none.hpp>
+
+[endsect]
+
+[section find]
+
+[heading Description]
+Returns the result type of `find`, given the sequence and search types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ struct find
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [Model of __forward_sequence__] [Operation's argument]]
+ [[`T`] [Any type] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_find__<Sequence, T>::type
+
+[*Return type]: A model of the same iterator category as the iterators of `Sequence`.
+
+[*Semantics]: Returns an iterator to the first element of type `T` in `Sequence`, or `__result_of_end__<Sequence>::type` if there is no such element.
+
+[heading Complexity]
+Linear, at most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/find.hpp>
+ #include <boost/fusion/include/find.hpp>
+
+[endsect]
+
+[section find_if]
+
+[heading Description]
+Returns the result type of `find_if` given the sequence and predicate types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename Pred
+ >
+ struct find_if
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]]
+ [[`Pred`] [A model of __mpl_lambda_expression__] [Operation's arguments]]
+]
+
+[heading Expression Semantics]
+ __result_of_find_if__<Sequence, Pred>::type
+
+[*Return type]: A model of the same iterator category as the iterators of `Sequence`.
+
+[*Semantics]: Returns an iterator to the first element in `Sequence` for which `Pred` evaluates to true. Returns `__result_of_end__<Sequence>::type` if there is no such element.
+
+[heading Complexity]
+Linear. At most `__result_of_size__<Sequence>::value` comparisons.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/find_if.hpp>
+ #include <boost/fusion/include/find_if.hpp>
+
+[endsect]
+
+[section count]
+
+[heading Description]
+A metafunction that returns the result type of `count` given the sequence and search types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ struct count
+ {
+ typedef int type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [heading Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]]
+ [[`T`] [Any type] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_count__<T>::type
+
+[*Return type]: `int`.
+
+[*Semantics]: Returns the return type of __count__. The return type is always `int`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/count.hpp>
+ #include <boost/fusion/include/count.hpp>
+
+[endsect]
+
+[section count_if]
+
+[heading Description]
+A metafunction that returns the result type of `count_if` given the sequence and predicate types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename Pred
+ >
+ struct count_if
+ {
+ typedef int type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A model of __forward_sequence__] [Operation's argument]]
+ [[`Pred`] [A unary function object] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_count_if__<Sequence, Pred>::type
+
+[*Return type]: `int`.
+
+[*Semantics]: Returns the return type of __count_if__. The return type is always `int`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/query/count_if.hpp>
+ #include <boost/fusion/include/count_if.hpp>
+
+[endsect]
+
+[endsect]
+
+[endsect]
+
+[section Transformation]
+The transformation algorithms create new sequences out of existing sequences by performing some sort of transformation. In reality the new sequences are views onto the data in the original sequences.
+
+[note As the transformation algorithms return views onto their input arguments,
+it is important that the lifetime of the input arguments is greater than the
+period during which you wish to use the results.]
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation.hpp>
+ #include <boost/fusion/include/transformation.hpp>
+
+[section Functions]
+
+[section filter]
+
+[heading Description]
+For a given sequence, filter returns a new sequences containing only the elements of a specified type.
+
+[heading Synopsis]
+ template<
+ typename T,
+ typename Sequence
+ >
+ typename __result_of_filter__<Sequence const, T>::type filter(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`T`][Any type][The type to retain]]
+]
+
+[heading Expression Semantics]
+ __filter__<T>(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing all the elements of `seq` of type `T`.
+Equivalent to `__filter_if__<boost::same_type<_, T> >(seq)`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/filter.hpp>
+ #include <boost/fusion/include/filter.hpp>
+
+[heading Example]
+ const __vector__<int,int,long,long> vec(1,2,3,4);
+ assert(__filter__<int>(vec) == __make_vector__(1,2));
+
+[endsect]
+
+[section filter_if]
+
+[heading Description]
+For a given sequence, __filter_if__ returns a new sequences containing
+only the elements with types for which a given __mpl_lambda_expression__ evaluates to `boost::mpl::true_`.
+
+[heading Synopsis]
+ template<
+ typename Pred,
+ typename Sequence
+ >
+ typename __result_of_filter_if__<Sequence const, Pred>::type filter_if(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`Pred`][A unary __mpl_lambda_expression__][The predicate to filter by]]
+]
+
+[heading Expression Semantics]
+ __filter_if__<Pred>(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing all the elements of `seq` with types for which `Pred` evaluates
+to `boost::mpl::true_`. The order of the retained elements is the same as in the original sequence.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/filter_if.hpp>
+ #include <boost/fusion/include/filter_if.hpp>
+
+[heading Example]
+ const __vector__<int,int,double,double> vec(1,2,3.0,4.0);
+ assert(__filter_if__<is_integral<mpl::_> >(vec) == __make_vector__(1,2));
+
+[endsect]
+
+[section transform]
+
+[heading Description]
+For a sequence `seq` and function object or function pointer `f`, `transform` returns a new sequence
+with elements created by applying `f(e)` to each element of `e` of `seq`.
+
+[heading Unary version synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ typename __result_of_transform__<Sequence const, F>::type transform(
+ Sequence const& seq, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`f`][`f(e)` is a valid expression for each element `e` of `seq`. `__boost_result_of_call__<F(E)>::type` is the return type of `f` when called with a value of each element type `E`.][Transformation function]]
+]
+
+[heading Expression Semantics]
+ __transform__(seq, f);
+
+[*Return type]: A model of __forward_sequence__
+
+[*Semantics]: Returns a new sequence, containing the return values of `f(e)` for each element `e` within `seq`.
+
+[heading Binary version synopsis]
+ template<
+ typename Sequence1,
+ typename Sequence2,
+ typename F
+ >
+ typename __result_of_transform__<Sequence1 const, Sequence2 const, F>::type transform(
+ Sequence1 const& seq1, Sequence2 const& seq2, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq1`][A model of __forward_sequence__][Operation's argument]]
+ [[`seq2`][A model of __forward_sequence__][Operation's argument]]
+ [[`f`][`f(e1,e2)` is a valid expression for each pair of elements `e1` of `seq1` and `e2` of `seq2`. `__boost_result_of_call__<F(E1,E2)>::type` is the return type of `f` when called with elements of type `E1` and `E2`][Transformation function]]
+]
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing the return values of `f(e1, e2)` for each pair of elements `e1` and `e2` within `seq1` and `seq2` respectively.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/transform.hpp>
+ #include <boost/fusion/include/transform.hpp>
+
+[heading Example]
+ struct triple
+ {
+ typedef int result_type;
+
+ int operator()(int t) const
+ {
+ return t * 3;
+ };
+ };
+ ...
+ assert(__transform__(__make_vector__(1,2,3), triple()) == __make_vector__(3,6,9));
+
+[endsect]
+
+[section replace]
+
+[heading Description]
+Replaces each value within a sequence of a given type and value with a new value.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ typename __result_of_replace__<Sequence const, T>::type replace(
+ Sequence const& seq, T const& old_value, T const& new_value);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__, `e == old_value` is a valid expression, convertible to `bool`, for each element `e` in `seq` with type convertible to `T`][Operation's argument]]
+ [[`old_value`][Any type][Value to replace]]
+ [[`new_value`][Any type][Replacement value]]
+]
+
+[heading Expression Semantics]
+ __replace__(seq, old_value, new_value);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence with all the values of `seq` with `new_value` assigned to elements with the same type and equal to `old_value`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/replace.hpp>
+ #include <boost/fusion/include/replace.hpp>
+
+[heading Example]
+ assert(__replace__(__make_vector__(1,2), 2, 3) == __make_vector__(1,3));
+
+[endsect]
+
+[section replace_if]
+
+[heading Description]
+Replaces each element of a given sequence for which an unary function object evaluates to `true` replaced with
+a new value.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F,
+ typename T>
+ typename __result_of_replace_if__<Sequence const, F, T>::type replace_if(
+ Sequence const& seq, F f, T const& new_value);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`f`][A function object for which `f(e)` is a valid expression, convertible to `bool`, for each element `e` in `seq`][Operation's argument]]
+ [[`new_value`][Any type][Replacement value]]
+]
+
+[heading Expression Semantics]
+ __replace_if__(seq, f, new_value);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence with all the elements of `seq`,
+with `new_value` assigned to each element for which `f` evaluates to `true`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/replace_if.hpp>
+ #include <boost/fusion/include/replace_if.hpp>
+
+[heading Example]
+ struct odd
+ {
+ template<typename T>
+ bool operator()(T t) const
+ {
+ return t % 2;
+ }
+ };
+ ...
+ assert(__replace_if__(__make_vector__(1,2), odd(), 3) == __make_vector__(3,2));
+
+[endsect]
+
+[section remove]
+
+[heading Description]
+Returns a new sequence, with all the elements of the original sequence, except those of a given type.
+
+[heading Synopsis]
+ template<
+ typename T,
+ typename Sequence
+ >
+ typename __result_of_remove__<Sequence const, T>::type replace(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`T`][Any type][Type to remove]]
+]
+
+[heading Expression Semantics]
+ __remove__<T>(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq`, in their original order, except
+those of type `T`. Equivalent to `__remove_if__<boost::is_same<_,T> >(seq)`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/remove.hpp>
+ #include <boost/fusion/include/remove.hpp>
+
+[heading Example]
+ const __vector__<int,double> vec(1,2.0);
+ assert(__remove__<double>(vec) == __make_vector__(1));
+
+[endsect]
+
+[section remove_if]
+
+[heading Description]
+Returns a new sequence, containing all the elements of the original except those where a given unary
+function object evaluates to `true`.
+
+[heading Synopsis]
+ template<
+ typename Pred,
+ typename Sequence
+ >
+ typename __result_of_remove_if__<Sequence const, Pred>::type remove_if(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`Pred`][A model of unary __mpl_lambda_expression__][Removal predicate]]
+]
+
+[heading Expression Semantics]
+ __remove_if__<Pred>(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq`, in their original order, except
+those elements with types for which `Pred` evaluates to `boost::mpl::true_`.
+Equivalent to `__filter__<boost::mpl::not_<Pred> >(seq)`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/remove_if.hpp>
+ #include <boost/fusion/include/remove_if.hpp>
+
+[heading Example]
+ const __vector__<int,double> vec(1,2.0);
+ assert(__remove_if__<is_floating_point<mpl::_> >(vec) == __make_vector__(1));
+
+[endsect]
+
+[section reverse]
+
+[heading Description]
+Returns a new sequence with the elements of the original in reverse order.
+
+[heading Synposis]
+ template<
+ typename Sequence
+ >
+ typename __result_of_reverse__<Sequence const>::type reverse(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __bidirectional_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __reverse__(seq);
+
+[*Return type]: A model of __bidirectional_sequence__.
+
+[*Semantics]: Returns a new sequence containing all the elements of `seq` in reverse order.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/reverse.hpp>
+ #include <boost/fusion/include/reverse.hpp>
+
+[heading Example]
+ assert(__reverse__(__make_vector__(1,2,3)) == __make_vector__(3,2,1));
+
+[endsect]
+
+[section clear]
+
+[heading Description]
+__clear__ returns an empty sequence.
+
+[heading Synposis]
+ template<
+ typename Sequence
+ >
+ typename __result_of_clear__<Sequence const>::type clear(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __clear__(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Expression Semantics]: Returns a sequence with no elements.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/clear.hpp>
+ #include <boost/fusion/include/clear.hpp>
+
+[heading Example]
+ assert(__clear__(__make_vector__(1,2,3)) == __make_vector__());
+
+[endsect]
+
+[section erase]
+
+[heading Description]
+Returns a new sequence, containing all the elements of the original except those at a specified iterator, or
+between two iterators.
+
+[heading Synposis]
+ template<
+ typename Sequence,
+ typename First
+ >
+ typename __result_of_erase__<Sequence const, First>::type erase(
+ Sequence const& seq, First const& it1);
+
+ template<
+ typename Sequence,
+ typename First,
+ typename Last
+ >
+ typename __result_of_erase__<Sequence const, First, Last>::type erase(
+ Sequence const& seq, First const& it1, Last const& it2);
+
+[table Parameters
+ [[Parameters][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`it1`][A model of __forward_iterator__][Iterator into `seq`]]
+ [[`it2`][A model of __forward_iterator__][Iterator into `seq` after `it1`]]
+]
+
+[heading Expression Semantics]
+ __erase__(seq, pos);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq` except the element at `pos`.
+
+ __erase__(seq, first, last);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, with all the elements of `seq`, in their original order, except those
+in the range [`first`,`last`).
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/erase.hpp>
+ #include <boost/fusion/include/erase.hpp>
+
+[heading Example]
+ const __vector__<int, double, char> vec(1, 2.0, 'c');
+ assert(__erase__(vec, __next__(__begin__(vec))) == __make_vector__(1, 'c'));
+ assert(__erase__(vec, __next__(__begin__(vec)), __end__(vec)) == __make_vector__(1));
+
+[endsect]
+
+[section erase_key]
+
+[heading Description]
+For an __associative_sequence__ `seq`, returns a __forward_sequence__ containing all the
+elements of the original except those with a given key.
+
+[heading Synposis]
+ template<
+ typename Key,
+ typename Sequence
+ >
+ typename result_of::erase_key<Sequence const, Key>::type erase_key(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __associative_sequence__][Operation's argument]]
+ [[`Key`][Any type][Key to erase]]
+]
+
+[heading Expression Semantics]
+ __erase_key__<Key>(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq`, except those with key `Key`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/erase_key.hpp>
+ #include <boost/fusion/include/erase_key.hpp>
+
+[heading Example]
+ assert(__erase_key__<int>(__make_map__<int, long>('a', 'b')) == __make_map__<long>('b'));
+
+[endsect]
+
+[section insert]
+
+[heading Description]
+Returns a new sequence with all the elements of the original, an a new element inserted the
+position described by a given iterator.
+
+[heading Synposis]
+ template<
+ typename Sequence,
+ typename Pos,
+ typename T
+ >
+ __unspecified__ insert(Sequence const& seq, Pos const& pos, T const& t);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`pos`][A model of __forward_iterator__][The position to insert at]]
+ [[`t`][Any type][The value to insert]]
+]
+
+[heading Expression Semantics]
+ __insert__(seq, p, t);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq`, in their original order, and a new element with the
+type and value of `t` inserted at iterator `pos`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/insert.hpp>
+ #include <boost/fusion/include/insert.hpp>
+
+[heading Example]
+ const __vector__<int,int> vec(1,2);
+ assert(__insert__(vec, __next__(__begin__(vec)), 3) == __make_vector__(1,3,2));
+
+[endsect]
+
+[section insert_range]
+
+[heading Description]
+Returns a new sequence with another sequence inserted at a specified iterator.
+
+[heading Synposis]
+ template<
+ typename Sequence,
+ typename Pos,
+ typename Range
+ >
+ typename __result_of_insert_range__<Sequence const, Pos, Range>::type insert_range(
+ Sequence const& seq, Pos const& pos, Range const& range);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`pos`][A model of __forward_iterator__][The position to insert at]]
+ [[`range`][A model of __forward_sequence__][Range to insert]]
+]
+
+[heading Expression Semantics]
+ __insert__(seq, pos, range);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and the elements of
+`range` inserted at iterator `pos`. All elements retaining their ordering from the orignal sequences.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/insert_range.hpp>
+ #include <boost/fusion/include/insert_range.hpp>
+
+[heading Example]
+ const __vector__<int,int> vec(1,2);
+ assert(__insert_range__(vec, __next__(__begin__(vec)), __make_vector__(3,4)) == __make_vector__(1,3,4,2));
+
+[endsect]
+
+[section join]
+
+[heading Description]
+Takes 2 sequences and returns a sequence containing the elements of the first followed by the elements of the second.
+
+[heading Synopsis]
+ template<
+ typename LhSequence,
+ typename RhSequence>
+ typename __result_of_join__<LhSequence, RhSequence>::type join(LhSequence const& lhs, RhSequence const& rhs);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`lhs`][A model of __forward_sequence__][Operation's argument]]
+ [[`rhs`][A model of __forward_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __join__(lhs, rhs);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing all the elements of `lhs` followed by all the elements of `rhs`. The order of th elements is preserved.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/join.hpp>
+ #include <boost/fusion/include/join.hpp>
+
+[heading Example]
+ __vector__<int,char> v1(1, 'a');
+ __vector__<int,char> v2(2, 'b');
+ assert(__join__(v1, v2) == __make_vector__(1,'a',2,'b'));
+
+[endsect]
+
+[section zip]
+
+[heading Description]
+Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences.
+
+[heading Synopsis]
+ template<
+ typename Sequence1,
+ typename Sequence2,
+ ...
+ typename SequenceN
+ >
+ typename __result_of_zip__<Sequence1, Sequence2, ... SequenceN>::type
+ zip(Sequence1 const& seq1, Sequence2 const& seq2, ... SequenceN const& seqN);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq1` to `seqN`][Each sequence is a model of __forward_sequence__.][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __zip__(seq1, seq2, ... seqN);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing tuples of elements from sequences `seq1` to `seqN`. For example, applying zip to tuples `(1, 2, 3)` and `('a', 'b', 'c')` would return `((1, 'a'),(2, 'b'),(3, 'c'))`
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/zip.hpp>
+ #include <boost/fusion/include/zip.hpp>
+
+[heading Example]
+ __vector__<int,char> v1(1, 'a');
+ __vector__<int,char> v2(2, 'b');
+ assert(__zip__(v1, v2) == __make_vector__(__make_vector__(1, 2),__make_vector__('a', 'b'));
+
+[endsect]
+
+[section pop_back]
+
+[heading Description]
+Returns a new sequence, with the last element of the original removed.
+
+[heading Synopsis]
+ template<
+ typename Sequence
+ >
+ typename __result_of_pop_back__<Sequence const>::type pop_back(Sequence const& seq);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __pop_back__(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence containing all the elements of `seq`, except the last element. The elements in the new sequence are in the same order as they were in `seq`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/pop_back.hpp>
+ #include <boost/fusion/include/pop_back.hpp>
+
+[heading Example]
+ assert(___pop_back__(__make_vector__(1,2,3)) == __make_vector__(1,2));
+
+[endsect]
+
+[section pop_front]
+
+[heading Description]
+Returns a new sequence, with the first element of the original removed.
+
+[heading Synopsis]
+ template<
+ typename Sequence
+ >
+ typename __result_of_pop_front__<Sequence const>::type pop_front(Sequence const& seq);
+
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __pop_front__(seq);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence containing all the elements of `seq`, except the first element. The elements in the new sequence are in the same order as they were in `seq`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/pop_front.hpp>
+ #include <boost/fusion/include/pop_front.hpp>
+
+[heading Example]
+ assert(__pop_front__(__make_vector__(1,2,3)) == __make_vector__(2,3));
+
+[endsect]
+
+[section push_back]
+
+[heading Description]
+Returns a new sequence with an element added at the end.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ typename __result_of_push_back__<Sequence, T>::type push_back(
+ Sequence const& seq, T const& t);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`t`][Any type][The value to add to the end]]
+]
+
+[heading Expression Semantics]
+ __push_back__(seq, t);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and new element `t` appended to the end. The elements are in the same order as they were in `seq`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/push_back.hpp>
+ #include <boost/fusion/include/push_back.hpp>
+
+[heading Example]
+ assert(__push_back__(__make_vector__(1,2,3),4) == __make_vector__(1,2,3,4));
+
+[endsect]
+
+[section push_front]
+
+[heading Description]
+Returns a new sequence with an element added at the beginning.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ typename __result_of_push_front__<Sequence, T>::type push_front(
+ Sequence const& seq, T const& t);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`t`][Any type][The value to add to the beginning]]
+]
+
+[heading Expression Semantics]
+ __push_back__(seq, t);
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing all the elements of `seq`, and new element `t` appended to the beginning. The elements are in the same order as they were in `seq`.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/push_front.hpp>
+ #include <boost/fusion/include/push_front.hpp>
+
+[heading Example]
+ assert(__push_front__(__make_vector__(1,2,3),0) == __make_vector__(0,1,2,3));
+
+[endsect]
+
+[endsect]
+
+[section Metafunctions]
+
+[section filter]
+
+[heading Description]
+Returns the result type of __filter__ given the sequence type and type to retain.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ struct filter
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameter
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`][A model of __forward_sequence__] [Operation's argument]]
+ [[`T`][Any type][Type to retain]]
+]
+
+[heading Expression Semantics]
+ __result_of_filter__<Sequence, T>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing the elements of `Sequence` that are of type `T`. Equivalent to `__result_of_filter_if__<Sequence, boost::is_same<mpl::_, T> >::type`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/filter.hpp>
+ #include <boost/fusion/include/filter.hpp>
+
+[endsect]
+
+[section filter_if]
+
+[heading Description]
+Returns the result type of __filter_if__ given the sequence and unary __mpl_lambda_expression__ predicate type.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename Pred
+ >
+ struct filter_if
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameter
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`][A model of __forward_sequence__] [Operation's argument]]
+ [[`Pred`][A unary __mpl_lambda_expression__][Type to retain]]
+]
+
+[heading Expression Semantics]
+ __result_of_filter_if__<Sequence, Pred>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing the elements of `Sequence` for which `Pred` evaluates to `boost::mpl::true_`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/filter_if.hpp>
+ #include <boost/fusion/include/filter_if.hpp>
+
+[endsect]
+
+[section transform]
+
+[heading Description]
+For a sequence `seq` and function object or function pointer `f`, `transform` returns a new sequence
+with elements created by applying `f(e)` to each element of `e` of `seq`.
+
+[heading Unary version synopsis]
+ template<
+ typename Sequence,
+ typename F
+ >
+ typename __result_of_transform__<Sequence const, F>::type transform(
+ Sequence const& seq, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq`][A model of __forward_sequence__][Operation's argument]]
+ [[`f`][`f(e)` is a valid expression for each element `e` of `seq`. `__boost_result_of_call__<F(E)>::type` is the return type of `f` when called with a value of each element type `E`.][Transformation function]]
+]
+
+[heading Expression Semantics]
+ __transform__(seq, f);
+
+[*Return type]: A model of __forward_sequence__
+
+[*Semantics]: Returns a new sequence, containing the return values of `f(e)` for each element `e` within `seq`.
+
+[heading Binary version synopsis]
+ template<
+ typename Sequence1,
+ typename Sequence2,
+ typename F
+ >
+ typename __result_of_transform__<Sequence1 const, Sequence2 const, F>::type transform(
+ Sequence1 const& seq1, Sequence2 const& seq2, F f);
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`seq1`][A model of __forward_sequence__][Operation's argument]]
+ [[`seq2`][A model of __forward_sequence__][Operation's argument]]
+ [[`f`][`f(e1,e2)` is a valid expression for each pair of elements `e1` of `seq1` and `e2` of `seq2`. `__boost_result_of_call__<F(E1,E2)>::type` is the return type of `f` when called with elements of type `E1` and `E2`][Transformation function]]
+]
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence, containing the return values of `f(e1, e2)` for each pair of elements `e1` and `e2` within `seq1` and `seq2` respectively.
+
+[heading Complexity]
+Constant. Returns a view which is lazily evaluated.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/transform.hpp>
+ #include <boost/fusion/include/transform.hpp>
+
+[heading Example]
+ struct triple
+ {
+ typedef int result_type;
+
+ int operator()(int t) const
+ {
+ return t * 3;
+ };
+ };
+ ...
+ assert(__transform__(__make_vector__(1,2,3), triple()) == __make_vector__(3,6,9));
+
+[endsect]
+
+[section replace]
+
+[heading Description]
+Returns the result type of __replace__, given the types of the input sequence and element to replace.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ struct replace
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`T`][Any type][The type of the search and replacement objects]]
+]
+
+[heading Expression Semantics]
+ __result_of_replace__<Sequence,T>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns the return type of __replace__.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/replace.hpp>
+ #include <boost/fusion/include/replace.hpp>
+
+[endsect]
+
+[section replace_if]
+
+[heading Description]
+Returns the result type of __replace_if__, given the types of the sequence, __poly_func_obj__ predicate and replacement object.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename F,
+ typename T>
+ struct replace_if
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`F`][A model of unary __poly_func_obj__][Replacement predicate]]
+ [[`T`][Any type][The type of the replacement object]]
+]
+
+[heading Expression Semantics]
+ __result_of_replace_if__<Sequence,F,T>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns the return type of __replace_if__.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/replace_if.hpp>
+ #include <boost/fusion/include/replace_if.hpp>
+
+[endsect]
+
+[section remove]
+
+[heading Description]
+Returns the result type of __remove__, given the sequence and removal types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ struct remove
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`T`][Any type][Remove elements of this type]]
+]
+
+[heading Expression Semantics]
+ __result_of_remove__<Sequence, T>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing the elements of `Sequence` not of type `T`. Equivalent to `__result_of_replace_if__<Sequence, boost::is_same<mpl::_, T> >::type`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/remove.hpp>
+ #include <boost/fusion/include/remove.hpp>
+
+[endsect]
+
+[section remove_if]
+
+[heading Description]
+Returns the result type of __remove_if__, given the input sequence and unary __mpl_lambda_expression__ predicate types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename Pred
+ >
+ struct remove_if
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`Pred`][A model of unary __mpl_lambda_expression__][Remove elements which evaluate to `boost::mpl::true_`]]
+]
+
+[heading Expression Semantics]
+ __result_of_remove_if__<Sequence, Pred>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing the elements of `Sequence` for which `Pred` evaluates to `boost::mpl::false_`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/remove_if.hpp>
+ #include <boost/fusion/include/remove_if.hpp>
+
+[endsect]
+
+[section reverse]
+
+[heading Description]
+Returns the result type of __reverse__, given the input sequence type.
+
+[heading Synopsis]
+ template<
+ typename Sequence
+ >
+ struct reverse
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __bidirectional_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_reverse__<Sequence>::type
+
+[*Return type]: A model of __bidirectional_sequence__.
+
+[*Semantics]: Returns a sequence with the elements in the reverse order to `Sequence`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/reverse.hpp>
+ #include <boost/fusion/include/reverse.hpp>
+
+[endsect]
+
+[section clear]
+
+[heading Description]
+Returns the result type of __clear__, given the input sequence type.
+
+[heading Synopsis]
+ template<
+ typename Sequence
+ >
+ struct clear
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][Any type][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_clear__<Sequence>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns an empty sequence.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/clear.hpp>
+ #include <boost/fusion/include/clear.hpp>
+
+[endsect]
+
+[section erase]
+Returns the result type of __erase__, given the input sequence and range delimiting iterator types.
+
+[heading Description]
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename It1,
+ typename It2 = __unspecified__>
+ struct erase
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`It1`][A model of __forward_iterator__][Operation's argument]]
+ [[`It2`][A model of __forward_iterator__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_erase__<Sequence, It1>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence with the element at `It1` removed.
+
+ __result_of_erase__<Sequence, It1, It2>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a new sequence with the elements between `It1` and `It2` removed.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/erase.hpp>
+ #include <boost/fusion/include/erase.hpp>
+
+[endsect]
+
+[section erase_key]
+
+[heading Description]
+Returns the result type of __erase_key__, given the sequence and key types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename Key
+ >
+ struct erase_key
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __associative_sequence__][Operation's argument]]
+ [[`Key`][Any type][Key type]]
+]
+
+[heading Expression Semantics]
+ __result_of_erase_key__<Sequence, Key>::type
+
+[*Return type]: A model of __associative_sequence__.
+
+[*Semantics]: Returns a sequence with the elements of `Sequence`, except those with key `Key`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/erase_key.hpp>
+ #include <boost/fusion/include/erase_key.hpp>
+
+[endsect]
+
+[section insert]
+
+[heading Description]
+Returns the result type of __insert__, given the sequence, position iterator and insertion types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename Position,
+ typename T
+ >
+ struct insert
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`Position`][A model of __forward_iterator__][Operation's argument]]
+ [[`T`][Any type][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_insert__<Sequence, Position, T>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence with an element of type `T` inserted at position `Position` in `Sequence`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/insert.hpp>
+ #include <boost/fusion/include/insert.hpp>
+
+[endsect]
+
+[section insert_range]
+
+[heading Description]
+Returns the result type of __insert_range__, given the input sequence, position iterator and insertion range types.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename Position,
+ typename Range
+ >
+ struct insert_range
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`Position`][A model of __forward_iterator__][Operation's argument]]
+ [[`Range`][A model of __forward_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_insert_range__<Sequence, Position, Range>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence with the elements of `Range` inserted at position `Position` into `Sequence`.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/insert_range.hpp>
+ #include <boost/fusion/include/insert_range.hpp>
+
+[endsect]
+
+[section join]
+
+[heading Description]
+Returns the result of joining 2 sequences, given the sequence types.
+
+[heading Synopsis]
+ template<
+ typename LhSequence,
+ typename RhSequence
+ >
+ struct join
+ {
+ typedef __unspecified__ type;
+ };
+
+[heading Expression Semantics]
+ __result_of_join__<LhSequence, RhSequence>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence containing the elements of `LhSequence` followed by the elements of `RhSequence`. The order of the elements in the 2 sequences is preserved.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/join.hpp>
+ #include <boost/fusion/include/join.hpp>
+
+[endsect]
+
+[section zip]
+
+[heading Description]
+Zips sequences together to form a single sequence, whos members are tuples of the members of the component sequences.
+
+[heading Synopsis]
+ template<
+ typename Sequence1,
+ typename Sequence2,
+ ...
+ typename SequenceN
+ >
+ struct zip
+ {
+ typedef __unspecified__ type;
+ };
+
+[heading Expression Semantics]
+ __result_of_zip__<Sequence1, Sequence2, ... SequenceN>::type
+
+[*Return type]: A model of the most restrictive traversal category of sequences `Sequence1` to `SequenceN`.
+
+[*Semantics]: Return a sequence containing tuples of elements from each sequence. For example, applying zip to tuples `(1, 2, 3)` and `('a', 'b', 'c')` would return `((1, 'a'),(2, 'b'),(3, 'c'))`
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/transformation/zip.hpp>
+ #include <boost/fusion/include/zip.hpp>
+
+[endsect]
+
+[section pop_back]
+
+[heading Description]
+Returns the result type of __pop_back__, given the input sequence type.
+
+[heading Synopsis]
+ template<
+ typename Sequence
+ >
+ struct pop_back
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_pop_back__<Sequence>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence with all the elements of `Sequence` except the last element.
+
+[heading Complexity]
+Constant.
+
+[heading Header]
+
+ #include <boost/fusion/algorithm/tranformation/pop_back.hpp>
+ #include <boost/fusion/include/pop_back.hpp>
+
+[endsect]
+
+[section pop_front]
+
+[heading Description]
+Returns the result type of __pop_front__, given the input sequence type.
+
+[heading Synopsis]
+ template<
+ typename Sequence
+ >
+ struct pop_front
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_pop_front__<Sequence>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence with all the elements of `Sequence` except the first element.
+
+[heading Complexity]
+Constant.
+
+/algorithm/transformation/pop_front.hpp>
+
+[endsect]
+
+[section push_back]
+
+[heading Description]
+Returns the result type of __push_back__, given the types of the input sequence and element to push.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ struct push_back
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`T`][Any type][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_push_back__<Sequence, T>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence with the elements of `Sequence` and an element of type `T` added to the end.
+
+[heading Complexity]
+Constant.
+
+/algorithm/transformation/push_back.hpp>
+
+[endsect]
+
+[section push_front]
+
+[heading Description]
+Returns the result type of __push_front__, given the types of the input sequence and element to push.
+
+[heading Synopsis]
+ template<
+ typename Sequence,
+ typename T
+ >
+ struct push_front
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter][Requirement][Description]]
+ [[`Sequence`][A model of __forward_sequence__][Operation's argument]]
+ [[`T`][Any type][Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_push_front__<Sequence, T>::type
+
+[*Return type]: A model of __forward_sequence__.
+
+[*Semantics]: Returns a sequence with the elements of `Sequence` and an element of type `T` added to the beginning.
+
+[heading Complexity]
+Constant.
+
+/algorithm/transformation/push_front.hpp>
+
+[endsect]
+
+[endsect]
+
+[endsect]
+
+[endsect]

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/changelog.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/changelog.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,25 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Change log]
+
+This section summarizes significant changes to the Fusion library.
+
+* Sep 27, 2006: Added `boost::tuple` support. (Joel de Guzman)
+* Nov 17, 2006: Added `boost::variant` support. (Joel de Guzman)
+* Feb 15, 2007: Added functional module. (Tobias Schwinger)
+* APRIL 2, 2007: Added struct adapter. (Joel de Guzman)
+* May 8, 2007: Added associative struct adapter. (Dan Marsden)
+* Dec 20, 2007: Removed `boost::variant` support. After thorough
+ investigation, I think now that the move to make variant a
+ fusion sequence is rather quirky. A variant will always
+ have a size==1 regardless of the number of types it can contain
+ and there's no way to know at compile time what it contains.
+ Iterating over its types is simply wrong. All these imply that
+ the variant is *not* a fusion sequence. (Joel de Guzman)
+
+[endsect]

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/container.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/container.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,1647 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Container]
+
+Fusion provides a few predefined sequences out of the box. These
+/containers/ actually hold heterogenously typed data; unlike
+__views__. These containers are more or less counterparts of those in __stl__.
+
+[heading Header]
+
+ #include <boost/fusion/container.hpp>
+ #include <boost/fusion/include/container.hpp>
+
+[section vector]
+
+[heading Description]
+
+`vector` is a __random_access_sequence__ of heterogenous typed
+data structured as a simple `struct` where each element is held
+as a member variable. `vector` is the simplest of the Fusion
+sequence container, and in many cases the most efficient.
+
+[heading Header]
+
+ #include <boost/fusion/container/vector.hpp>
+ #include <boost/fusion/include/vector.hpp>
+ #include <boost/fusion/container/vector/vector_fwd.hpp>
+ #include <boost/fusion/include/vector_fwd.hpp>
+
+ // numbered forms
+ #include <boost/fusion/container/vector/vector10.hpp>
+ #include <boost/fusion/include/vector10.hpp>
+ #include <boost/fusion/container/vector/vector20.hpp>
+ #include <boost/fusion/include/vector20.hpp>
+ #include <boost/fusion/container/vector/vector30.hpp>
+ #include <boost/fusion/include/vector30.hpp>
+ #include <boost/fusion/container/vector/vector40.hpp>
+ #include <boost/fusion/include/vector40.hpp>
+ #include <boost/fusion/container/vector/vector50.hpp>
+ #include <boost/fusion/include/vector50.hpp>
+
+[heading Synopsis]
+
+[*Numbered forms]
+
+ struct vector0;
+
+ template <typename T0>
+ struct vector1;
+
+ template <typename T0, typename T1>
+ struct vector2;
+
+ template <typename T0, typename T1, typename T2>
+ struct vector3;
+
+ ...
+
+ template <typename T0, typename T1, typename T2..., typename TN>
+ struct vectorN;
+
+[*Variadic form]
+
+ template <
+ typename T0 = __unspecified__
+ , typename T1 = __unspecified__
+ , typename T2 = __unspecified__
+ ...
+ , typename TN = __unspecified__
+ >
+ struct vector;
+
+The numbered form accepts the exact number of elements. Example:
+
+ vector3<int, char, double>
+
+The variadic form accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements, where
+`FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that
+defaults to `10`. Example:
+
+ vector<int, char, double>
+
+You may define the preprocessor constant `FUSION_MAX_VECTOR_SIZE` before
+including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_VECTOR_SIZE 20
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`T0`...`TN`] [Element types] [['unspecified]]]
+]
+
+[heading Model of]
+
+* __random_access_sequence__
+
+[variablelist Notation
+ [[`v`] [Instance of `vector`]]
+ [[`V`] [A `vector` type]]
+ [[`e0`...`en`] [Heterogeneous values]]
+ [[`s`] [A __forward_sequence__]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __random_access_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`V()`] [Creates a vector with default constructed elements.]]
+ [[`V(e0, e1,... en)`] [Creates a vector with elements `e0`...`en`.]]
+ [[`V(s)`] [Copy constructs a vector from a __forward_sequence__, `s`.]]
+ [[`v = s`] [Assigns to a vector, `v`, from a __forward_sequence__, `s`.]]
+]
+
+[heading Example]
+
+ vector<int, float> v(12, 5.5f);
+ std::cout << __at_c__<0>(v) << std::endl;
+ std::cout << __at_c__<1>(v) << std::endl;
+
+[endsect]
+
+[section cons]
+
+[heading Description]
+
+`cons` is a simple __forward_sequence__. It is a lisp style recursive list
+structure where `car` is the /head/ and `cdr` is the /tail/: usually
+another cons structure or `nil`: the empty list. Fusion's __list__ is built
+on top of this more primitive data structure. It is more efficient than
+__vector__ when the target sequence is constructed piecemeal (a data at a
+time). The runtime cost of access to each element is peculiarly constant
+(see __recursive_inline__).
+
+[heading Header]
+
+ #include <boost/fusion/container/list/cons.hpp>
+ #include <boost/fusion/include/cons.hpp>
+
+[heading Synopsis]
+
+ template <typename Car, typename Cdr = nil>
+ struct cons;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Car`] [Head type] []]
+ [[`Cdr`] [Tail type] [`nil`]]
+]
+
+[heading Model of]
+
+* __forward_sequence__
+
+[variablelist Notation
+ [[`nil`] [An empty `cons`]]
+ [[`C`] [A `cons` type]]
+ [[`l`, `l2`] [Instances of `cons`]]
+ [[`car`] [An arbitrary data]]
+ [[`cdr`] [Another `cons` list]]
+ [[`s`] [A __forward_sequence__]]
+ [[`N`] [An __mpl_integral_constant__]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`nil()`] [Creates an empty list.]]
+ [[`C()`] [Creates a cons with default constructed elements.]]
+ [[`C(car)`] [Creates a cons with `car` head and default constructed tail.]]
+ [[`C(car, cdr)`] [Creates a cons with `car` head and `cdr` tail.]]
+ [[`C(s)`] [Copy constructs a cons from a __forward_sequence__, `s`.]]
+ [[`l = s`] [Assigns to a cons, `l`, from a __forward_sequence__, `s`.]]
+ [[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]]
+]
+
+[blurb __note__ `__at__<N>(l)` is provided for convenience and compatibility
+with the original __tuple__ library, despite `cons` being a
+__forward_sequence__ only (`at` is supposed to be a
+__random_access_sequence__ requirement). The runtime complexity of __at__ is
+constant (see __recursive_inline__).]
+
+[heading Example]
+
+ cons<int, cons<float> > l(12, cons<float>(5.5f));
+ std::cout << __at_c__<0>(l) << std::endl;
+ std::cout << __at_c__<1>(l) << std::endl;
+
+[endsect]
+
+[section list]
+
+[heading Description]
+
+`list` is a __forward_sequence__ of heterogenous typed data.
+The runtime cost of access to each element is peculiarly constant
+(see __recursive_inline__).
+
+[heading Header]
+
+ #include <boost/fusion/container/list.hpp>
+ #include <boost/fusion/include/list.hpp>
+ #include <boost/fusion/container/list/list_fwd.hpp>
+ #include <boost/fusion/include/list_fwd.hpp>
+
+[heading Synopsis]
+
+ template <
+ typename T0 = __unspecified__
+ , typename T1 = __unspecified__
+ , typename T2 = __unspecified__
+ ...
+ , typename TN = __unspecified__
+ >
+ struct list;
+
+The variadic class interface accepts `0` to `FUSION_MAX_LIST_SIZE`
+elements, where `FUSION_MAX_LIST_SIZE` is a user definable predefined
+maximum that defaults to `10`. Example:
+
+ list<int, char, double>
+
+You may define the preprocessor constant `FUSION_MAX_LIST_SIZE` before
+including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_LIST_SIZE 20
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`T0`...`TN`] [Element types] [['unspecified-type]]]
+]
+
+[heading Model of]
+
+* __forward_sequence__
+
+[variablelist Notation
+ [[`L`] [A `list` type]]
+ [[`l`] [An instance of `list`]]
+ [[`e0`...`en`] [Heterogeneous values]]
+ [[`s`] [A __forward_sequence__]]
+ [[`N`] [An __mpl_integral_constant__]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`L()`] [Creates a list with default constructed elements.]]
+ [[`L(e0, e1,... en)`] [Creates a list with elements `e0`...`en`.]]
+ [[`L(s)`] [Copy constructs a list from a __forward_sequence__, `s`.]]
+ [[`l = s`] [Assigns to a list, `l`, from a __forward_sequence__, `s`.]]
+ [[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]]
+]
+
+[blurb __note__ `__at__<n>(l)` is provided for convenience and compatibility
+with the original __tuple__ library, despite `list` being a
+__forward_sequence__ only (__at__ is supposed to be a
+__random_access_sequence__ requirement). The runtime complexity of __at__ is
+constant (see __recursive_inline__).]
+
+[heading Example]
+
+ list<int, float> l(12, 5.5f);
+ std::cout << __at_c__<0>(l) << std::endl;
+ std::cout << __at_c__<1>(l) << std::endl;
+
+[endsect]
+
+[section set]
+
+[heading Description]
+
+set is an __associative_sequence__ of heteregenous typed data elements.
+Type identity is used to impose an equivalence relation on keys. The
+element's type is its key. A set may contain at most one element for each
+key. Membership testing and element key lookup has constant runtime
+complexity (see __overloaded_functions__).
+
+[heading Header]
+
+ #include <boost/fusion/container/set.hpp>
+ #include <boost/fusion/include/set.hpp>
+ #include <boost/fusion/container/set_fwd.hpp>
+ #include <boost/fusion/include/set_fwd.hpp>
+
+[heading Synopsis]
+
+ template <
+ typename T0 = __unspecified__
+ , typename T1 = __unspecified__
+ , typename T2 = __unspecified__
+ ...
+ , typename TN = __unspecified__
+ >
+ struct set;
+
+The variadic class interface accepts `0` to `FUSION_MAX_SET_SIZE` elements,
+where `FUSION_MAX_SET_SIZE` is a user definable predefined maximum that
+defaults to `10`. Example:
+
+ set<int, char, double>
+
+You may define the preprocessor constant `FUSION_MAX_SET_SIZE` before
+including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_SET_SIZE 20
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`T0`...`TN`] [Element types] [['unspecified-type]]]
+]
+
+[heading Model of]
+
+* __associative_sequence__
+* __forward_sequence__
+
+[variablelist Notation
+ [[`S`] [A `set` type]]
+ [[`s`] [An instance of `set`]]
+ [[`e0`...`en`] [Heterogeneous values]]
+ [[`fs`] [A __forward_sequence__]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __random_access_sequence__ and __associative_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`S()`] [Creates a set with default constructed elements.]]
+ [[`S(e0, e1,... en)`] [Creates a set with elements `e0`...`en`.]]
+ [[`S(fs)`] [Copy constructs a set from a __forward_sequence__ `fs`.]]
+ [[`s = fs`] [Assigns to a set, `s`, from a __forward_sequence__ `fs`.]]
+]
+
+[heading Example]
+
+ typedef set<int, float> S;
+ S s(12, 5.5f);
+ std::cout << __at_key__<int>(s) << std::endl;
+ std::cout << __at_key__<float>(s) << std::endl;
+ std::cout << __result_of_has_key__<S, double>::value << std::endl;
+
+[endsect]
+
+[section map]
+
+[heading Description]
+
+map is an __associative_sequence__ of heteregenous typed data elements.
+Each element is a key/data pair (see __fusion_pair__) where the key has no
+data (type only). Type identity is used to impose an equivalence relation
+on keys. A map may contain at most one element for each key. Membership
+testing and element key lookup has constant runtime complexity (see
+__overloaded_functions__).
+
+[heading Header]
+
+ #include <boost/fusion/container/map.hpp>
+ #include <boost/fusion/include/map.hpp>
+ #include <boost/fusion/container/map_fwd.hpp>
+ #include <boost/fusion/include/map_fwd.hpp>
+
+[heading Synopsis]
+
+ template <
+ typename T0 = __unspecified__
+ , typename T1 = __unspecified__
+ , typename T2 = __unspecified__
+ ...
+ , typename TN = __unspecified__
+ >
+ struct map;
+
+The variadic class interface accepts `0` to `FUSION_MAX_MAP_SIZE` elements,
+where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that
+defaults to `10`. Example:
+
+ map<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> >
+
+You may define the preprocessor constant `FUSION_MAX_MAP_SIZE` before
+including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_MAP_SIZE 20
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`T0`...`TN`] [Element types] [['unspecified-type]]]
+]
+
+[heading Model of]
+
+* __associative_sequence__
+* __forward_sequence__
+
+[variablelist Notation
+ [[`M`] [A `map` type]]
+ [[`m`] [An instance of `map`]]
+ [[`e0`...`en`] [Heterogeneous key/value pairs (see __fusion_pair__)]]
+ [[`s`] [A __forward_sequence__]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __random_access_sequence__ and __associative_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`M()`] [Creates a map with default constructed elements.]]
+ [[`M(e0, e1,... en)`] [Creates a map with element pairs `e0`...`en`.]]
+ [[`M(s)`] [Copy constructs a map from a __forward_sequence__ `s`.]]
+ [[`m = s`] [Assigns to a map, `m`, from a __forward_sequence__ `s`.]]
+]
+
+[heading Example]
+
+ typedef map<
+ __pair__<int, char>
+ , __pair__<double, std::string> >
+ map_type;
+
+ map_type m(
+ __fusion_make_pair__<int>('X')
+ , __fusion_make_pair__<double>("Men"));
+
+ std::cout << __at_key__<int>(m) << std::endl;
+ std::cout << __at_key__<double>(m) << std::endl;
+
+[endsect]
+
+[section Generation]
+
+These are the functions that you can use to generate various forms of
+__containers__ from elemental values.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation.hpp>
+ #include <boost/fusion/include/generation.hpp>
+
+[section Functions]
+
+[section make_list]
+
+[heading Description]
+
+Create a __list__ from one or more values.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ typename __result_of_make_list__<T0, T1,... TN>::type
+ make_list(T0 const& x0, T1 const& x1... TN const& xN);
+
+The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where
+`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults
+to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE`
+before including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_LIST_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_list`]]
+]
+
+[heading Expression Semantics]
+
+ make_list(x0, x1,... xN);
+
+[*Return type]: __result_of_make_list__`<T0, T1,... TN>::type`
+
+[*Semantics]: Create a __list__ from `x0, x1,... xN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_list.hpp>
+ #include <boost/fusion/include/make_list.hpp>
+
+[heading Example]
+
+ make_list(123, "hello", 12.5)
+
+[heading See also]
+
+__note_boost_ref__
+
+[endsect]
+
+[section make_cons]
+
+[heading Description]
+
+Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/).
+
+[heading Synopsis]
+
+ template <typename Car>
+ typename __result_of_make_cons__<Car>::type
+ make_cons(Car const& car);
+
+ template <typename Car, typename Cdr>
+ typename __result_of_make_cons__<Car, Cdr>::type
+ make_cons(Car const& car, Cdr const& cdr);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`car`] [Instance of `Car`] [The list's head]]
+ [[`cdr`] [Instance of `Cdr`] [The list's tail (optional)]]
+]
+
+[heading Expression Semantics]
+
+ make_cons(car, cdr);
+
+[*Return type]: __result_of_make_cons__`<Car, Cdr>::type` or
+__result_of_make_cons__`<Car>::type`
+
+[*Semantics]: Create a __cons__ from `car` (/head/) and optional `cdr` (/tail/).
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_cons.hpp>
+ #include <boost/fusion/include/make_cons.hpp>
+
+[heading Example]
+
+ make_cons('x', make_cons(123))
+
+[heading See also]
+
+__note_boost_ref__
+
+[endsect]
+
+[section make_vector]
+
+[heading Description]
+
+Create a __vector__ from one or more values.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ typename __result_of_make_vector__<T0, T1,... TN>::type
+ make_vector(T0 const& x0, T1 const& x1... TN const& xN);
+
+The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements,
+where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_VECTOR_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_vector`]]
+]
+
+[heading Expression Semantics]
+
+ make_vector(x0, x1,... xN);
+
+[*Return type]: __result_of_make_vector__`<T0, T1,... TN>::type`
+
+[*Semantics]: Create a __vector__ from `x0, x1,... xN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_vector.hpp>
+ #include <boost/fusion/include/make_vector.hpp>
+
+[heading Example]
+
+ make_vector(123, "hello", 12.5)
+
+[heading See also]
+
+__note_boost_ref__
+
+[endsect]
+
+[section make_set]
+
+[heading Description]
+
+Create a __set__ from one or more values.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ typename __result_of_make_set__<T0, T1,... TN>::type
+ make_set(T0 const& x0, T1 const& x1... TN const& xN);
+
+The variadic function accepts `0` to `FUSION_MAX_SET_SIZE` elements,
+where `FUSION_MAX_SET_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_SET_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_SET_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_set`]]
+]
+
+[heading Expression Semantics]
+
+ make_set(x0, x1,... xN);
+
+[*Return type]: __result_of_make_set__`<T0, T1,... TN>::type`
+
+[*Semantics]: Create a __set__ from `x0, x1,... xN`.
+
+[*Precondition]: There may be no duplicate key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_set.hpp>
+ #include <boost/fusion/include/make_set.hpp>
+
+[heading Example]
+
+ make_set(123, "hello", 12.5)
+
+[heading See also]
+
+__note_boost_ref__
+
+[endsect]
+
+[section make_map]
+
+[heading Description]
+
+Create a __map__ from one or more key/data pairs.
+
+[heading Synopsis]
+
+ template <
+ typename K0, typename K1,... typename KN
+ , typename T0, typename T1,... typename TN>
+ typename __result_of_make_map__<K0, K0,... KN, T0, T1,... TN>::type
+ make_map(T0 const& x0, T1 const& x1... TN const& xN);
+
+The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements,
+where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_MAP_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_MAP_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`K0, K1,... KN`] [The key types] [Keys associated with `x0, x1,... xN`]]
+ [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `make_map`]]
+]
+
+[heading Expression Semantics]
+
+ make_map<K0, K1,... KN>(x0, x1,... xN);
+
+[*Return type]: __result_of_make_map__`<K0, K0,... KN, T0, T1,... TN>::type`
+
+[*Semantics]: Create a __map__ from `K0, K1,... KN` keys and
+`x0, x1,... xN` data.
+
+[*Precondition]: There may be no duplicate key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_map.hpp>
+ #include <boost/fusion/include/make_map.hpp>
+
+[heading Example]
+
+ make_map<int, double>('X', "Men")
+
+[heading See also]
+
+__note_boost_ref__, __fusion_pair__
+
+[endsect]
+
+[section Tiers]
+
+Tiers are sequences, where all elements are non-const reference types. They
+are constructed with a call to a couple of /tie/ function templates. The
+succeeding sections document the various /tier/ flavors.
+
+* __list_tie__
+* __vector_tie__
+* __map_tie__
+
+Example:
+
+ int i; char c; double d;
+ ...
+ __vector_tie__(i, c, a);
+
+The __vector_tie__ function creates a __vector__ of type
+`__vector__<int&, char&, double&>`. The same result could be achieved with the call
+__make_vector__(__boost_ref_call__(i), __boost_ref_call__(c), __boost_ref_call__(a))
+[footnote see __boost_ref__ for details about `ref`].
+
+A /tie/ can be used to 'unpack' another tuple into variables. E.g.:
+
+ int i; char c; double d;
+ __vector_tie__(i, c, d) = __make_vector__(1,'a', 5.5);
+ std::cout << i << " " << c << " " << d;
+
+This code prints 1 a 5.5 to the standard output stream. A sequence
+unpacking operation like this is found for example in ML and Python. It is
+convenient when calling functions which return sequences.
+
+[heading Ignore]
+
+There is also an object called /ignore/ which allows you to ignore an
+element assigned by a sequence. The idea is that a function may return a
+sequence, only part of which you are interested in. For example:
+
+ char c;
+ __vector_tie__(ignore, c) = __make_vector__(1, 'a');
+
+[endsect]
+
+[section list_tie]
+
+[heading Description]
+
+Constructs a tie using a __list__ sequence.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ __list__<T0&, T1&,... TN&>
+ list_tie(T0& x0, T1& x1... TN& xN);
+
+The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where
+`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults
+to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE`
+before including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_LIST_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `list_tie`]]
+]
+
+[heading Expression Semantics]
+
+ list_tie(x0, x1,... xN);
+
+[*Return type]: __list__<T0&, T1&,... TN&>
+
+[*Semantics]: Create a __list__ of references from `x0, x1,... xN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/list_tie.hpp>
+ #include <boost/fusion/include/list_tie.hpp>
+
+[heading Example]
+
+ int i = 123;
+ double d = 123.456;
+ list_tie(i, d)
+
+[endsect]
+
+[section vector_tie]
+
+[heading Description]
+
+Constructs a tie using a __vector__ sequence.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ __vector__<T0&, T1&,... TN&>
+ vector_tie(T0& x0, T1& x1... TN& xN);
+
+The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements,
+where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_VECTOR_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `vector_tie`]]
+]
+
+[heading Expression Semantics]
+
+ vector_tie(x0, x1,... xN);
+
+[*Return type]: __vector__<T0&, T1&,... TN&>
+
+[*Semantics]: Create a __vector__ of references from `x0, x1,... xN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/vector_tie.hpp>
+ #include <boost/fusion/include/vector_tie.hpp>
+
+[heading Example]
+
+ int i = 123;
+ double d = 123.456;
+ vector_tie(i, d)
+
+[endsect]
+
+[section map_tie]
+
+[heading Description]
+
+Constructs a tie using a __map__ sequence.
+
+[heading Synopsis]
+
+ template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN>
+ __map__<__pair__<K0, D0&>, __pair__<K1, D1&>,... __pair__<KN, DN&> >
+ map_tie(D0& d0, D1& d1... DN& dN);
+
+The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements,
+where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that
+defaults to `10`, and a corresponding number of key types.
+You may define the preprocessor constant `FUSION_MAX_MAP_SIZE` before
+including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_MAP_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`K0, K1,... KN`] [Any type][The key types associated with each of the `x1,x2,...,xN` values]]
+ [[`x0, x1,... xN`] [Instances of `T0, T1,... TN`] [The arguments to `map_tie`]]
+]
+
+[heading Expression Semantics]
+
+ map_tie<K0, K1,... KN>(x0, x1,... xN);
+
+[*Return type]: __map__<__pair__<K0, D0&>, __pair__<K1, D1&>,... __pair__<KN, DN&> >
+
+[*Semantics]: Create a __map__ of references from `x0, x1,... xN` with keys `K0, K1,... KN`
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/map_tie.hpp>
+ #include <boost/fusion/include/map_tie.hpp>
+
+[heading Example]
+
+ struct int_key;
+ struct double_key;
+ ...
+ int i = 123;
+ double d = 123.456;
+ map_tie<int_key, double_key>(i, d)
+
+[endsect]
+
+[endsect]
+
+[section MetaFunctions]
+
+[section make_list]
+
+[heading Description]
+
+Returns the result type of __make_list__.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ struct make_list;
+
+The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where
+`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults
+to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE`
+before including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_LIST_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T0, T1,... TN`] [Any type] [Template arguments to `make_list`]]
+]
+
+[heading Expression Semantics]
+
+ result_of::make_list<T0, T1,... TN>::type
+
+[*Return type]: A __list__ with elements of types converted following the
+rules for __element_conversion__.
+
+[*Semantics]: Create a __list__ from `T0, T1,... TN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_list.hpp>
+ #include <boost/fusion/include/make_list.hpp>
+
+[heading Example]
+
+ result_of::make_list<int, const char(&)[7], double>::type
+
+[endsect]
+
+[section make_cons]
+
+[heading Description]
+
+Returns the result type of __make_cons__.
+
+[heading Synopsis]
+
+ template <typename Car, typename Cdr = nil>
+ struct make_cons;
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`Car`] [Any type] [The list's head type]]
+ [[`Cdr`] [A `cons`] [The list's tail type (optional)]]
+]
+
+[heading Expression Semantics]
+
+ result_of::make_cons<Car, Cdr>::type
+
+[*Return type]: A __cons__ with head element, `Car`, of type converted
+following the rules for __element_conversion__, and tail, `Cdr`.
+
+[*Semantics]: Create a __cons__ from `Car` (/head/) and optional `Cdr` (/tail/).
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_cons.hpp>
+ #include <boost/fusion/include/make_cons.hpp>
+
+[heading Example]
+
+ result_of::make_cons<char, result_of::make_cons<int>::type>::type
+
+[endsect]
+
+[section make_vector]
+
+[heading Description]
+
+Returns the result type of __make_vector__.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ struct make_vector;
+
+The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements,
+where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_VECTOR_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T0, T1,... TN`] [Any type] [Template arguments to `make_vector`]]
+]
+
+[heading Expression Semantics]
+
+ result_of::make_vector<T0, T1,... TN>::type
+
+[*Return type]: A __vector__ with elements of types converted following the
+rules for __element_conversion__.
+
+[*Semantics]: Create a __vector__ from `T0, T1,... TN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_list.hpp>
+ #include <boost/fusion/include/make_list.hpp>
+
+[heading Example]
+
+ result_of::make_vector<int, const char(&)[7], double>::type
+
+[endsect]
+
+[section make_set]
+
+[heading Description]
+
+Returns the result type of __make_set__.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ struct make_set;
+
+The variadic function accepts `0` to `FUSION_MAX_SET_SIZE` elements,
+where `FUSION_MAX_SET_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_SET_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_SET_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T0, T1,... TN`] [Any type] [The arguments to `make_set`]]
+]
+
+[heading Expression Semantics]
+
+ result_of::make_set<T0, T1,... TN>::type
+
+[*Return type]: A __set__ with elements of types converted following the
+rules for __element_conversion__.
+
+[*Semantics]: Create a __set__ from `T0, T1,... TN`.
+
+[*Precondition]: There may be no duplicate key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_set.hpp>
+ #include <boost/fusion/include/make_set.hpp>
+
+[heading Example]
+
+ result_of::make_set<int, char, double>::type
+
+[endsect]
+
+[section make_map]
+
+[heading Description]
+
+Returns the result type of __make_map__.
+
+[heading Synopsis]
+
+ template <
+ typename K0, typename K1,... typename KN
+ , typename T0, typename T1,... typename TN>
+ struct make_map;
+
+The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements,
+where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_MAP_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_MAP_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`K0, K1,... KN`] [Any type] [Keys associated with `T0, T1,... TN`]]
+ [[`T0, T1,... TN`] [Any type] [Data associated with keys `K0, K1,... KN`]]
+]
+
+[heading Expression Semantics]
+
+ resulf_of::make_map<K0, K1,... KN, T0, T1,... TN>::type;
+
+[*Return type]: __result_of_make_map__`<K0, K0,... KN, T0, T1,... TN>::type`
+
+[*Semantics]: A __map__ with __fusion_pair__ elements where the
+`second_type` is converted following the rules for __element_conversion__.
+
+[*Precondition]: There may be no duplicate key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/make_map.hpp>
+ #include <boost/fusion/include/make_map.hpp>
+
+[heading Example]
+
+ result_of::make_map<int, double, char, double>::type
+
+[heading See also]
+
+__fusion_pair__
+
+[endsect]
+
+[section list_tie]
+
+[heading Description]
+
+Returns the result type of __list_tie__.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ struct list_tie;
+
+The variadic function accepts `0` to `FUSION_MAX_LIST_SIZE` elements, where
+`FUSION_MAX_LIST_SIZE` is a user definable predefined maximum that defaults
+to `10`. You may define the preprocessor constant `FUSION_MAX_LIST_SIZE`
+before including any Fusion header to change the default. Example:
+
+ #define FUSION_MAX_LIST_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T0, T1,... TN`] [Any type] [The arguments to `list_tie`]]
+]
+
+[heading Expression Semantics]
+
+ result_of::list_tie<T0, T1,... TN>::type;
+
+[*Return type]: __list__<T0&, T1&,... TN&>
+
+[*Semantics]: Create a __list__ of references from `T0, T1,... TN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/list_tie.hpp>
+ #include <boost/fusion/include/list_tie.hpp>
+
+[heading Example]
+
+ result_of::list_tie<int, double>::type
+
+[endsect]
+
+[section vector_tie]
+
+[heading Description]
+
+Returns the result type of __vector_tie__.
+
+[heading Synopsis]
+
+ template <typename T0, typename T1,... typename TN>
+ struct vector_tie;
+
+The variadic function accepts `0` to `FUSION_MAX_VECTOR_SIZE` elements,
+where `FUSION_MAX_VECTOR_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_VECTOR_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_VECTOR_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T0, T1,... TN`] [Any type] [The arguments to `vector_tie`]]
+]
+
+[heading Expression Semantics]
+
+ result_of::vector_tie<T0, T1,... TN>::type;
+
+[*Return type]: __vector__<T0&, T1&,... TN&>
+
+[*Semantics]: Create a __vector__ of references from `T0, T1,... TN`.
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/vector_tie.hpp>
+ #include <boost/fusion/include/vector_tie.hpp>
+
+[heading Example]
+
+ result_of::vector_tie<int, double>::type
+
+[endsect]
+
+[section map_tie]
+
+[heading Description]
+
+Returns the result type of __map_tie__.
+
+[heading Synopsis]
+
+ template <typename K0, typename K1,... typename KN, typename D0, typename D1,... typename DN>
+ struct map_tie;
+
+The variadic function accepts `0` to `FUSION_MAX_MAP_SIZE` elements,
+where `FUSION_MAX_MAP_SIZE` is a user definable predefined maximum that
+defaults to `10`. You may define the preprocessor constant
+`FUSION_MAX_MAP_SIZE` before including any Fusion header to change the
+default. Example:
+
+ #define FUSION_MAX_MAP_SIZE 20
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`K0, K1,... KN`] [Any type] [The key types for `map_tie`]]
+ [[`D0, D1,... DN`] [Any type] [The arguments types for `map_tie`]]
+]
+
+[heading Expression Semantics]
+
+ result_of::map_tie<K0, K1,... KN, D0, D1,... DN>::type;
+
+[*Return type]: __map__<__pair__<K0, D0&>, __pair__<K1, D1&>,... __pair__<KN, DN&> >
+
+[*Semantics]: Create a __map__ of references from `D0, D1,... DN` with keys `K0, K1,... KN`
+
+[heading Header]
+
+ #include <boost/fusion/container/generation/map_tie.hpp>
+ #include <boost/fusion/include/map_tie.hpp>
+
+[heading Example]
+
+ struct int_key;
+ struct double_key;
+ ...
+ result_of::map_tie<int_key, double_key, int, double>::type
+
+[endsect]
+
+[endsect]
+
+[endsect]
+
+[section Conversion]
+
+All fusion sequences can be converted to one of the __containers__ types
+using one of these conversion functions.
+
+[heading Header]
+
+ #include <boost/fusion/include/convert.hpp>
+
+[section Functions]
+
+[section as_list]
+
+[heading Description]
+
+Convert a fusion sequence to a __list__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename result_of::as_list<Sequence>::type
+ as_list(Sequence& seq);
+
+ template <typename Sequence>
+ typename result_of::as_list<Sequence const>::type
+ as_list(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [An instance of Sequence] [The sequence to convert.]]
+]
+
+[heading Expression Semantics]
+
+ as_list(seq);
+
+[*Return type]: __result_of_as_list__`<Sequence>::type`
+
+[*Semantics]: Convert a fusion sequence, `seq`, to a __list__.
+
+[heading Header]
+
+ #include <boost/fusion/container/list/convert.hpp>
+ #include <boost/fusion/include/as_list.hpp>
+
+[heading Example]
+
+ as_list(__make_vector__('x', 123, "hello"))
+
+[endsect]
+
+[section as_vector]
+
+[heading Description]
+
+Convert a fusion sequence to a __vector__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename result_of::as_vector<Sequence>::type
+ as_vector(Sequence& seq);
+
+ template <typename Sequence>
+ typename result_of::as_vector<Sequence const>::type
+ as_vector(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [An instance of Sequence] [The sequence to convert.]]
+]
+
+[heading Expression Semantics]
+
+ as_vector(seq);
+
+[*Return type]: __result_of_as_vector__`<Sequence>::type`
+
+[*Semantics]: Convert a fusion sequence, `seq`, to a __vector__.
+
+[heading Header]
+
+ #include <boost/fusion/container/vector/convert.hpp>
+ #include <boost/fusion/include/as_vector.hpp>
+
+[heading Example]
+
+ as_vector(__make_list__('x', 123, "hello"))
+
+[endsect]
+
+[section as_set]
+
+[heading Description]
+
+Convert a fusion sequence to a __set__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename result_of::as_set<Sequence>::type
+ as_set(Sequence& seq);
+
+ template <typename Sequence>
+ typename result_of::as_set<Sequence const>::type
+ as_set(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [An instance of Sequence] [The sequence to convert.]]
+]
+
+[heading Expression Semantics]
+
+ as_set(seq);
+
+[*Return type]: __result_of_as_set__`<Sequence>::type`
+
+[*Semantics]: Convert a fusion sequence, `seq`, to a __set__.
+
+[*Precondition]: There may be no duplicate key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/set/convert.hpp>
+ #include <boost/fusion/include/as_set.hpp>
+
+[heading Example]
+
+ as_set(__make_vector__('x', 123, "hello"))
+
+[endsect]
+
+[section as_map]
+
+[heading Description]
+
+Convert a fusion sequence to a __map__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename result_of::as_map<Sequence>::type
+ as_map(Sequence& seq);
+
+ template <typename Sequence>
+ typename result_of::as_map<Sequence const>::type
+ as_map(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [An instance of Sequence] [The sequence to convert.]]
+]
+
+[heading Expression Semantics]
+
+ as_map(seq);
+
+[*Return type]: __result_of_as_map__`<Sequence>::type`
+
+[*Semantics]: Convert a fusion sequence, `seq`, to a __map__.
+
+[*Precondition]: The elements of the sequence are assumed to be
+__fusion_pair__s. There may be no duplicate __fusion_pair__ key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/map/convert.hpp>
+ #include <boost/fusion/include/as_map.hpp>
+
+[heading Example]
+
+ as_map(__make_vector__(
+ __fusion_make_pair__<int>('X')
+ , __fusion_make_pair__<double>("Men")))
+
+[endsect]
+
+[endsect]
+
+[section Metafunctions]
+
+[section as_list]
+
+[heading Description]
+
+Returns the result type of __as_list__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ struct as_list;
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A fusion __sequence__] [The sequence type to convert.]]
+]
+
+[heading Expression Semantics]
+
+ result_of::as_list<Sequence>::type;
+
+[*Return type]: A __list__ with same elements as the input sequence,
+`Sequence`.
+
+[*Semantics]: Convert a fusion sequence, `Sequence`, to a __list__.
+
+[heading Header]
+
+ #include <boost/fusion/container/list/convert.hpp>
+ #include <boost/fusion/include/as_list.hpp>
+
+[heading Example]
+
+ result_of::as_list<__vector__<char, int> >::type
+
+[endsect]
+
+[section as_vector]
+
+[heading Description]
+
+Returns the result type of __as_vector__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ struct as_vector;
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]]
+]
+
+[heading Expression Semantics]
+
+ result_of::as_vector<Sequence>::type;
+
+[*Return type]: A __vector__ with same elements as the input sequence,
+`Sequence`.
+
+[*Semantics]: Convert a fusion sequence, `Sequence`, to a __vector__.
+
+[heading Header]
+
+ #include <boost/fusion/container/vector/convert.hpp>
+ #include <boost/fusion/include/as_vector.hpp>
+
+[heading Example]
+
+ result_of::as_vector<__list__<char, int> >::type
+
+[endsect]
+
+[section as_set]
+
+[heading Description]
+
+Returns the result type of __as_set__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ struct as_set;
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]]
+]
+
+[heading Expression Semantics]
+
+ result_of::as_set<Sequence>::type;
+
+[*Return type]: A __set__ with same elements as the input sequence,
+`Sequence`.
+
+[*Semantics]: Convert a fusion sequence, `Sequence`, to a __set__.
+
+[*Precondition]: There may be no duplicate key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/set/convert.hpp>
+ #include <boost/fusion/include/as_set.hpp>
+
+[heading Example]
+
+ result_of::as_set<__vector__<char, int> >::type
+
+[endsect]
+
+[section as_map]
+
+[heading Description]
+
+Returns the result type of __as_map__.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ struct as_map;
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`Sequence`] [A fusion __sequence__] [The sequence to convert.]]
+]
+
+[heading Expression Semantics]
+
+ result_of::as_map<Sequence>::type;
+
+[*Return type]: A __map__ with same elements as the input sequence,
+`Sequence`.
+
+[*Semantics]: Convert a fusion sequence, `Sequence`, to a __map__.
+
+[*Precondition]: The elements of the sequence are assumed to be
+__fusion_pair__s. There may be no duplicate __fusion_pair__ key types.
+
+[heading Header]
+
+ #include <boost/fusion/container/map/convert.hpp>
+ #include <boost/fusion/include/as_map.hpp>
+
+[heading Example]
+
+ result_of::as_map<__vector__<
+ __fusion_pair__<int, char>
+ , __fusion_pair__<double, std::string> > >::type
+
+[endsect]
+
+[endsect]
+
+[endsect]
+
+[endsect]

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/extension.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/extension.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,481 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Extension]
+
+[section:ext_full The Full Extension Mechanism]
+
+The Fusion library is designed to be extensible, new sequences types can easily
+be added. In fact, the library support for `std::pair`, `boost::array` and __mpl__
+sequences is entirely provided using the extension mechanism.
+
+The process for adding a new sequence type to Fusion is:
+
+# Enable the __tag_dispatching__ mechanism used by Fusion for your sequence type
+# Design an iterator type for the sequence
+# Provide specialized behaviour for the intrinsic operations of the new Fusion sequence
+
+[heading Our example]
+
+In order to illustrate enabling a new sequence type for use with Fusion, we
+are going to use the type:
+
+ namespace example
+ {
+ struct example_struct
+ {
+ std::string name;
+ int age;
+ example_struct(
+ const std::string& n,
+ int a)
+ : name(n), age(a)
+ {}
+ };
+ }
+
+We are going to pretend that this type has been provided by a 3rd party
+library, and therefore cannot be modified. We shall work through all the
+necessary steps to enable `example_struct` to serve as an __associative_sequence__
+as described in the __quick_start__ guide.
+
+[heading Enabling Tag Dispatching]
+
+The Fusion extensibility mechanism uses __tag_dispatching__ to call the
+correct code for a given sequence type. In order to exploit the tag
+dispatching mechanism we must first declare a new tag type for the
+mechanism to use. For example:
+
+ namespace example {
+ struct example_sequence_tag; // Only definition needed
+ }
+
+Next we need to enable the `traits::tag_of` metafunction to return our newly chosen
+tag type for operations involving our sequence. This is done by specializing
+`traits::tag_of` for our sequence type.
+
+ #include <boost/fusion/support/tag_of_fwd.hpp>
+ #include <boost/fusion/include/tag_of_fwd.hpp>
+
+ namespace boost { namespace fusion { namespace traits {
+ template<>
+ struct tag_of<example_struct>
+ {
+ typedef example::example_sequence_tag type;
+ };
+ }}}
+
+`traits::tag_of` also has a second template argument,
+that can be used in conjuction with `boost::enable_if` to provide tag
+support for groups of related types. This feature is not necessary
+for our sequence, but for an example see the code in:
+
+ #include <boost/fusion/adapted/array/tag_of.hpp>
+ #include <boost/fusion/include/tag_of.hpp>
+
+[heading Designing a suitable iterator]
+
+We need an iterator to describe positions, and provide access to
+the data within our sequence. As it is straightforward to do,
+we are going to provide a random access iterator in our example.
+
+We will use a simple design, in which the 2 members of
+`example_struct` are given numbered indices, 0 for `name` and
+1 for `age` respectively.
+
+ template<typename Struct, int Pos>
+ struct example_struct_iterator
+ : boost::fusion::iterator_base<example_struct_iterator<Struct, Pos> >
+ {
+ BOOST_STATIC_ASSERT(Pos >=0 && Pos < 3);
+ typedef Struct struct_type;
+ typedef boost::mpl::int_<Pos> index;
+ typedef boost::fusion::random_access_traversal_tag category;
+
+ example_struct_iterator(Struct& str)
+ : struct_(str) {}
+
+ Struct& struct_;
+ };
+
+A quick summary of the details of our iterator:
+
+# The iterator is parameterized by the type it is iterating over, and the index of the current element.
+# The typedefs `struct_type` and `index` provide convenient access to information we will need later in
+ the implementation.
+# The typedef `category` allows the `traits::__category_of__` metafunction to establish
+ the traversal category of the iterator.
+# The constructor stores a reference to the `example_struct` being iterated over.
+
+We also need to enable __tag_dispatching__ for our iterator type, with another specialization of
+`traits::tag_of`.
+
+In isolation, the iterator implementation is pretty dry. Things should become clearer as we
+add features to our implementation.
+
+[heading A first couple of instructive features]
+
+To start with, we will get the __result_of_value_of__ metafunction working. To
+do this, we provide a specialization of the `boost::fusion::extension::value_of_impl` template for
+our iterator's tag type.
+
+ template<>
+ struct value_of_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply;
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 0> >
+ {
+ typedef std::string type;
+ };
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 1> >
+ {
+ typedef int type;
+ };
+ };
+
+The implementation itself is pretty simple, it just uses 2 partial specializations to
+provide the type of the 2 different members of `example_struct`, based on the index of the iterator.
+
+To understand how `value_of_impl` is used by the library we will look at the implementation of __value_of__:
+
+ template <typename Iterator>
+ struct __value_of__
+ : extension::value_of_impl<typename traits::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+
+So __value_of__ uses __tag_dispatching__ to select an __mpl_metafunction_class__
+to provide its functionality. You will notice this pattern throughout the
+implementation of Fusion.
+
+Ok, lets enable dereferencing of our iterator. In this case we must provide a suitable
+specialization of `deref_impl`.
+
+ template<>
+ struct deref_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply;
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 0> >
+ {
+ typedef typename mpl::if_<
+ is_const<Struct>, std::string const&, std::string&>::type type;
+
+ static type
+ call(example::example_struct_iterator<Struct, 0> const& it)
+ {
+ return it.struct_.name;
+ }
+ };
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 1> >
+ {
+ typedef typename mpl::if_<
+ is_const<Struct>, int const&, int&>::type type;
+
+ static type
+ call(example::example_struct_iterator<Struct, 1> const& it)
+ {
+ return it.struct_.age;
+ }
+ };
+ };
+ }
+
+The use of `deref_impl` is very similar to that of `value_of_impl`, but it also
+provides some runtime functionality this time via the `call` static member function.
+To see how `deref_impl` is used, lets have a look at the implementation of __deref__:
+
+ namespace result_of
+ {
+ template <typename Iterator>
+ struct __deref__
+ : extension::deref_impl<typename traits::tag_of<Iterator>::type>::
+ template apply<Iterator>
+ {};
+ }
+
+ template <typename Iterator>
+ typename result_of::deref<Iterator>::type
+ __deref__(Iterator const& i)
+ {
+ typedef result_of::deref<Iterator> deref_meta;
+ return deref_meta::call(i);
+ }
+
+So again __result_of_deref__ uses __tag_dispatching__ in exactly the
+same way as the __value_of__ implementation. The runtime functionality used
+by __deref__ is provided by the `call` static function of the selected
+__mpl_metafunction_class__.
+
+The actual implementation of `deref_impl` is slightly more complex than that of `value_of_impl`.
+We also need to implement the `call` function, which returns a reference
+to the appropriate member of the underlying sequence. We also require a little
+bit of metaprogramming to return `const` references if the underlying sequence
+is const.
+
+[note Although there is a fair amount of left to do to produce a fully fledged
+Fusion sequence, __value_of__ and __deref__ illustrate all the signficant concepts
+required. The remainder of the process is very repetitive, simply requiring
+implementation of a suitable `xxxx_impl` for each feature `xxxx`.
+]
+
+[heading Implementing the remaining iterator functionality]
+
+Ok, now we have seen the way __value_of__ and __deref__ work, everything else will work
+ in pretty much the same way. Lets start with forward iteration,
+by providing a `next_impl`:
+
+ template<>
+ struct next_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::struct_type struct_type;
+ typedef typename Iterator::index index;
+ typedef example::example_struct_iterator<struct_type, index::value + 1> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.struct_);
+ }
+ };
+ };
+
+This should be very familiar from our `deref_impl` implementation, we will be
+using this approach again and again now. Our design is simply to increment
+the `index` counter to move on to the next element. The various other iterator
+manipulations we need to perform will all just involve simple calculations
+with the `index` variables.
+
+We also need to provide a suitable `equal_to_impl` so that iterators can be
+correctly compared. A __bidirectional_iterator__ will also need an implementation of `prior_impl`. For a
+__random_access_iterator__ `distance_impl` and `advance_impl` also need to be provided
+in order to satisfy the necessary complexity guarantees. As our iterator is
+a __random_access_iterator__ we will have to implement all of these functions.
+
+Full implementations of `prior_impl`, `advance_impl`, `distance_impl` and `equal_to_impl` are
+provided in the example code.
+
+[heading Implementing the intrinsic functions of the sequence]
+
+In order that Fusion can correctly identify our sequence as a Fusion sequence, we
+need to enable `is_sequence` for our sequence type. As usual we just create
+an `impl` type specialized for our sequence tag:
+
+ template<>
+ struct is_sequence_impl<example::example_sequence_tag>
+ {
+ template<typename T>
+ struct apply : mpl::true_ {};
+ };
+
+We've some similar formalities to complete, providing `category_of_impl` so Fusion
+can correctly identify our sequence type, and `is_view_impl` so Fusion can correctly
+identify our sequence as not being a __view__ type. Implementations are
+provide in the example code.
+
+Now we've completed some formalities, on to more interesting features. Lets get
+__begin__ working so that we can get an iterator to start accessing the data in
+our sequence.
+
+ template<>
+ struct begin_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef example::example_struct_iterator<Sequence, 0> type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+
+The implementation uses the same ideas we have applied throughout, in this case
+we are just creating one of the iterators we developed earlier, pointing to the
+first element in the sequence. The implementation of __end__ is very similar, and
+is provided in the example code.
+
+For our __random_access_sequence__ we will also need to implement `size_impl`,
+`value_at_impl` and `at_impl`.
+
+[heading Enabling our type as an associative container]
+
+In order for `example_struct` to serve as an associative container,
+we need to enable 3 lookup features, __at_key__, __value_at_key__ and __has_key__.
+We also need to provide an implementation of the `category_of_impl` trait
+so that our sequence can be correctly identified as an associative container.
+
+To implement `at_key_impl` we need to associate the `fields::age` and `fields::age`
+types described in the __quick_start__ guide with the appropriate members of `example_struct`.
+Our implementation is as follows:
+
+ template<>
+ struct at_key_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence, typename Key>
+ struct apply;
+
+ template<typename Sequence>
+ struct apply<Sequence, fields::name>
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>,
+ std::string const&,
+ std::string&>::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return seq.name;
+ };
+ };
+
+ template<typename Sequence>
+ struct apply<Sequence, fields::age>
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>,
+ int const&,
+ int&>::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return seq.age;
+ };
+ };
+ };
+
+Its all very similar to the implementations we've seen previously,
+such as `deref_impl` and `value_of_impl`. Instead of identifying
+the members by index or position, we are now selecting them using
+the types `fields::name` and `fields::age`. The implementations of
+`value_at_key_impl` and `has_key_impl` are equally straightforward,
+and are provided in the example code, along with an implementation
+of `is_associative_impl`.
+
+[heading Summary]
+
+We've now worked through the entire process for adding a new random
+access sequence and we've also enabled our type to serve as an associative
+container. The implementation was slightly longwinded, but followed
+a simple repeating pattern.
+
+The support for `std::pair`, __mpl__ sequences, and `boost::array` all
+use the same approach, and provide additional examples of the approach
+for a variety of types.
+
+[endsect]
+
+[section Sequence Facade]
+
+[heading Description]
+The __sequence_facade__ template provides an intrusive mechanism for
+producing a conforming Fusion iterator.
+
+[heading Synopsis]
+ template<typename Derived, typename TravesalTag, typename IsView = mpl::false_>
+ struct sequence_facade;
+
+[heading Usage]
+The user of __sequence_facade__ derives his sequence type from a specialization of __sequence_facade__ and passes the derived sequence type as the first template parameter. The second template parameter should be the traversal category of the sequence being implemented. The 3rd parameter should be set to `mpl::true_` if the sequence is a view.
+
+The user must the implement the key expressions required by their sequence type.
+
+[table Parameters
+[[Name][Description]]
+[[`sequence`, `Seq`][A type derived from __sequence_facade__]]
+[[`N`][An __mpl_integral_constant__]]
+]
+
+[table Key Expressions
+[[Expression][Result]]
+[[`sequence::template begin<Seq>::type`][The type of an iterator to the beginning of a sequence of type `Seq`]]
+[[`sequence::template begin<Seq>::call(seq)`][An iterator to the beginning of sequence `seq`]]
+[[`sequence::template end<Seq>::type`][The type of an iterator to the end of a sequence of type `Seq`]]
+[[`sequence::template end<Seq>::call(seq)`][An iterator to the end of sequence `seq`]]
+[[`sequence::template size<Seq>::type`][The size of a sequence of type `Seq` as an __mpl_integral_constant__]]
+[[`sequence::template size<Seq>::call(seq)`][The size of sequence `seq`]]
+[[`sequence::template at<Seq, N>::type`][The type of element `N` in a sequence of type `Seq`]]
+[[`sequence::template at<Seq, N>::call(seq)`][Element `N` in sequence `seq`]]
+[[`sequence::template value_at<Sequence, N>::type`][The type of the `N`th element in a sequence of type `Seq`]]
+]
+
+[heading Include]
+
+ #include <boost/fusion/sequence/sequence_facade.hpp>
+ #include <boost/fusion/include/sequence_facade.hpp>
+
+[heading Example]
+A full working example using __sequence_facade__ is provided in triple.cpp in the extension examples.
+
+[endsect]
+
+[section Iterator Facade]
+
+[heading Description]
+The __iterator_facade__ template provides an intrusive mechanism for
+producing a conforming Fusion iterator.
+
+[heading Synopsis]
+
+ template<typename Derived, typename TravesalTag>
+ struct iterator_facade;
+
+[heading Usage]
+The user of iterator_facade derives his iterator type from a specialization of iterator_facade and passes the derived iterator type as the first template parameter. The second template parameter should be the traversal category of the iterator being implemented.
+
+The user must the implement the key expressions required by their iterator type.
+
+[table Parameters
+[[Name][Description]]
+[[`iterator`, `It`, `It1`, `It2`][A type derived from __iterator_facade__]]
+[[`N`][An __mpl_integral_constant__]]
+]
+
+[table Key Expressions
+[[Expression][Result][Default]]
+[[`iterator::template value_of<It>::type`][The element stored at iterator position `It`][None]]
+[[`iterator::template deref<It>::type`][The type returned when dereferencing an iterator of type `It`][None]]
+[[`iterator::template deref<It>::call(it)`][Dereferences iterator `it`][None]]
+[[`iterator::template next<It>::type`][The type of the next element from `It`][None]]
+[[`iterator::template next<It>::call(it)`][The next iterator after `it`][None]]
+[[`iterator::template prior<It>::type`][The type of the next element from `It`][None]]
+[[`iterator::template prior<It>::call(it)`][The next iterator after `it`][None]]
+[[`iterator::template advance<It, N>::type`][The type of an iterator advanced `N` elements from `It`][Implemented in terms of `next` and `prior`]]
+[[`iterator::template advance<It, N>::call(it)`][An iterator advanced `N` elements from `it`][Implemented in terms of `next` and `prior`]]
+[[`iterator::template distance<It1, It2>::type`][The distance between iterators of type `It1` and `It2` as an __mpl_integral_constant__][None]]
+[[`iterator::template equal_to<It1, It2>::type`][The distance between iterators of type `It1` and `It2`][]]
+]
+
+[heading Header]
+
+ #include <boost/fusion/iterator/iterator_facade.hpp>
+ #include <boost/fusion/include/iterator_facade.hpp>
+
+[heading Example]
+A full working example using __iterator_facade__ is provided in triple.cpp in the extension examples.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/functional.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/functional.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,1413 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Functional]
+
+Components to call functions and function objects and to make Fusion code
+callable through a function object interface.
+
+[heading Header]
+
+ #include <boost/fusion/functional.hpp>
+ #include <boost/fusion/include/functional.hpp>
+
+[heading Fused and unfused forms]
+
+What is a function call?
+
+ f (a,b,c)
+
+It is a name and a tuple written next to each other, left-to-right.
+
+Although the C++ syntax does not allow to replace [^(a,b,c)] with some Fusion
+__sequence__, introducing yet another function provides a solution:
+
+ invoke(f,my_sequence)
+
+Alternatively it is possible to apply a simple transformation to [^f] in order
+to achieve the same effect:
+
+ f tuple <=> ``f'`` (tuple)
+
+Now, [^f'] is an unary function that takes the arguments to `f` as a tuple;
+[^f'] is the /fused/ form of `f`.
+Reading the above equivalence right-to-left to get the inverse transformation,
+`f` is the /unfused/ form of [^f'].
+
+[heading Calling functions and function objects]
+
+Having generic C++ code call back arbitrary functions provided by the client
+used to be a heavily repetitive task, as different functions can differ in
+arity, invocation syntax and other properties that might be part of the type.
+Transporting arguments as Fusion sequences and factoring out the invocation
+makes Fusion algorithms applicable to function arguments and also reduces
+the problem to one invocation syntax and a fixed arity (instead of an arbitrary
+number of arbitrary arguments times several syntactic variants times additional
+properties).
+
+Transforming an unfused function into its fused counterpart allows n-ary
+calls from an algorithm that invokes an unary __poly_func_obj__ with
+__sequence__ arguments.
+
+The library provides several function templates to invoke different kinds of
+functions and adapters to transform them into fused form, respectively.
+Every variant has a corresponding generator function template that returns
+an adapter instance for the given argument.
+
+Constructors can be called applying __boost_func_factory__.
+
+[heading Making Fusion code callable through a function object interface]
+
+Transforming a fused function into its unfused counterpart allows to create
+function objects to accept arbitrary calls. In other words, an unary function
+object can be implemented instead of (maybe heavily overloaded) function
+templates or function call operators.
+
+The library provides both a strictly typed and a generic variant for this
+transformation. The latter should be used in combination with
+__boost_func_forward__ to attack __the_forwarding_problem__.
+
+Both variants have a corresponding generator function template that returns an
+adapter instance for the given argument.
+
+[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ]
+
+[section Concepts]
+
+
+[section:callable Callable Object]
+
+[heading Description]
+
+A pointer to a function, a pointer to member function, a pointer to member
+data, or a class type whose objects can appear immediately to the left of a
+function call operator.
+
+[heading Models]
+* function pointer types
+* member (function or data) pointer types
+* all kinds of function objects
+
+[heading Examples]
+
+ & a_free_function
+ & a_class::a_static_member_function
+ & a_class::a_nonstatic_data_member
+ & a_class::a_nonstatic_member_function
+ std::less<int>()
+ // using namespace boost;
+ bind(std::less<int>(), _1, 5)
+ lambda::_1 += lambda::_2;
+ fusion::__make_fused_function_object__(std::less<int>())
+
+
+[endsect]
+
+
+[section:reg_callable Regular Callable Object]
+
+[heading Description]
+
+A non-member-pointer __callable_obj__ type: A pointer to a function or a class
+type whose objects can appear immediately to the left of a function call operator.
+
+[heading Refinement of]
+* __callable_obj__
+
+[variablelist Notation
+ [[`F`][A possibly const qualified Deferred Callable Object type]]
+ [[`f`][An object or reference to an object of type F]]
+ [[`A1 ...AN`][Argument types]]
+ [[`a1 ...aN`][Objects or references to objects with types `A1 ...AN`]]
+]
+
+[heading Expression requirements]
+
+[table
+ [[Expression][Return Type][Runtime Complexity]]
+ [[`f(a1, ...aN)`][Unspecified][Unspecified]]
+]
+
+[heading Models]
+* function pointer types
+* all kinds of function objects
+
+[heading Examples]
+
+ & a_free_function
+ & a_class::a_static_member_function
+ std::less<int>()
+ // using namespace boost;
+ bind(std::less<int>(), _1, 5)
+ lambda::_1 += lambda::_2;
+ fusion::__make_fused_function_object__(std::less<int>())
+
+[endsect]
+
+
+[section:def_callable Deferred Callable Object]
+
+[heading Description]
+
+__callable_obj__ types that work with __boost_result_of__ to determine the
+result of a call.
+
+[heading Refinement of]
+* __callable_obj__
+
+[blurb note Once C++ supports the [^decltype] keyword, all models of
+__callable_obj__ will also be models of __def_callable_obj__, because
+function objects won't need client-side support for `result_of`.
+]
+
+[variablelist Notation
+ [[`F`][A possibly const qualified Deferred Callable Object type]]
+ [[`A1 ...AN`][Argument types]]
+ [[`a1 ...aN`][Objects or references to objects with types `A1 ...AN`]]
+ [[`T1 ...TN`][`T`i is `A`i `&` if `a`i is an __lvalue__, same as `A`i, otherwise]]
+]
+
+[heading Expression requirements]
+
+[table
+ [[Expression][Type]]
+ [[__boost_result_of_call__`< F(T1 ...TN) >::type`][Result of a call with `A1 ...AN`-typed arguments]]
+]
+
+[heading Models]
+* __poly_func_obj__ types
+* member (function or data) pointer types
+
+[heading Examples]
+
+ & a_free_function
+ & a_class::a_static_member_function
+ & a_class::a_nonstatic_data_member
+ & a_class::a_nonstatic_member_function
+ std::less<int>()
+ // using namespace boost;
+ bind(std::less<int>(), _1, 5)
+ // Note: Boost.Lambda expressions don't work with __boost_result_of__
+ fusion::__make_fused_function_object__(std::less<int>())
+
+[endsect]
+
+
+[section:poly Polymorphic Function Object]
+
+[heading Description]
+
+A non-member-pointer __def_callable_obj__ type.
+
+[heading Refinement of]
+* __reg_callable_obj__
+* __def_callable_obj__
+
+[variablelist Notation
+ [[`F`][A possibly const-qualified Polymorphic Function Object type]]
+ [[`f`][An object or reference to an object of type F]]
+ [[`A1 ...AN`][Argument types]]
+ [[`a1 ...aN`][Objects or references to objects with types `A1 ...AN`]]
+ [[`T1 ...TN`][`T`i is `A`i `&` if `a`i is an __lvalue__, same as `A`i, otherwise]]
+]
+
+[heading Expression requirements]
+
+[table
+ [[Expression][Return Type][Runtime Complexity]]
+ [[`f(a1, ...aN)`][`result_of< F(T1, ...TN) >::type`][Unspecified]]
+]
+
+[heading Models]
+* function pointers
+* function objects of the Standard Library
+* all Fusion __functional_adapters__
+
+[heading Examples]
+
+ & a_free_function
+ & a_class::a_static_member_function
+ std::less<int>()
+ // using namespace boost;
+ bind(std::less<int>(), _1, 5)
+ // Note: Boost.Lambda expressions don't work with __boost_result_of__
+ fusion::__make_fused_function_object__(std::less<int>())
+
+[endsect]
+
+
+[endsect]
+
+[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ]
+
+[section Invocation]
+
+[section Functions]
+
+[section invoke]
+
+[heading Description]
+
+Calls a __def_callable_obj__ with the arguments from a __sequence__.
+
+The first template parameter can be specialized explicitly to avoid copying
+and/or to control the const qualification of a function object.
+
+If the target function is a pointer to a class members, the corresponding
+object can be specified as a reference, pointer, or smart pointer.
+In case of the latter, a freestanding [^get_pointer] function must be
+defined (Boost provides this function for [^std::auto_ptr] and
+__boost_shared_ptr_call__).
+
+Constructors can be called applying __boost_func_factory__.
+
+[heading Synopsis]
+ template<
+ typename Function,
+ class Sequence
+ >
+ typename __result_of_invoke__<Function, Sequence>::type
+ invoke(Function f, Sequence & s);
+
+ template<
+ typename Function,
+ class Sequence
+ >
+ typename __result_of_invoke__<Function, Sequence const>::type
+ invoke(Function f, Sequence const& s);
+
+[heading Parameters]
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`f`] [A __def_callable_obj__] [The function to call.]]
+ [[`s`] [A __forward_sequence__] [The arguments.]]
+]
+
+[heading Expression Semantics]
+
+ invoke(f,s);
+
+[*Return type]: Return type of `f` when invoked with the elements in `s` as its
+arguments.
+
+[*Semantics]: Invokes `f` with the elements in `s` as arguments and returns
+the result of the call expression.
+
+[heading Header]
+
+ #include <boost/fusion/functional/invocation/invoke.hpp>
+ #include <boost/fusion/include/invoke.hpp>
+
+[heading Example]
+ __std_plus_doc__<int> add;
+ assert(invoke(add,__make_vector__(1,1)) == 2);
+
+[heading See also]
+* __invoke_procedure__
+* __invoke_function_object__
+* __result_of_invoke__
+* __fused__
+* __make_fused__
+
+[endsect]
+
+[section:invoke_proc invoke_procedure]
+
+[heading Description]
+
+Calls a __callable_obj__ with the arguments from a __sequence__. The result
+of the call is ignored.
+
+The first template parameter can be specialized explicitly to avoid copying
+and/or to control the const qualification of a function object.
+
+For pointers to class members corresponding object can be specified as
+a reference, pointer, or smart pointer. In case of the latter, a freestanding
+[^get_pointer] function must be defined (Boost provides this function for
+[^std::auto_ptr] and __boost_shared_ptr_call__).
+
+The target function must not be a pointer to a member object (dereferencing
+such a pointer without returning anything does not make sense, so it isn't
+implemented).
+
+[heading Synopsis]
+ template<
+ typename Function,
+ class Sequence
+ >
+ typename __result_of_invoke_procedure__<Function, Sequence>::type
+ invoke_procedure(Function f, Sequence & s);
+
+ template<
+ typename Function,
+ class Sequence
+ >
+ typename __result_of_invoke_procedure__<Function, Sequence const>::type
+ invoke_procedure(Function f, Sequence const& s);
+
+[heading Parameters]
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`f`] [Model of __callable_obj__] [The function to call.]]
+ [[`s`] [Model of __forward_sequence__] [The arguments.]]
+]
+
+[heading Expression Semantics]
+
+ invoke_procedure(f,s);
+
+[*Return type]: `void`
+
+[*Semantics]: Invokes `f` with the elements in `s` as arguments.
+
+[heading Header]
+
+ #include <booost/fusion/functional/invocation/invoke_procedure.hpp>
+ #include <boost/fusion/include/invoke_procedure.hpp>
+
+[heading Example]
+ __vector__<int,int> v(1,2);
+ using namespace boost::lambda;
+ invoke_procedure(_1 += _2, v);
+ assert(__front__(v) == 3);
+
+[heading See also]
+* __invoke__
+* __invoke_function_object__
+* __result_of_invoke_procedure__
+* __fused_procedure__
+* __make_fused_procedure__
+
+[endsect]
+
+[section:invoke_fobj invoke_function_object]
+
+[heading Description]
+
+Calls a __poly_func_obj__ with the arguments from a __sequence__.
+
+The first template parameter can be specialized explicitly to avoid copying
+and/or to control the const qualification of a function object.
+
+Constructors can be called applying __boost_func_factory__.
+
+[heading Synopsis]
+ template<
+ typename Function,
+ class Sequence
+ >
+ typename __result_of_invoke_function_object__<Function, Sequence>::type
+ invoke_function_object(Function f, Sequence & s);
+
+ template<
+ typename Function,
+ class Sequence
+ >
+ typename __result_of_invoke_function_object__<Function, Sequence const>::type
+ invoke_function_object(Function f, Sequence const& s);
+
+[heading Parameters]
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`f`] [Model of __poly_func_obj__] [The function object to call.]]
+ [[`s`] [Model of __forward_sequence__] [The arguments.]]
+]
+
+[heading Expression Semantics]
+
+ invoke_function_object(f,s);
+
+[*Return type]: Return type of `f` when invoked with the elements in `s` as its
+arguments.
+
+[*Semantics]: Invokes `f` with the elements in `s` as arguments and returns the
+result of the call expression.
+
+[heading Header]
+
+ #include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+ #include <boost/fusion/include/invoke_function_object.hpp>
+
+[heading Example]
+ struct sub
+ {
+ template <typename Sig>
+ struct result;
+
+ template <class Self, typename T>
+ struct result< Self(T,T) >
+ { typedef typename remove_reference<T>::type type; };
+
+ template<typename T>
+ T operator()(T lhs, T rhs) const
+ {
+ return lhs - rhs;
+ }
+ };
+
+ void try_it()
+ {
+ sub f;
+ assert(f(2,1) == invoke_function_object(f,__make_vector__(2,1)));
+ }
+
+[heading See also]
+* __invoke__
+* __invoke_procedure__
+* __result_of_invoke_function_object__
+* __fused_function_object__
+* __make_fused_function_object__
+
+[endsect]
+
+[endsect] [/ Functions]
+
+[section Metafunctions]
+
+[section invoke]
+
+[heading Description]
+Returns the result type of __invoke__.
+
+[heading Synopsis]
+ namespace result_of
+ {
+ template<
+ typename Function,
+ class Sequence
+ >
+ struct invoke
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading See also]
+* __invoke__
+* __fused__
+
+[endsect]
+
+[section:invoke_proc invoke_procedure]
+
+[heading Description]
+Returns the result type of __invoke_procedure__.
+
+[heading Synopsis]
+ namespace result_of
+ {
+ template<
+ typename Function,
+ class Sequence
+ >
+ struct invoke_procedure
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading See also]
+* __invoke_procedure__
+* __fused_procedure__
+
+[endsect]
+
+[section:invoke_fobj invoke_function_object]
+
+[heading Description]
+Returns the result type of __invoke_function_object__.
+
+[heading Synopsis]
+ namespace result_of
+ {
+ template<
+ class Function,
+ class Sequence
+ >
+ struct invoke_function_object
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading See also]
+* __invoke_function_object__
+* __fused_function_object__
+
+[endsect]
+
+[endsect] [/ Metafunctions ]
+
+[section Limits]
+
+[heading Header]
+
+ #include <boost/fusion/functional/invocation/limits.hpp>
+ #include <boost/fusion/include/limits.hpp>
+
+[heading Macros]
+
+The following macros can be defined to change the maximum arity.
+The default is 6.
+
+* BOOST_FUSION_INVOKE_MAX_ARITY
+* BOOST_FUSION_INVOKE_PROCEDURE_MAX_ARITY
+* BOOST_FUSION_INVOKE_FUNCTION_OBJECT_MAX_ARITY
+
+[endsect]
+
+[endsect] [/ Invocation ]
+
+[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ]
+
+[section:adapters Adapters]
+
+Function object templates to transform a particular target function.
+
+[section fused]
+
+[heading Description]
+
+An unary __poly_func_obj__ adapter template for __def_callable_obj__ target
+functions. It takes a __forward_sequence__ that contains the arguments for the
+target function.
+
+The type of the target function is allowed to be const qualified or a
+reference. Const qualification is preserved and propagated appropriately
+(in other words, only const versions of [^operator()] can be used for a
+target function object that is const or, if the target function object
+is held by value, the adapter is const - these semantics have nothing to
+do with the const qualification of a member function, which is referring
+to the type of object pointed to by [^this] which is specified with the
+first element in the sequence passed to the adapter).
+
+If the target function is a pointer to a class members, the corresponding
+object can be specified as a reference, pointer, or smart pointer.
+In case of the latter, a freestanding [^get_pointer] function must be
+defined (Boost provides this function for [^std::auto_ptr] and
+__boost_shared_ptr_call__).
+
+[heading Header]
+
+ #include <boost/fusion/functional/adapter/fused.hpp>
+ #include <boost/fusion/include/fused.hpp>
+
+[heading Synopsis]
+ template <typename Function>
+ class fused;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Function`] [A __def_callable_obj__] []]
+]
+
+[heading Model of]
+
+* __poly_func_obj__
+* __def_callable_obj__
+
+[variablelist Notation
+ [[`R`] [A possibly const qualified __def_callable_obj__ type or reference type thereof]]
+ [[`r`] [An object convertible to `R`]]
+ [[`s`] [A __sequence__ of arguments that are accepted by `r`]]
+ [[`f`] [An instance of `fused<R>`]]
+]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`fused<R>(r)`] [Creates a fused function as described above, initializes the target function with `r`.]]
+ [[`fused<R>()`] [Creates a fused function as described above, attempts to use `R`'s default constructor.]]
+ [[`f(s)`] [Calls `r` with the elements in `s` as its arguments.]]
+]
+
+[heading Example]
+ fused< __std_plus_doc__<long> > f;
+ assert(f(__make_vector__(1,2l)) == 3l);
+
+[heading See also]
+
+* __fused_procedure__
+* __fused_function_object__
+* __invoke__
+* __make_fused__
+* __deduce__
+
+[endsect]
+
+[section fused_procedure]
+
+[heading Description]
+
+An unary __poly_func_obj__ adapter template for __callable_obj__ target
+functions. It takes a __forward_sequence__ that contains the arguments for
+the target function.
+
+The result is discared and the adapter's return type is `void`.
+
+The type of the target function is allowed to be const qualified or a
+reference. Const qualification is preserved and propagated appropriately
+(in other words, only const versions of [^operator()] can be used for a
+target function object that is const or, if the target function object
+is held by value, the adapter is const - these semantics have nothing to
+do with the const qualification of a member function, which is referring
+to the type of object pointed to by [^this] which is specified with the
+first element in the sequence passed to the adapter).
+
+If the target function is a pointer to a members function, the corresponding
+object can be specified as a reference, pointer, or smart pointer.
+In case of the latter, a freestanding [^get_pointer] function must be
+defined (Boost provides this function for [^std::auto_ptr] and
+__boost_shared_ptr_call__).
+
+The target function must not be a pointer to a member object (dereferencing
+such a pointer without returning anything does not make sense, so this case
+is not implemented).
+
+[heading Header]
+
+ #include <boost/fusion/functional/adapter/fused_procedure.hpp>
+ #include <boost/fusion/include/fused_procedure.hpp>
+
+[heading Synopsis]
+ template <typename Function>
+ class fused_procedure;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Function`] [__callable_obj__ type] []]
+]
+
+[heading Model of]
+
+* __poly_func_obj__
+* __def_callable_obj__
+
+[variablelist Notation
+ [[`R`] [A possibly const qualified __callable_obj__ type or reference type thereof]]
+ [[`r`] [An object convertible to `R`]]
+ [[`s`] [A __sequence__ of arguments that are accepted by `r`]]
+ [[`f`] [An instance of `fused<R>`]]
+]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`fused_procedure<R>(r)`] [Creates a fused function as described above, initializes the target function with `r`.]]
+ [[`fused_procedure<R>()`] [Creates a fused function as described above, attempts to use `R`'s default constructor.]]
+ [[`f(s)`] [Calls `r` with the elements in `s` as its arguments.]]
+]
+
+[heading Example]
+ template<class SequenceOfSequences, class Func>
+ void n_ary_for_each(SequenceOfSequences const& s, Func const& f)
+ {
+ __for_each__(__zip_view__<SequenceOfSequences>(s),
+ fused_procedure<Func const&>(f));
+ }
+
+ void try_it()
+ {
+ __vector__<int,float> a(2,2.0f);
+ __vector__<int,float> b(1,1.5f);
+ using namespace boost::lambda;
+ n_ary_for_each(__vector_tie__(a,b), _1 -= _2);
+ assert(a == __make_vector__(1,0.5f));
+ }
+
+[heading See also]
+
+* __fused__
+* __fused_function_object__
+* __invoke_procedure__
+* __make_fused_procedure__
+
+[endsect]
+
+[section fused_function_object]
+
+[heading Description]
+
+An unary __poly_func_obj__ adapter template for a __poly_func_obj__ target
+function. It takes a __forward_sequence__ that contains the arguments for the
+target function.
+
+The type of the target function is allowed to be const qualified or a
+reference. Const qualification is preserved and propagated appropriately
+(in other words, only const versions of [^operator()] can be used for an
+target function object that is const or, if the target function object
+is held by value, the adapter is const).
+
+[heading Header]
+
+ #include <boost/fusion/functional/adapter/fused_function_object.hpp>
+ #include <boost/fusion/include/fused_function_object.hpp>
+
+[heading Synopsis]
+ template <class Function>
+ class fused_function_object;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Function`] [__poly_func_obj__ type] []]
+]
+
+[heading Model of]
+
+* __poly_func_obj__
+* __def_callable_obj__
+
+[variablelist Notation
+ [[`R`] [A possibly const qualified __poly_func_obj__ type or reference type thereof]]
+ [[`r`] [An object convertible to `R`]]
+ [[`s`] [A __sequence__ of arguments that are accepted by `r`]]
+ [[`f`] [An instance of `fused<R>`]]
+]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`fused_function_object<R>(r)`] [Creates a fused function as described above, initializes the target function with `r`.]]
+ [[`fused_function_object<R>()`] [Creates a fused function as described above, attempts to use `R`'s default constructor.]]
+ [[`f(s)`] [Calls `r` with the elements in `s` as its arguments.]]
+]
+
+[heading Example]
+ template<class SeqOfSeqs, class Func>
+ typename __result_of_transform__< zip_view<SeqOfSeqs> const,
+ fused_function_object<Func const&> >::type
+ n_ary_transform(SeqOfSeqs const& s, Func const& f)
+ {
+ return __transform__(zip_view<SeqOfSeqs>(s),
+ fused_function_object<Func const&>(f));
+ }
+
+ struct sub
+ {
+ template <typename Sig>
+ struct result;
+
+ template <class Self, typename T>
+ struct result< Self(T,T) >
+ { typedef typename remove_reference<T>::type type; };
+
+ template<typename T>
+ T operator()(T lhs, T rhs) const
+ {
+ return lhs - rhs;
+ }
+ };
+
+ void try_it()
+ {
+ __vector__<int,float> a(2,2.0f);
+ __vector__<int,float> b(1,1.5f);
+ __vector__<int,float> c(1,0.5f);
+ assert(c == n_ary_transform(__vector_tie__(a,b), sub()));
+ }
+
+[heading See also]
+
+* __fused__
+* __fused_procedure__
+* __invoke_function_object__
+* __make_fused_function_object__
+* __deduce__
+
+[endsect]
+
+
+[section unfused]
+
+[heading Description]
+
+An n-ary __poly_func_obj__ adapter template for an unary __poly_func_obj__
+target function. When called, its arguments are bundled to a
+__random_access_sequence__ of references that is passed to the target function
+object.
+
+The nullary overload of the call operator can be removed by setting the
+second template parameter to `false`, which is very useful if the result type
+computation would result in a compile error, otherwise (nullary call
+operator's prototypes can't be templates and thus are instantiated as early
+as the class template).
+
+Only __lvalue__ arguments are accepted. To overcome this limitation, apply
+__boost_func_forward__.
+
+The type of the target function is allowed to be const qualified or a
+reference. Const qualification is preserved and propagated appropriately.
+In other words, only const versions of [^operator()] can be used if
+the target function object is const - or, in case the target function
+object is held by value, the adapter is const.
+
+[heading Header]
+
+ #include <boost/fusion/functional/adapter/unfused.hpp>
+ #include <boost/fusion/include/unfused.hpp>
+
+[heading Synopsis]
+ template <class Function, bool AllowNullary = true>
+ class unfused;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Function`] [A unary __poly_func_obj__] []]
+ [[`AllowNullary`] [Boolean constant] [true]]
+]
+
+[heading Model of]
+
+* __poly_func_obj__
+* __def_callable_obj__
+
+[variablelist Notation
+ [[`F`] [A possibly const qualified, unary __poly_func_obj__ type or reference type thereof]]
+ [[`f`] [An object convertible to `F`]]
+ [[`UL`] [The type `unfused<F>`]]
+ [[`ul`] [An instance of `UL`, initialized with `f`]]
+ [[`a0`...`aN`] [Arguments to `ul`]]
+]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`UL(f)`] [Creates a fused function as described above, initializes the target function with `f`.]]
+ [[`UL()`] [Creates a fused function as described above, attempts to use `F`'s default constructor.]]
+ [[`ul(a0`...`aN)`] [Calls `f` with a __sequence__ that contains references to the arguments `a0`...`aN`.]]
+]
+
+[heading Example]
+ struct fused_incrementer
+ {
+ template <class Seq>
+ struct result
+ {
+ typedef void type;
+ };
+
+ template <class Seq>
+ void operator()(Seq const& s) const
+ {
+ __for_each__(s,++boost::lambda::_1);
+ }
+ };
+
+ void try_it()
+ {
+ unfused<fused_incrementer> increment;
+ int a = 2; char b = 'X';
+ increment(a,b);
+ assert(a == 3 && b == 'Y');
+ }
+
+[heading See also]
+* __unfused_typed__
+* __make_unfused__
+
+[endsect]
+
+[section unfused_typed]
+
+[heading Description]
+
+An n-ary __poly_func_obj__ adapter template for an unary __poly_func_obj__
+target function. When called, its arguments are bundled to a
+__random_access_sequence__ that is passed to the target function object.
+
+The call operators of the resulting function objects are strictly typed
+(in other words, non-templatized) with the types from a __sequence__.
+
+The type of the target function is allowed to be const qualified or a
+reference. Const qualification is preserved and propagated appropriately
+(in other words, only const versions of [^operator()] can be used if
+the target function object is const - or, in case the target function object
+is held by value, the adapter is const).
+
+[blurb __note__ For Microsoft Visual C++ 7.1 (Visual Studio 2003) the detection
+of the Function Object's const qualification easily causes an internal error.
+Therefore the adapter is always treated as if it was const. ]
+
+[blurb __tip__ If the type sequence passed to this template contains
+non-reference elements, the element is copied only once - the call operator's
+signature is optimized automatically to avoid by-value parameters.]
+
+[heading Header]
+
+ #include <boost/fusion/functional/adapter/unfused_typed.hpp>
+ #include <boost/fusion/include/unfused_typed.hpp>
+
+[heading Synopsis]
+ template <class Function, class Sequence>
+ class unfused_typed;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Function`] [A unary __poly_func_obj__] []]
+ [[`Sequence`] [A __sequence__] []]
+]
+
+[heading Model of]
+
+* __poly_func_obj__
+* __def_callable_obj__
+
+[variablelist Notation
+ [[`F`] [A possibly const qualified, unary __poly_func_obj__ type or reference type thereof]]
+ [[`f`] [An object convertible to `F`]]
+ [[`S`] [A __sequence__ of parameter types]]
+ [[`UT`] [The type `unfused_typed<F,S>`]]
+ [[`ut`] [An instance of `UT`, initialized with `f`]]
+ [[`a0`...`aN`] [Arguments to `ut`, convertible to the types in `S`]]
+]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`UT(f)`] [Creates a fused function as described above, initializes the target function with `f`.]]
+ [[`UT()`] [Creates a fused function as described above, attempts to use `F`'s default constructor.]]
+ [[`ut(a0`...`aN)`] [Calls `f` with an instance of `S` (or a subsequence of `S` starting at the first element,
+ if fewer arguments are given and the overload hasn't been disabled) initialized with
+ `a0`...`aN`.]]
+]
+
+[heading Example]
+ struct add_assign // applies operator+=
+ {
+ typedef void result_type; // for simplicity
+
+ template <typename T>
+ void operator()(T & lhs, T const& rhs) const
+ {
+ lhs += rhs;
+ }
+ };
+
+ template <class Tie>
+ class fused_parallel_adder
+ {
+ Tie tie_dest;
+ public:
+ explicit fused_parallel_adder(Tie const& dest)
+ : tie_dest(dest)
+ { }
+
+ typedef void result_type;
+
+ template <class Seq>
+ void operator()(Seq const& s) const
+ {
+ for_each( zip(tie_dest,s), fused<add_assign>() );
+ }
+ };
+
+ // accepts a tie and creates a typed function object from it
+ struct fused_parallel_adder_maker
+ {
+ template <typename Sig>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ {
+ typedef typename remove_reference<Seq>::type seq;
+
+ typedef unfused_typed< fused_parallel_adder<seq>,
+ typename mpl::transform<seq, remove_reference<_> >::type > type;
+ };
+
+ template <class Seq>
+ typename result< void(Seq) >::type operator()(Seq const& tie)
+ {
+ return typename result< void(Seq) >::type(
+ fused_parallel_adder<Seq>(tie) );
+ }
+ };
+ unfused<fused_parallel_adder_maker> parallel_add;
+
+ void try_it()
+ {
+ int a = 2; char b = 'X';
+ // the second call is strictly typed with the types deduced from the
+ // first call
+ parallel_add(a,b)(3,2);
+ parallel_add(a,b)(3);
+ parallel_add(a,b)();
+ assert(a == 8 && b == 'Z');
+ }
+
+[heading See also]
+* __unfused__
+* __deduce__
+* __deduce_sequence__
+
+[endsect]
+
+[section Limits]
+
+[heading Header]
+
+ #include <boost/fusion/functional/adapter/limits.hpp>
+ #include <boost/fusion/include/limits.hpp>
+
+[heading Macros]
+
+The following macros can be defined to change the maximum arity.
+The value used for these macros must not exceed `FUSION_MAX_VECTOR_SIZE`.
+The default is 6.
+
+* BOOST_FUSION_UNFUSED_MAX_ARITY
+* BOOST_FUSION_UNFUSED_TYPE_MAX_ARITY
+
+[endsect]
+
+[endsect] [/ Adapters]
+
+[/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ]
+
+[section Generation]
+
+[section Functions]
+
+[section:mk_fused make_fused]
+
+[heading Description]
+Creates a __fused__ adapter for a given __def_callable_obj__. The usual
+__element_conversion__ is applied to the target function.
+
+[heading Synopsis]
+ template <typename F>
+ inline typename __result_of_make_fused__<F>::type
+ make_fused(F const& f);
+
+[heading Parameters]
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`f`] [Model of __def_callable_obj__] [The function to transform.]]
+]
+
+[heading Expression Semantics]
+
+ make_fused(f);
+
+[*Return type]: A specialization of __fused__.
+
+[*Semantics]: Returns a __fused__ adapter for `f`.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_fused.hpp>
+ #include <boost/fusion/include/make_fused.hpp>
+
+[heading Example]
+ float sub(float a, float b) { return a - b; }
+
+ void try_it()
+ {
+ __vector__<int,float> a(2,2.0f);
+ __vector__<int,float> b(1,1.5f);
+ __vector__<float,float> c(1.0f,0.5f);
+ assert(c == __transform__(__zip__(a,b), make_fused(& sub)));
+ assert(c == __transform__(__zip__(a,b), make_fused(__std_minus_doc__<float>())));
+ }
+
+[heading See also]
+* __fused__
+* __deduce__
+* __result_of_make_fused__
+
+[endsect]
+
+[section:mk_fused_proc make_fused_procedure]
+
+[heading Description]
+Creates a __fused_procedure__ adapter for a given __def_callable_obj__.
+The usual __element_conversion__ applied to the target function.
+
+[heading Synopsis]
+ template <typename F>
+ inline typename __result_of_make_fused_procedure__<F>::type
+ make_fused_procedure(F const& f);
+
+[heading Parameters]
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`f`] [Model of __callable_obj__] [The function to transform.]]
+]
+
+[heading Expression Semantics]
+
+ make_fused_procedure(f);
+
+[*Return type]: A specialization of __fused_procedure__.
+
+[*Semantics]: Returns a __fused_procedure__ adapter for `f`.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+ #include <boost/fusion/include/make_fused_procedure.hpp>
+
+[heading Example]
+ __vector__<int,int,int> v(1,2,3);
+ using namespace boost::lambda;
+ make_fused_procedure(_1 += _2 - _3)(v);
+ assert(__front__(v) == 0);
+
+[heading See also]
+* __fused_procedure__
+* __deduce__
+* __result_of_make_fused_procedure__
+
+[endsect]
+
+[section:mk_fused_fobj make_fused_function_object]
+
+[heading Description]
+Creates a __fused_function_object__ adapter for a given __def_callable_obj__.
+The usual __element_conversion__ is applied to the target function.
+
+[heading Synopsis]
+ template <typename F>
+ inline typename __result_of_make_fused_function_object__<F>::type
+ make_fused_function_object(F const& f);
+
+[heading Parameters]
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`f`] [Model of __poly_func_obj__] [The function to transform.]]
+]
+
+[heading Expression Semantics]
+
+ make_fused_function_object(f);
+
+[*Return type]: A specialization of __fused_function_object__.
+
+[*Semantics]: Returns a __fused_function_object__ adapter for `f`.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+ #include <boost/fusion/include/make_fused_function_object.hpp>
+
+[heading Example]
+ struct sub
+ {
+ template <typename Sig>
+ struct result;
+
+ template <class Self, typename T>
+ struct result< Self(T,T) >
+ { typedef typename remove_reference<T>::type type; };
+
+ template<typename T>
+ T operator()(T lhs, T rhs) const
+ {
+ return lhs - rhs;
+ }
+ };
+
+ void try_it()
+ {
+ __vector__<int,float> a(2,2.0f);
+ __vector__<int,float> b(1,1.5f);
+ __vector__<int,float> c(1,0.5f);
+ assert(c == __transform__(__zip__(a,b), make_fused_function_object(sub())));
+ }
+
+[heading See also]
+* __fused_function_object__
+* __deduce__
+* __result_of_make_fused_function_object__
+
+[endsect]
+
+[section:mk_unfused make_unfused]
+
+[heading Description]
+Creates a __unfused__ adapter for a given, unary __poly_func_obj__.
+The usual __element_conversion__ is applied to the target function.
+
+[heading Synopsis]
+ template <typename F>
+ inline typename __result_of_make_unfused__<F>::type
+ make_unfused(F const& f);
+
+[heading Parameters]
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`f`] [Model of __poly_func_obj__] [The function to transform.]]
+]
+
+[heading Expression Semantics]
+
+ make_unfused(f);
+
+[*Return type]: A specialization of __unfused__.
+
+[*Semantics]: Returns a __unfused__ adapter for `f`.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_unfused.hpp>
+ #include <boost/fusion/include/make_unfused.hpp>
+
+[heading Example]
+ struct fused_incrementer
+ {
+ template <class Seq>
+ struct result
+ {
+ typedef void type;
+ };
+
+ template <class Seq>
+ void operator()(Seq const& s) const
+ {
+ __for_each__(s,++boost::lambda::_1);
+ }
+ };
+
+ void try_it()
+ {
+ int a = 2; char b = 'X';
+ make_unfused(fused_incrementer())(a,b);
+ assert(a == 3 && b == 'Y');
+ }
+
+[heading See also]
+* __unfused__
+* __deduce__
+* __result_of_make_unfused__
+
+[endsect]
+
+[endsect] [/ Functions]
+
+[section Metafunctions]
+
+[section:mk_fused make_fused]
+
+[heading Description]
+Returns the result type of __make_fused__.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_fused.hpp>
+ #include <boost/fusion/include/make_fused.hpp>
+
+[heading Synopsis]
+ namespace result_of
+ {
+ template<typename Function>
+ struct make_fused
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading See also]
+* __make_fused__
+
+[endsect]
+
+[section:mk_fused_proc make_fused_procedure]
+
+[heading Description]
+Returns the result type of __make_fused_procedure__.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+ #include <boost/fusion/include/make_fused_procedure.hpp>
+
+[heading Synopsis]
+ namespace result_of
+ {
+ template<typename Function>
+ struct make_fused_procedure
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading See also]
+* __make_fused_procedure__
+
+[endsect]
+
+[section:mk_fused_fobj make_fused_function_object]
+
+[heading Description]
+Returns the result type of __make_fused_function_object__.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+ #include <boost/fusion/include/make_fused_function_object.hpp>
+
+[heading Synopsis]
+ namespace result_of
+ {
+ template<typename Function>
+ struct make_fused_function_object
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading See also]
+* __make_fused_function_object__
+
+[endsect]
+
+[section:mk_unfused make_unfused]
+
+[heading Description]
+Returns the result type of __make_unfused__.
+
+[heading Header]
+
+ #include <boost/fusion/functional/generation/make_unfused.hpp>
+ #include <boost/fusion/include/make_unfused.hpp>
+
+[heading Synopsis]
+ namespace result_of
+ {
+ template<typename Function>
+ struct make_unfused
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading See also]
+* __make_unfused__
+
+[endsect]
+
+[endsect] [/ Metafunctions]
+
+[endsect] [/ Generation]
+
+[endsect] [/ Functional ]

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/fusion.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/fusion.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,321 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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)
+===============================================================================/]
+[library Fusion
+ [quickbook 1.3]
+ [version 2.0]
+ [authors [de Guzman, Joel], [Marsden, Dan], [Schwinger, Tobias]]
+ [copyright 2001 2002 2003 2004 2005 2006 2007 2008 2009 Joel de Guzman, Dan Marsden, Tobias Schwinger]
+ [purpose Statically Typed Heterogeneous Data Structures and Algorithms]
+ [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 __note__ [$images/note.png]]
+[def __alert__ [$images/alert.png]]
+[def __tip__ [$images/tip.png]]
+[def __caution__ [$images/caution.png]]
+
+[def __spirit__ [@http://spirit.sourceforge.net Spirit]]
+[def __phoenix__ [@http://boost.org/libs/spirit/phoenix/index.html Phoenix]]
+[def __mpl__ [@http://www.boost.org/libs/mpl/index.html MPL]]
+[def __stl__ [@http://en.wikipedia.org/wiki/Standard_Template_Library STL]]
+[def __tuple__ [@http://www.boost.org/libs/tuple/doc/tuple_users_guide.html Boost.Tuple]]
+[def __tr1__tuple__ [@http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2002/n1403.pdf TR1 Tuple]]
+[def __boost_tools__ [@http://www.boost.org/tools/index.html Boost Tools]]
+[def __spirit_list__ [@https://lists.sourceforge.net/lists/listinfo/spirit-general Spirit Mailing List]]
+[def __spirit_general__ [@news://news.gmane.org/gmane.comp.spirit.general Spirit General NNTP news portal]]
+[def __gmane__ [@http://www.gmane.org Gmane]]
+[def __mlist_archive__ [@http://news.gmane.org/gmane.comp.parsers.spirit.general]]
+[def __jaakko_jarvi__ [@http://www.boost.org/people/jaakko_jarvi.htm Jaakko Jarvi]]
+[def __david_abrahams__ [@http://www.boost.org/people/dave_abrahams.htm David Abrahams]]
+[def __the_forwarding_problem__ [@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2002/n1385.htm The Forwarding Problem]]
+
+[def __boost_any__ [@http://boost.org/doc/html/any.html Boost.Any]]
+[def __new_iterator_concepts__ [@http://boost.org/libs/iterator/doc/new-iter-concepts.html New Iterator Concepts]]
+[def __boost_array_library__ [@http://www.boost.org/doc/html/array.html Boost.Array Library]]
+[def __boost_variant_library__ [@http://www.boost.org/doc/html/variant.html Boost.Variant Library]]
+[def __boost_tuple_library__ [@http://www.boost.org/libs/tuple/doc/tuple_users_guide.html Boost.Tuple Library]]
+[def __boost_ref__ [@http://www.boost.org/doc/html/ref.html Boost.Ref]]
+[def __boost_ref_call__ [@http://www.boost.org/doc/html/ref.html `ref`]]
+[def __boost_result_of__ [@http://www.boost.org/libs/utility/utility.htm#result_of Boost.ResultOf]]
+[def __boost_result_of_call__ [@http://www.boost.org/libs/utility/utility.htm#result_of `boost::result_of`]]
+[def __boost_enable_if__ [@http://www.boost.org/libs/utility/enable_if.html Boost.EnableIf utility]]
+[def __boost_shared_ptr_call__ [@http://www.boost.org/libs/smart_ptr/shared_ptr.htm `boost::shared_ptr`]]
+[def __std_pair_doc__ [@http://www.sgi.com/tech/stl/pair.html `std::pair`]]
+[def __std_plus_doc__ [@http://www.sgi.com/tech/stl/plus.html `std::plus`]]
+[def __std_minus_doc__ [@http://www.sgi.com/tech/stl/minus.html `std::minus`]]
+
+[def __mpl_integral_constant__ [@http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html MPL Integral Constant]]
+[def __mpl_boolean_constant__ [@http://www.boost.org/libs/mpl/doc/refmanual/integral-constant.html MPL Boolean Constant]]
+[def __mpl_metafunction_class__ [@http://www.boost.org/libs/mpl/doc/refmanual/metafunction-class.html MPL Metafunction Class]]
+[def __mpl_lambda_expression__ [@http://www.boost.org/libs/mpl/doc/refmanual/lambda-expression.html MPL Lambda Expression]]
+
+[def __lvalue__ LValue]
+[def __unspecified__ /unspecified/]
+
+[def __support__ [link fusion.support Support]]
+[def __is_sequence__ [link fusion.support.is_sequence `is_sequence`]]
+[def __is_view__ [link fusion.support.is_view `is_view`]]
+[def __tag_of__ [link fusion.support.tag_of `tag_of`]]
+[def __category_of__ [link fusion.support.category_of `category_of`]]
+[def __deduce__ [link fusion.support.deduce `deduce`]]
+[def __deduce_sequence__ [link fusion.support.deduce_sequence `deduce_sequence`]]
+[def __fusion_pair__ [link fusion.support.pair `fusion::pair`]]
+[def __pair__ [link fusion.support.pair `pair`]]
+[def __fusion_make_pair__ [link fusion.support.pair `make_pair`]]
+
+[def __iterator__ [link fusion.iterator Iterator]]
+[def __iterator_concepts__ [link fusion.iterator.concepts Iterator Concepts]]
+[def __forward_iterator__ [link fusion.iterator.concepts.forward_iterator Forward Iterator]]
+[def __bidirectional_iterator__ [link fusion.iterator.concepts.bidirectional_iterator Bidirectional Iterator]]
+[def __random_access_iterator__ [link fusion.iterator.concepts.random_access_iterator Random Access Iterator]]
+
+[def __next__ [link fusion.iterator.functions.next `next`]]
+[def __prior__ [link fusion.iterator.functions.prior `prior`]]
+[def __advance__ [link fusion.iterator.functions.advance `advance`]]
+[def __advance_c__ [link fusion.iterator.functions.advance_c `advance_c`]]
+[def __distance__ [link fusion.iterator.functions.distance `distance`]]
+[def __deref__ [link fusion.iterator.functions.deref `deref`]]
+
+[def __result_of_next__ [link fusion.iterator.metafunctions.next `result_of::next`]]
+[def __result_of_prior__ [link fusion.iterator.metafunctions.prior `result_of::prior`]]
+[def __result_of_equal_to__ [link fusion.iterator.metafunctions.equal_to `result_of::equal_to`]]
+[def __result_of_advance__ [link fusion.iterator.metafunctions.advance `result_of::advance`]]
+[def __result_of_advance_c__ [link fusion.iterator.metafunctions.advance_c `result_of::advance_c`]]
+[def __result_of_distance__ [link fusion.iterator.metafunctions.distance `result_of::distance`]]
+[def __result_of_deref__ [link fusion.iterator.metafunctions.deref `result_of::deref`]]
+[def __result_of_value_of__ [link fusion.iterator.metafunctions.value_of `result_of::value_of`]]
+[def __value_of__ [link fusion.iterator.metafunctions.value_of `value_of`]]
+
+[def __sequence__ [link fusion.sequence Sequence]]
+[def __sequence_concepts__ [link fusion.sequence.concepts Sequence Concepts]]
+[def __traversal_concept__ [link fusion.sequence.concepts.traversal Sequence Traversal Concept]]
+[def __associativity_concept__ [link fusion.sequence.concepts.associativity Sequence Associativity Concept]]
+[def __forward_sequence__ [link fusion.sequence.concepts.forward_sequence Forward Sequence]]
+[def __bidirectional_sequence__ [link fusion.sequence.concepts.bidirectional_sequence Bidirectional Sequence]]
+[def __random_access_sequence__ [link fusion.sequence.concepts.random_access_sequence Random Access Sequence]]
+[def __associative_sequence__ [link fusion.sequence.concepts.associative_sequence Associative Sequence]]
+
+[def __containers__ [link fusion.container Container]]
+[def __vector__ [link fusion.container.vector `vector`]]
+[def __cons__ [link fusion.container.cons `cons`]]
+[def __list__ [link fusion.container.list `list`]]
+[def __set__ [link fusion.container.set `set`]]
+[def __map__ [link fusion.container.map `map`]]
+
+[def __view__ [link fusion.view View]]
+[def __views__ [link fusion.view Views]]
+[def __single_view__ [link fusion.view.single_view `single_view`]]
+[def __filter_view__ [link fusion.view.filter_view `filter_view`]]
+[def __iterator_range__ [link fusion.view.iterator_range `iterator_range`]]
+[def __joint_view__ [link fusion.view.joint_view `joint_view`]]
+[def __transform_view__ [link fusion.view.transform_view `transform_view`]]
+[def __reverse_view__ [link fusion.view.reverse_view `reverse_view`]]
+[def __zip_view__ [link fusion.view.zip_view `zip_view`]]
+
+[def __std_pair__ [link fusion.adapted.std__pair `std::pair`]]
+[def __boost_array__ [link fusion.adapted.boost__array `boost::array`]]
+[def __mpl_sequence__ [link fusion.adapted.mpl_sequence mpl sequence]]
+
+[def __intrinsic__ [link fusion.sequence.intrinsic Intrinsic]]
+[def __intrinsics__ [link fusion.sequence.intrinsic Intrinsics]]
+[def __begin__ [link fusion.sequence.intrinsic.functions.begin `begin`]]
+[def __result_of_begin__ [link fusion.sequence.intrinsic.metafunctions.begin `result_of::begin`]]
+[def __end__ [link fusion.sequence.intrinsic.functions.end `end`]]
+[def __result_of_end__ [link fusion.sequence.intrinsic.metafunctions.end `result_of::end`]]
+[def __size__ [link fusion.sequence.intrinsic.functions.size `size`]]
+[def __result_of_size__ [link fusion.sequence.intrinsic.metafunctions.size `result_of::size`]]
+[def __empty__ [link fusion.sequence.intrinsic.functions.empty `empty`]]
+[def __result_of_empty__ [link fusion.sequence.intrinsic.metafunctions.empty `result_of::empty`]]
+[def __front__ [link fusion.sequence.intrinsic.functions.front `front`]]
+[def __result_of_front__ [link fusion.sequence.intrinsic.metafunctions.front `result_of::front`]]
+[def __back__ [link fusion.sequence.intrinsic.functions.back `back`]]
+[def __result_of_back__ [link fusion.sequence.intrinsic.metafunctions.back `result_of::back`]]
+[def __at__ [link fusion.sequence.intrinsic.functions.at `at`]]
+[def __result_of_at__ [link fusion.sequence.intrinsic.metafunctions.at `result_of::at`]]
+[def __at_c__ [link fusion.sequence.intrinsic.functions.at_c `at_c`]]
+[def __result_of_at_c__ [link fusion.sequence.intrinsic.metafunctions.at_c `result_of::at_c`]]
+[def __at_key__ [link fusion.sequence.intrinsic.functions.at_key `at_key`]]
+[def __result_of_at_key__ [link fusion.sequence.intrinsic.metafunctions.at_key `result_of::at_key`]]
+[def __has_key__ [link fusion.sequence.intrinsic.functions.has_key `has_key`]]
+[def __result_of_has_key__ [link fusion.sequence.intrinsic.metafunctions.has_key `result_of::has_key`]]
+[def __value_at_key__ [link fusion.sequence.intrinsic.metafunctions.value_at_key `value_at_key`]]
+[def __result_of_value_at__ [link fusion.sequence.intrinsic.metafunctions.value_at `result_of::value_at`]]
+[def __result_of_value_at_c__ [link fusion.sequence.intrinsic.metafunctions.value_at_c `result_of::value_at_c`]]
+[def __result_of_value_at_key__ [link fusion.sequence.intrinsic.metafunctions.value_at_key `result_of::value_at_key`]]
+
+[def __conversion__ [link fusion.container.conversion.functions Conversion]]
+[def __result_of_conversion__ [link fusion.container.conversion.metafunctions Conversion Metafunctions]]
+[def __as_vector__ [link fusion.container.conversion.functions.as_vector `as_vector`]]
+[def __result_of_as_vector__ [link fusion.container.conversion.metafunctions.as_vector `result_of::as_vector`]]
+[def __as_list__ [link fusion.container.conversion.functions.as_list `as_list`]]
+[def __result_of_as_list__ [link fusion.container.conversion.metafunctions.as_list `result_of::as_list`]]
+[def __as_set__ [link fusion.container.conversion.functions.as_set `as_set`]]
+[def __result_of_as_set__ [link fusion.container.conversion.metafunctions.as_set `result_of::as_set`]]
+[def __as_map__ [link fusion.container.conversion.functions.as_map `as_map`]]
+[def __result_of_as_map__ [link fusion.container.conversion.metafunctions.as_map `result_of::as_map`]]
+
+[def __generation__ [link fusion.container.generation.functions Generation]]
+[def __result_of_generation__ [link fusion.container.generation.metafunctions Generation Metafunctions]]
+[def __make_vector__ [link fusion.container.generation.functions.make_vector `make_vector`]]
+[def __result_of_make_vector__ [link fusion.container.generation.metafunctions.make_vector `result_of::make_vector`]]
+[def __vector_tie__ [link fusion.container.generation.functions.vector_tie `vector_tie`]]
+[def __map_tie__ [link fusion.container.generation.functions.vector_tie `map_tie`]]
+[def __result_of_vector_tie__ [link fusion.container.generation.metafunctions.vector_tie `result_of::vector_tie`]]
+[def __make_vector__ [link fusion.container.generation.functions.make_vector `make_vector`]]
+[def __result_of_make_vector__ [link fusion.container.generation.metafunctions.make_vector `result_of::make_vector`]]
+[def __make_cons__ [link fusion.container.generation.functions.make_cons `make_cons`]]
+[def __result_of_make_cons__ [link fusion.container.generation.metafunctions.make_cons `result_of::make_cons`]]
+[def __make_list__ [link fusion.container.generation.functions.make_list `make_list`]]
+[def __result_of_make_list__ [link fusion.container.generation.metafunctions.make_list `result_of::make_list`]]
+[def __make_set__ [link fusion.container.generation.functions.make_set `make_set`]]
+[def __result_of_make_set__ [link fusion.container.generation.metafunctions.make_set `result_of::make_set`]]
+[def __make_map__ [link fusion.container.generation.functions.make_map `make_map`]]
+[def __result_of_make_map__ [link fusion.container.generation.metafunctions.make_map `result_of::make_map`]]
+[def __list_tie__ [link fusion.container.generation.functions.list_tie `list_tie`]]
+[def __result_of_list_tie__ [link fusion.container.generation.metafunctions.list_tie `result_of::list_tie`]]
+
+[def __out__ [link fusion.sequence.operator.i_o.out out]]
+[def __in__ [link fusion.sequence.operator.i_o.in in]]
+[def __eq__ [link fusion.sequence.operator.comparison.equal equal]]
+[def __neq__ [link fusion.sequence.operator.comparison.not_equal not equal]]
+[def __lt__ [link fusion.sequence.operator.comparison.less_than less than]]
+[def __lte__ [link fusion.sequence.operator.comparison.less_than_equal less than equal]]
+[def __gt__ [link fusion.sequence.operator.comparison.greater_than greater than]]
+[def __gte__ [link fusion.sequence.operator.comparison.greater_than_equal greater than equal]]
+
+[def __algorithm__ [link fusion.algorithm Algorithm]]
+[def __algorithms__ [link fusion.algorithm Algorithms]]
+[def __fold__ [link fusion.algorithm.iteration.functions.fold `fold`]]
+[def __result_of_fold__ [link fusion.algorithm.iteration.metafunctions.fold `result_of::fold`]]
+[def __accumulate__ [link fusion.algorithm.iteration.functions.accumulate `accumulate`]]
+[def __result_of_accumulate__ [link fusion.algorithm.iteration.metafunctions.accumulate `result_of::accumulate`]]
+[def __for_each__ [link fusion.algorithm.iteration.functions.for_each `for_each`]]
+[def __result_of_for_each__ [link fusion.algorithm.iteration.metafunctions.for_each `result_of::for_each`]]
+[def __any__ [link fusion.algorithm.query.functions.any `any`]]
+[def __result_of_any__ [link fusion.algorithm.query.metafunctions.any `result_of::any`]]
+[def __all__ [link fusion.algorithm.query.functions.all `all`]]
+[def __result_of_all__ [link fusion.algorithm.query.metafunctions.all `result_of::all`]]
+[def __none__ [link fusion.algorithm.query.functions.none `none`]]
+[def __result_of_none__ [link fusion.algorithm.query.metafunctions.none `result_of::none`]]
+[def __find__ [link fusion.algorithm.query.functions.find `find`]]
+[def __result_of_find__ [link fusion.algorithm.query.metafunctions.find `result_of::find`]]
+[def __find_if__ [link fusion.algorithm.query.functions.find_if `find_if`]]
+[def __result_of_find_if__ [link fusion.algorithm.query.metafunctions.find_if `result_of::find_if`]]
+[def __count__ [link fusion.algorithm.query.functions.count `count`]]
+[def __result_of_count__ [link fusion.algorithm.query.metafunctions.count `result_of::count`]]
+[def __count_if__ [link fusion.algorithm.query.functions.count_if `count_if`]]
+[def __result_of_count_if__ [link fusion.algorithm.query.metafunctions.count_if `result_of::count_if`]]
+[def __filter__ [link fusion.algorithm.transformation.functions.filter `filter`]]
+[def __result_of_filter__ [link fusion.algorithm.transformation.metafunctions.filter `result_of::filter`]]
+[def __filter_if__ [link fusion.algorithm.transformation.functions.filter_if `filter_if`]]
+[def __result_of_filter_if__ [link fusion.algorithm.transformation.metafunctions.filter_if `result_of::filter_if`]]
+[def __transform__ [link fusion.algorithm.transformation.functions.transform `transform`]]
+[def __result_of_transform__ [link fusion.algorithm.transformation.metafunctions.transform `result_of::transform`]]
+[def __replace__ [link fusion.algorithm.transformation.functions.replace `replace`]]
+[def __result_of_replace__ [link fusion.algorithm.transformation.metafunctions.replace `result_of::replace`]]
+[def __replace_if__ [link fusion.algorithm.transformation.functions.replace_if `replace_if`]]
+[def __result_of_replace_if__ [link fusion.algorithm.transformation.metafunctions.replace_if `result_of::replace_if`]]
+[def __remove__ [link fusion.algorithm.transformation.functions.remove `remove`]]
+[def __result_of_remove__ [link fusion.algorithm.transformation.metafunctions.remove `result_of::remove`]]
+[def __remove_if__ [link fusion.algorithm.transformation.functions.remove_if `remove_if`]]
+[def __result_of_remove_if__ [link fusion.algorithm.transformation.metafunctions.remove_if `result_of::remove_if`]]
+[def __reverse__ [link fusion.algorithm.transformation.functions.reverse `reverse`]]
+[def __result_of_reverse__ [link fusion.algorithm.transformation.metafunctions.reverse `result_of::reverse`]]
+[def __clear__ [link fusion.algorithm.transformation.functions.clear `clear`]]
+[def __result_of_clear__ [link fusion.algorithm.transformation.metafunctions.clear `result_of::clear`]]
+[def __erase__ [link fusion.algorithm.transformation.functions.erase `erase`]]
+[def __result_of_erase__ [link fusion.algorithm.transformation.metafunctions.erase `result_of::erase`]]
+[def __erase_key__ [link fusion.algorithm.transformation.functions.erase_key `erase_key`]]
+[def __result_of_erase_key__ [link fusion.algorithm.transformation.metafunctions.erase_key `result_of::erase_key`]]
+[def __insert__ [link fusion.algorithm.transformation.functions.insert `insert`]]
+[def __result_of_insert__ [link fusion.algorithm.transformation.metafunctions.insert `result_of::insert`]]
+[def __insert_range__ [link fusion.algorithm.transformation.functions.insert_range `insert_range`]]
+[def __result_of_insert_range__ [link fusion.algorithm.transformation.metafunctions.insert_range `result_of::insert_range`]]
+[def __join__ [link fusion.algorithm.transformation.functions.join `join`]]
+[def __result_of_join__ [link fusion.algorithm.transformation.metafunctions.join `result_of::join`]]
+[def __zip__ [link fusion.algorithm.transformation.functions.zip `zip`]]
+[def __result_of_zip__ [link fusion.algorithm.transformation.metafunctions.zip `result_of::zip`]]
+[def __pop_back__ [link fusion.algorithm.transformation.functions.pop_back `pop_back`]]
+[def __result_of_pop_back__ [link fusion.algorithm.transformation.metafunctions.pop_back `result_of::pop_back`]]
+[def __pop_front__ [link fusion.algorithm.transformation.functions.pop_front `pop_front`]]
+[def __result_of_pop_front__ [link fusion.algorithm.transformation.metafunctions.pop_front `result_of::pop_front`]]
+[def __push_back__ [link fusion.algorithm.transformation.functions.push_back `push_back`]]
+[def __result_of_push_back__ [link fusion.algorithm.transformation.metafunctions.push_back `result_of::push_back`]]
+[def __push_front__ [link fusion.algorithm.transformation.functions.push_front `push_front`]]
+[def __result_of_push_front__ [link fusion.algorithm.transformation.metafunctions.push_front `result_of::push_front`]]
+
+[def __tr1_tuple_pair__ [link fusion.tuple.pairs `TR1 and std::pair`]]
+[def __tuple_get__ [link fusion.tuple.class_template_tuple.element_access `get`]]
+
+[def __callable_obj__ [link fusion.functional.concepts.callable Callable Object]]
+[def __def_callable_obj__ [link fusion.functional.concepts.def_callable Deferred Callable Object]]
+[def __reg_callable_obj__ [link fusion.functional.concepts.reg_callable Regular Callable Object]]
+[def __poly_func_obj__ [link fusion.functional.concepts.poly Polymorphic Function Object]]
+[def __functional_adapters__ [link fusion.functional.adapters functional adapters]]
+[def __fused__ [link fusion.functional.adapters.fused `fused`]]
+[def __fused_procedure__ [link fusion.functional.adapters.fused_procedure `fused_procedure`]]
+[def __fused_function_object__ [link fusion.functional.adapters.fused_function_object `fused_function_object`]]
+[def __unfused_generic__ [link fusion.functional.adapters.unfused_generic `unfused_generic`]]
+[def __unfused_lvalue_args__ [link fusion.functional.adapters.unfused_lvalue_args `unfused_lvalue_args`]]
+[def __unfused_rvalue_args__ [link fusion.functional.adapters.unfused_rvalue_args `unfused_rvalue_args`]]
+[def __unfused_typed__ [link fusion.functional.adapters.unfused_typed `unfused_typed`]]
+[def __invoke__ [link fusion.functional.invocation.functions.invoke `invoke`]]
+[def __invoke_procedure__ [link fusion.functional.invocation.functions.invoke_proc `invoke_procedure`]]
+[def __invoke_function_object__ [link fusion.functional.invocation.functions.invoke_fobj `invoke_function_object`]]
+[def __make_fused__ [link fusion.functional.generation.functions.mk_fused `make_fused`]]
+[def __make_fused_procedure__ [link fusion.functional.generation.functions.mk_fused_proc `make_fused_procedure`]]
+[def __make_fused_function_object__ [link fusion.functional.generation.functions.mk_fused_fobj `make_fused_function_object`]]
+[def __make_unfused_generic__ [link fusion.functional.generation.functions.mk_unfused_genrc `make_unfused_generic`]]
+[def __make_unfused_rvalue_args__ [link fusion.functional.generation.functions.mk_unfused_rvargs `make_unfused_rvalue_args`]]
+[def __make_unfused_lvalue_args__ [link fusion.functional.generation.functions.mk_unfused_lvargs `make_unfused_lvalue_args`]]
+[def __result_of_invoke__ [link fusion.functional.invocation.metafunctions.invoke `result_of::invoke`]]
+[def __result_of_invoke_procedure__ [link fusion.functional.invocation.metafunctions.invoke_proc `result_of::invoke_procedure`]]
+[def __result_of_invoke_function_object__ [link fusion.functional.invocation.metafunctions.invoke_fobj `result_of::invoke_function_object`]]
+[def __result_of_make_fused__ [link fusion.functional.generation.metafunctions.mk_fused `make_fused`]]
+[def __result_of_make_fused_procedure__ [link fusion.functional.generation.metafunctions.mk_fused_proc `make_fused_procedure`]]
+[def __result_of_make_fused_function_object__ [link fusion.functional.generation.metafunctions.mk_fused_fobj `make_fused_function_object`]]
+[def __result_of_make_unfused_generic__ [link fusion.functional.generation.metafunctions.mk_unfused_genrc `make_unfused_generic`]]
+[def __result_of_make_unfused_rvalue_args__ [link fusion.functional.generation.metafunctions.mk_unfused_rvargs `make_unfused_rvalue_args`]]
+[def __result_of_make_unfused_lvalue_args__ [link fusion.functional.generation.metafunctions.mk_unfused_lvargs `make_unfused_lvalue_args`]]
+
+[def __recursive_inline__ [link fusion.notes.recursive_inlined_functions Recursive Inlined Functions]]
+[def __overloaded_functions__ [link fusion.notes.overloaded_functions Overloaded Functions]]
+[def __tag_dispatching__ [link fusion.notes.tag_dispatching /tag dispatching/]]
+[def __element_conversion__ [link fusion.notes.element_conversion /element conversion/]]
+[def __see_element_conversion__ [link fusion.notes.element_conversion /see element conversion/]]
+[def __note_boost_ref__ [link fusion.notes.boost__ref `boost::ref`]]
+
+[def __quick_start__ [link fusion.quick_start Quick Start]]
+[def __organization__ [link fusion.organization Orgainization]]
+[def __extension__ [link fusion.extension Extension]]
+[def __sequence_facade__ [link fusion.extension.sequence_facade `sequence_facade`]]
+[def __iterator_facade__ [link fusion.extension.iterator_facade `iterator_facade`]]
+
+[include preface.qbk]
+[include introduction.qbk]
+[include quick_start.qbk]
+[include organization.qbk]
+[include support.qbk]
+[include iterator.qbk]
+[include sequence.qbk]
+[include container.qbk]
+[include view.qbk]
+[include adapted.qbk]
+[include algorithm.qbk]
+[include tuple.qbk]
+[include extension.qbk]
+[include functional.qbk]
+[include notes.qbk]
+[include changelog.qbk]
+[include acknowledgements.qbk]
+[include references.qbk]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/alert.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/fusion_org.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/home.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/important.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/next.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/note.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/smiley.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/up.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/introduction.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/introduction.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,90 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Introduction]
+
+An advantage other languages such as Python and Lisp/ Scheme, ML and
+Haskell, etc., over C++ is the ability to have heterogeneous containers
+that can hold arbitrary element types. All the containers in the standard
+library can only hold a specific type. A `vector<int>` can only hold
+`int`s. A `list<X>` can only hold elements of type `X`, and so on.
+
+True, you can use inheritance to make the containers hold different types,
+related through subclassing. However, you have to hold the objects through
+a pointer or smart reference of some sort. Doing this, you'll have to rely
+on virtual functions to provide polymorphic behavior since the actual type
+is erased as soon as you store a pointer to a derived class to a pointer to
+its base. The held objects must be related: you cannot hold objects of
+unrelated types such as `char`, `int`, `class X`, `float`, etc. Oh sure you
+can use something like __boost_any__ to hold arbitrary types, but then you
+pay more in terms of runtime costs and due to the fact that you practically
+erased all type information, you'll have to perform dangerous casts to get
+back the original type.
+
+The __tuple__ library written by __jaakko_jarvi__ provides heterogeneous
+containers in C++. The `tuple` is a basic data structure that can hold
+heterogeneous types. It's a good first step, but it's not complete. What's
+missing are the algorithms. It's nice that we can store and retrieve data
+to and from tuples, pass them around as arguments and return types. As it
+is, the __tuple__ facility is already very useful. Yet, as soon as you use
+it more often, usage patterns emerge. Eventually, you collect these
+patterns into algorithm libraries.
+
+Hmmm, kinda reminds us of STL right? Right! Can you imagine how it would be
+like if you used STL without the algorithms? Everyone will have to reinvent
+their own /algorithm/ wheels.
+
+Fusion is a library and a framework similar to both __stl__ and the boost
+__mpl__. The structure is modeled after __mpl__, which is modeled
+after __stl__. It is named "fusion" because the library is reminiscent of
+the "fusion" of compile time meta-programming with runtime programming. The
+library inherently has some interesting flavors and characteristics of both
+__mpl__ and __stl__. It lives in the twilight zone between compile time
+meta-programming and run time programming. __stl__ containers work on
+values. MPL containers work on types. Fusion containers work on both types
+and values.
+
+Unlike __mpl__, Fusion algorithms are lazy and non sequence-type
+preserving. What does that mean? It means that when you operate on a
+sequence through a Fusion algorithm that returns a sequence, the sequence
+returned may not be of the same class as the original. This is by design.
+Runtime efficiency is given a high priority. Like __mpl__, and unlike
+__stl__, fusion algorithms are functional in nature such that algorithms
+are non mutating (no side effects). However, due to the high cost of
+returning full sequences such as vectors and lists, /Views/ are returned
+from Fusion algorithms instead. For example, the __transform__ algorithm
+does not actually return a transformed version of the original sequence.
+__transform__ returns a __transform_view__. This view holds a reference to
+the original sequence plus the transform function. Iteration over the
+__transform_view__ will apply the transform function over the sequence
+elements on demand. This /lazy/ evaluation scheme allows us to chain as
+many algorithms as we want without incurring a high runtime penalty.
+
+The /lazy/ evaluation scheme where algorithms return views allows
+operations such as __push_back__ to be totally generic. In Fusion,
+__push_back__ is actually a generic algorithm that works on all sequences.
+Given an input sequence `s` and a value `x`, Fusion's __push_back__
+algorithm simply returns a __joint_view__: a view that holds a reference to
+the original sequence `s` and the value `x`. Functions that were once
+sequence specific and need to be implemented N times over N different
+sequences are now implemented only once.
+
+Fusion provides full round compatibility with __mpl__. Fusion sequences are
+fully conforming __mpl__ sequences and __mpl__ sequences are fully compatible
+with Fusion. You can work with Fusion sequences on __mpl__ if you wish to work
+solely on types [footnote Choose __mpl__ over fusion when doing pure type
+calculations. Once the static type calculation is finished, you can instantiate
+a fusion sequence (see __conversion__) for the runtime part.]. In __mpl__,
+Fusion sequences follow __mpl__'s sequence-type preserving semantics (i.e.
+algorithms preserve the original sequence type. e.g. transforming a vector
+returns a vector). You can also convert from an __mpl__ sequence to a Fusion
+sequence. For example, there are times when it is convenient to work solely on
+__mpl__ using pure __mpl__ sequences, then, convert them to Fusion sequences as
+a final step before actual instantiation of real runtime objects with data. You
+have the best of both worlds.
+
+[endsect]

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/iterator.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/iterator.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,882 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Iterator]
+
+Like __mpl__ and __stl__, iterators are a fundamental concept in Fusion.
+As with __mpl__ and __stl__ iterators describe positions, and
+provide access to data within an underlying __sequence__.
+
+[heading Header]
+ #include <boost/fusion/iterator.hpp>
+ #include <boost/fusion/include/iterator.hpp>
+
+[section Concepts]
+
+Fusion iterators are divided into different traversal categories.
+__forward_iterator__ is the most basic concept. __bidirectional_iterator__
+is a refinement of __forward_iterator__. __random_access_iterator__ is a
+refinement of __bidirectional_iterator__.
+
+[section Forward Iterator]
+
+[heading Description]
+A Forward Iterator traverses a __sequence__ allowing movement in only one direction through
+it's elements, one element at a time.
+
+[variablelist Notation
+ [[`i`, `j`] [Forward Iterators]]
+ [[`I`, `J`] [Forward Iterator types]]
+ [[`M`] [An __mpl__ integral constant]]
+ [[`N`] [An integral constant]]
+]
+
+[heading Expression requirements]
+A type models Forward Iterator if, in addition to being CopyConstructable,
+the following expressions are valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`__next__(i)`] [__forward_iterator__] [Constant]]
+ [[`i == j`] [Convertible to bool] [Constant]]
+ [[`i != j`] [Convertible to bool] [Constant]]
+ [[`__advance_c__<N>(i)`] [__forward_iterator__] [Constant]]
+ [[`__advance__<M>(i)`] [__forward_iterator__] [Constant]]
+ [[`__distance__(i, j)`] [`__result_of_distance__<I, J>::type`][Constant]]
+ [[`__deref__(i)`] [`__result_of_deref__<I>::type`] [Constant]]
+ [[`*i`] [`__result_of_deref__<I>::type`] [Constant]]
+]
+
+[heading Meta Expressions]
+[table
+ [[Expression] [Compile Time Complexity]]
+ [[`__result_of_next__<I>::type`] [Amortized constant time]]
+ [[`__result_of_equal_to__<I, J>::type`] [Amortized constant time]]
+ [[`__result_of_advance_c__<I, N>::type`] [Linear]]
+ [[`__result_of_advance__<I ,M>::type`] [Linear]]
+ [[`__result_of_distance__<I ,J>::type`] [Linear]]
+ [[`__result_of_deref__<I>::type`] [Amortized constant time]]
+ [[`__result_of_value_of__<I>::type`] [Amortized constant time]]
+]
+
+[heading Expression Semantics]
+[
+table
+ [[Expression] [Semantics]]
+ [[`__next__(i)`] [An iterator to the element following `i`]]
+ [[`i == j`] [Iterator equality comparison]]
+ [[`i != j`] [Iterator inequality comparison]]
+ [[`__advance_c__<N>(i)`] [An iterator n elements after `i` in the sequence]]
+ [[`__advance__<M>(i)`] [Equivalent to `advance_c<M::value>(i)`]]
+ [[`__distance__(i, j)`] [The number of elements between `i` and `j`]]
+ [[`__deref__(i)`] [The element at position`i`]]
+ [[`*i`] [Equivalent to `deref(i)`]]
+]
+
+[heading Invariants]
+The following invariants always hold:
+
+* `!(i == j) == (i != j)`
+* `__next__(i) == __advance_c__<1>(i)`
+* `__distance__(i, __advance_c__<N>(i)) == N`
+* Using `__next__` to traverse the sequence will never return to a previously seen position
+* `__deref__(i)` is equivalent to `*i`
+* If `i == j` then `*i` is equivalent to `*j`
+
+[heading Models]
+* __std_pair__ iterator
+* __boost_array__ iterator
+* __vector__ iterator
+* __cons__ iterator
+* __list__ iterator
+* __set__ iterator
+* __map__ iterator
+* __single_view__ iterator
+* __filter_view__ iterator
+* __iterator_range__ iterator
+* __joint_view__ iterator
+* __transform_view__ iterator
+* __reverse_view__ iterator
+
+[endsect]
+
+[section Bidirectional Iterator]
+[heading Description]
+A Bidirectional Iterator traverses a __sequence__ allowing movement in either direction one
+element at a time.
+
+[variablelist Notation
+ [[`i`] [A Bidirectional Iterator]]
+ [[`I`] [A Bidirectional Iterator type]]
+ [[`M`] [An __mpl__ integral constant]]
+ [[`N`] [An integral constant]]
+]
+
+[heading Refinement of]
+__forward_iterator__
+
+[heading Expression requirements]
+In addition to the requirements defined in __forward_iterator__,
+the following expressions must be valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`__next__(i)`] [__bidirectional_iterator__] [Constant]]
+ [[`__prior__(i)`] [__bidirectional_iterator__] [Constant]]
+ [[`__advance_c__<N>(i)`] [__bidirectional_iterator__] [Constant]]
+ [[`__advance__<M>(i)`] [__bidirectional_iterator__] [Constant]]
+]
+
+[heading Meta Expressions]
+[table
+ [[Expression] [Compile Time Complexity]]
+ [[`__result_of_prior__<I>::type`] [Amortized constant time]]
+]
+
+[heading Expression Semantics]
+The semantics of an expression are defined only where they differ from, or are not defined
+in __forward_iterator__
+
+[table
+ [[Expression] [Semantics]]
+ [[`__prior__(i)`] [An iterator to the element preceding `i`]]
+]
+
+[heading Invariants]
+In addition to the invariants of __forward_iterator__,
+the following invariants always hold:
+
+* `__prior__(__next__(i)) == i && __prior__(__next__(i)) == __next__(__prior__(i))`
+* `__prior__(i) == __advance_c__<-1>(i)`
+* Using `__prior__` to traverse a sequence will never return a previously seen position
+
+[heading Models]
+* __std_pair__ iterator
+* __boost_array__ iterator
+* __vector__ iterator
+* __iterator_range__ (where adapted sequence is a __bidirectional_sequence__)
+* __transform_view__ (where adapted sequence is a __bidirectional_sequence__)
+* __reverse_view__
+
+[endsect]
+
+[section Random Access Iterator]
+[heading Description]
+A Random Access Iterator traverses a __sequence__ moving in either direction,
+permitting efficient arbitrary distance movements back and forward through the
+sequence.
+
+[variablelist Notation
+ [[`i`, `j`] [Random Access Iterators]]
+ [[`I`, `J`] [Random Access Iterator types]]
+ [[`M`] [An __mpl__ integral constant]]
+ [[`N`] [An integral constant]]
+]
+
+[heading Refinement of]
+__bidirectional_iterator__
+
+[heading Expression requirements]
+In addition to the requirements defined in __bidirectional_iterator__,
+the following expressions must be valid:
+
+[table
+ [[Expression] [Return type] [Runtime Complexity]]
+ [[`__next__(i)`] [__random_access_iterator__] [Constant]]
+ [[`__prior__(i)`] [__random_access_iterator__] [Constant]]
+ [[`__advance_c__<N>(i)`] [__random_access_iterator__] [Constant]]
+ [[`__advance__<M>(i)`] [__random_access_iterator__] [Constant]]
+]
+
+[heading Meta Expressions]
+[table
+ [[Expression] [Compile Time Complexity]]
+ [[`__result_of_advance_c__<I, N>::type`] [Amortized constant time]]
+ [[`__result_of_advance__<I, M>::type`] [Amortized constant time]]
+ [[`__result_of_distance__<I ,J>::type`] [Amortized constant time]]
+]
+
+[heading Models]
+* __vector__ iterator
+* __std_pair__ iterator
+* __boost_array__ iterator
+* __iterator_range__ iterator (where adapted sequence is a __random_access_sequence__)
+* __transform_view__ iterator (where adapted sequence is a __random_access_sequence__)
+* __reverse_view__ iterator (where adapted sequence is a __random_access_sequence__)
+
+[endsect]
+
+[endsect]
+
+[section Functions]
+Fusion provides functions for manipulating iterators, analogous to the similar functions
+from the __mpl__ library.
+
+[section deref]
+
+[heading Description]
+Deferences an iterator.
+
+[heading Synopsis]
+ template<
+ typename I
+ >
+ typename __result_of_deref__<I>::type deref(I const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`] [Model of __forward_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __deref__(i);
+
+[*Return type]: `__result_of_deref__<I>::type`
+
+[*Semantics]: Dereferences the iterator `i`.
+
+[heading Header]
+ #include <boost/fusion/iterator/deref.hpp>
+ #include <boost/fusion/include/deref.hpp>
+
+[heading Example]
+ typedef __vector__<int,int&> vec;
+
+ int i(0);
+ vec v(1,i);
+ assert(__deref__(__begin__(v)) == 1);
+ assert(__deref__(__next__(__begin__(v))) == 0);
+ assert(&(__deref__(__next__(__begin__(v)))) == &i);
+
+[endsect]
+
+[section next]
+
+[heading Description]
+Moves an iterator 1 position forwards.
+
+[heading Synopsis]
+ template<
+ typename I
+ >
+ typename __result_of_next__<I>::type next(I const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`] [Model of __forward_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ next(i);
+
+[*Return type]: A model of the same iterator concept as `i`.
+
+[*Semantics]: Returns an iterator to the next element after `i`.
+
+[heading Header]
+ #include <boost/fusion/iterator/next.hpp>
+ #include <boost/fusion/include/next.hpp>
+
+[heading Example]
+ typedef __vector__<int,int,int> vec;
+
+ vec v(1,2,3);
+ assert(__deref__(__begin__(v)) == 1);
+ assert(__deref__(__next__(__begin__(v))) == 2);
+ assert(__deref__(__next__(__next__(__begin__(v)))) == 3);
+
+[endsect]
+
+[section prior]
+
+[heading Description]
+Moves an iterator 1 position backwards.
+
+[heading Synopsis]
+ template<
+ typename I
+ >
+ typename __result_of_prior__<I>::type prior(I const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`] [Model of __bidirectional_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __prior__(i);
+
+[*Return type]: A model of the same iterator concept as `i`.
+
+[*Semantics]: Returns an iterator to the element prior to `i`.
+
+[heading Header]
+ #include <boost/fusion/iterator/prior.hpp>
+ #include <boost/fusion/include/prior.hpp>
+
+[heading Example]
+ typedef __vector__<int,int> vec;
+
+ vec v(1,2);
+ assert(__deref__(__next__(__begin__(v))) == 2);
+ assert(__deref__(__prior__(__next__(__begin__(v)))) == 1);
+
+[endsect]
+
+[section distance]
+
+[heading Description]
+Returns the distance between 2 iterators.
+
+[heading Synopsis]
+ template<
+ typename I,
+ typename J
+ >
+ typename __result_of_distance__<I, J>::type distance(I const& i, J const& j);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`, `j`] [Models of __forward_iterator__ into the same sequence] [The start and end points of the distance to be measured]]
+]
+
+[heading Expression Semantics]
+ __distance__(i,j);
+
+[*Return type]: `int`
+
+[*Semantics]: Returns the distance between iterators `i` and `j`.
+
+[heading Header]
+ #include <boost/fusion/iterator/distance.hpp>
+ #include <boost/fusion/include/distance.hpp>
+
+[heading Example]
+ typedef __vector__<int,int,int> vec;
+
+ vec v(1,2,3);
+ assert(__distance__(__begin__(v), __next__(__next__(__begin__(v)))) == 2);
+
+[endsect]
+
+[section advance]
+
+[heading Description]
+Moves an iterator by a specified distance.
+
+[heading Synopsis]
+ template<
+ typename I,
+ typename M
+ >
+ typename __result_of_advance__<I, M>::type advance(I const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`] [Model of __forward_iterator__] [Iterator to move relative to]]
+ [[`N`] [An __mpl_integral_constant__] [Number of positions to move]]
+]
+
+[heading Expression Semantics]
+ __advance__<M>(i);
+
+[*Return type]: A model of the same iterator concept as `i`.
+
+[*Semantics]: Returns an iterator to the element `M` positions from `i`. If `i` is a __bidirectional_iterator__ then `M` may be negative.
+
+[heading Header]
+ #include <boost/fusion/iterator/advance.hpp>
+ #include <boost/fusion/include/advance.hpp>
+
+[heading Example]
+ typedef __vector__<int,int,int> vec;
+
+ vec v(1,2,3);
+ assert(__deref__(__advance__<mpl::int_<2> >(__begin__(v))) == 3);
+
+[endsect]
+
+[section advance_c]
+
+[heading Description]
+Moves an iterator by a specified distance.
+
+[heading Synopsis]
+ template<
+ typename I,
+ int N
+ >
+ typename __result_of_advance_c__<I, N>::type advance_c(I const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`] [Model of __forward_iterator__] [Iterator to move relative to]]
+ [[`N`] [Integer constant] [Number of positions to move]]
+]
+
+[heading Expression Semantics]
+ __advance_c__<N>(i);
+
+[*Return type]: A model of the same iterator concept as `i`.
+
+[*Semantics]: Returns an iterator to the element `N` positions from `i`. If `i` is a __bidirectional_iterator__ then `N` may be negative.
+
+[heading Header]
+ #include <boost/fusion/iterator/advance_c.hpp>
+ #include <boost/fusion/include/advance_c.hpp>
+
+[heading Example]
+ typedef __vector__<int,int,int> vec;
+
+ vec v(1,2,3);
+ assert(__deref__(__advance_c__<2>(__begin__(v))) == 3);
+
+[endsect]
+
+[endsect]
+
+[section Operator]
+
+Overloaded operators are provided to provide a more natural syntax for dereferencing iterators, and comparing them for equality.
+
+[section:operator_unary_star Operator *]
+
+[heading Description]
+Dereferences an iterator.
+
+[heading Synopsis]
+ template<
+ typename I
+ >
+ typename __result_of_deref__<I>::type operator*(__unspecified__<I> const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`] [Model of __forward_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ *i
+
+[*Return type]: Equivalent to the return type of `__deref__(i)`.
+
+[*Semantics]: Equivalent to `__deref__(i)`.
+
+[heading Header]
+ #include <boost/fusion/iterator/deref.hpp>
+ #include <boost/fusion/include/deref.hpp>
+
+[heading Example]
+ typedef __vector__<int,int&> vec;
+
+ int i(0);
+ vec v(1,i);
+ assert(*__begin__(v) == 1);
+ assert(*__next__(__begin__(v)) == 0);
+ assert(&(*__next__(__begin__(v))) == &i);
+
+[endsect]
+
+[section:operator_equality Operator ==]
+
+[heading Description]
+Compares 2 iterators for equality.
+
+[heading Synopsis]
+ template<
+ typename I,
+ typename J
+ >
+ __unspecified__ operator==(I const& i, J const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`, `j`] [Any fusion iterators] [Operation's arguments]]
+]
+
+[heading Expression Semantics]
+ i == j
+
+[*Return type]: Convertible to `bool`.
+
+[*Semantics]: Equivalent to `__result_of_equal_to__<I,J>::value` where `I` and `J` are the types of `i` and `j` respectively.
+
+[heading Header]
+ #include <boost/fusion/iterator/equal_to.hpp>
+ #include <boost/fusion/include/equal_to.hpp>
+
+[endsect]
+
+[section:operator_inequality Operator !=]
+
+[heading Description]
+Compares 2 iterators for inequality.
+
+[heading Synopsis]
+ template<
+ typename I,
+ typename J
+ >
+ __unspecified__ operator==(I const& i, J const& i);
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`i`, `j`] [Any fusion iterators] [Operation's arguments]]
+]
+
+[heading Expression Semantics]
+
+[*Return type]: Convertible to `bool`.
+
+[*Semantics]: Equivalent to `!__result_of_equal_to__<I,J>::value` where `I` and `J` are the types of `i` and `j` respectively.
+
+[heading Header]
+ #include <boost/fusion/iterator/equal_to.hpp>
+ #include <boost/fusion/include/equal_to.hpp>
+
+[endsect]
+
+[endsect]
+
+[section Metafunctions]
+
+[section value_of]
+
+[heading Description]
+
+Returns the type stored at the position of an iterator.
+
+[heading Synopsis]
+ template<
+ typename I
+ >
+ struct value_of
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`] [Model of __forward_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_value_of__<I>::type
+
+[*Return type]: Any type
+
+[*Semantics]: Returns the type stored in a sequence at iterator position `I`.
+
+[heading Header]
+ #include <boost/fusion/iterator/value_of.hpp>
+ #include <boost/fusion/include/value_of.hpp>
+
+[heading Example]
+ typedef __vector__<int,int&,const int&> vec;
+ typedef __result_of_begin__<vec>::type first;
+ typedef __result_of_next__<first>::type second;
+ typedef __result_of_next__<second>::type third;
+
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<first>::type, int>));
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<second>::type, int&>));
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<third>::type, const int&>));
+
+[endsect]
+
+[section deref]
+
+[heading Description]
+Returns the type that will be returned by dereferencing an iterator.
+
+[heading Synposis]
+ template<
+ typename I
+ >
+ struct deref
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`] [Model of __forward_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_deref__<I>::type
+
+[*Return type]: Any type
+
+[*Semantics]: Returns the result of dereferencing an iterator of type `I`.
+
+[heading Header]
+ #include <boost/fusion/iterator/deref.hpp>
+ #include <boost/fusion/include/deref.hpp>
+
+[heading Example]
+ typedef __vector__<int,int&> vec;
+ typedef const vec const_vec;
+ typedef __result_of_begin__<vec>::type first;
+ typedef __result_of_next__<first>::type second;
+
+ typedef __result_of_begin__<const_vec>::type const_first;
+ typedef __result_of_next__<const_first>::type const_second;
+
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__<first>::type, int&>));
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__<second>::type, int&>));
+
+[endsect]
+
+[section next]
+
+[heading Description]
+Returns the type of the next iterator in a sequence.
+
+[heading Synposis]
+ template<
+ typename I
+ >
+ struct next
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`] [Model of __forward_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_next__<I>::type
+
+[*Return type]: A model of the same iterator concept as `I`.
+
+[*Semantics]: Returns an iterator to the next element in the sequence after `I`.
+
+[heading Header]
+ #include <boost/fusion/iterator/next.hpp>
+ #include <boost/fusion/include/next.hpp>
+
+[heading Example]
+ typedef __vector__<int,double> vec;
+ typedef __result_of_next__<__result_of_begin__<vec>::type>::type second;
+
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<second>::type, double>));
+
+[endsect]
+
+[section prior]
+
+[heading Description]
+Returns the type of the previous iterator in a sequence.
+
+[heading Synopsis]
+ template<
+ typename I
+ >
+ struct prior
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`] [Model of __bidirectional_iterator__] [Operation's argument]]
+]
+
+[heading Expression Semantics]
+ __result_of_prior__<I>::type
+
+[*Return type]: A model of the same iterator concept as `I`.
+
+[*Semantics]: Returns an iterator to the previous element in the sequence before `I`.
+
+[heading Header]
+ #include <boost/fusion/iterator/prior.hpp>
+ #include <boost/fusion/include/prior.hpp>
+
+[heading Example]
+ typedef __vector__<int,double> vec;
+ typedef __result_of_next__<__result_of_begin__<vec>::type>::type second;
+
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<second>::type, double>));
+
+ typedef __result_of_prior__<second>::type first;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_of__<first>::type, int>));
+
+[endsect]
+
+[section equal_to]
+
+[heading Description]
+Returns a true-valued __mpl_integral_constant__ if `I` and `J` are equal.
+
+[heading Synopsis]
+ template<
+ typename I,
+ typename J
+ >
+ struct equal_to
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`, `J`] [Any fusion iterators] [Operation's arguments]]
+]
+
+[heading Expression Semantics]
+ __result_of_equal_to__<I, J>::type
+
+[*Return type]: A model of __mpl_integral_constant__.
+
+[*Semantics]: Returns `boost::mpl::true_` if `I` and `J` are iterators to the same position. Returns `boost::mpl::false_` otherwise.
+
+[heading Header]
+ #include <boost/fusion/iterator/equal_to.hpp>
+ #include <boost/fusion/include/equal_to.hpp>
+
+[heading Example]
+ typedef __vector__<int,double> vec;
+ typedef __result_of_begin__<vec>::type first;
+ typedef __result_of_end__<vec>::type last;
+ BOOST_MPL_ASSERT((__result_of_equal_to__<first, first>));
+ BOOST_MPL_ASSERT_NOT((__result_of_equal_to__<first,last>));
+
+[endsect]
+
+[section distance]
+
+[heading Description]
+Returns the distance between two iterators.
+
+[heading Synopsis]
+ template<
+ typename I,
+ typename J
+ >
+ struct distance
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`, `J`] [Models of __forward_iterator__ into the same sequence] [The start and end points of the distance to be measured]]
+]
+
+[heading Expression Semantics]
+ __result_of_distance__<I, J>::type
+
+[*Return type]: A model of __mpl_integral_constant__.
+
+[*Semantics]: Returns the distance between iterators of types `I` and `J`.
+
+[heading Header]
+ #include <boost/fusion/iterator/distance.hpp>
+ #include <boost/fusion/include/distance.hpp>
+
+[heading Example]
+ typedef __vector__<int,double,char> vec;
+ typedef __result_of_begin__<vec>::type first;
+ typedef __result_of_next__<first>::type second;
+ typedef __result_of_next__<second>::type third;
+ typedef __result_of_distance__<first,third>::type dist;
+
+ BOOST_MPL_ASSERT_RELATION(dist::value, ==, 2);
+
+[endsect]
+
+[section advance]
+
+[heading Description]
+Moves an iterator a specified distance.
+
+[heading Synopsis]
+ template<
+ typename I,
+ typename M
+ >
+ struct advance
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`] [Model of __forward_iterator__] [Iterator to move relative to]]
+ [[`M`] [Model of __mpl_integral_constant__] [Number of positions to move]]
+]
+
+[heading Expression Semantics]
+ __result_of_advance__<I,M>::type
+
+[*Return type]: A model of the same iterator concept as `I`.
+
+[*Semantics]: Returns an iterator a distance `M` from `I`. If `I` is a __bidirectional_iterator__ then `M` may be negative.
+
+[heading Header]
+ #include <boost/fusion/iterator/advance.hpp>
+ #include <boost/fusion/include/advance.hpp>
+
+[heading Example]
+ typedef __vector__<int,double,char> vec;
+ typedef __result_of_begin__<vec>::type first;
+ typedef __result_of_next__<first>::type second;
+ typedef __result_of_next__<second>::type third;
+
+ BOOST_MPL_ASSERT((__result_of_equal_to__<__result_of_advance__<first, boost::mpl::int_<2> >::type, third>));
+
+[endsect]
+
+[section advance_c]
+
+[heading Description]
+Moves an iterator by a specified distance.
+
+[heading Synopsis]
+ template<
+ typename I,
+ int N
+ >
+ struct advance_c
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`I`] [Model of __forward_iterator__] [Iterator to move relative to]]
+ [[`N`] [Integer constant] [Number of positions to move]]
+]
+
+[heading Expression Semantics]
+ __result_of_advance_c__<I, N>::type
+
+[*Return type]: A model of the same iterator concept as `I`.
+
+[*Semantics]: Returns an iterator a distance `N` from `I`. If `I` is a __bidirectional_iterator__ then `N` may be negative. Equivalent to `__result_of_advance__<I, boost::mpl::int_<N> >::type`.
+
+[heading Header]
+ #include <boost/fusion/iterator/advance_c.hpp>
+ #include <boost/fusion/include/advance_c.hpp>
+
+[heading Example]
+ typedef __vector__<int,double,char> vec;
+ typedef __result_of_begin__<vec>::type first;
+ typedef __result_of_next__<first>::type second;
+ typedef __result_of_next__<second>::type third;
+
+ BOOST_MPL_ASSERT((__result_of_equal_to__<__result_of_advance_c__<first, 2>::type, third>));
+
+[endsect]
+
+[endsect]
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/notes.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/notes.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,153 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Notes]
+
+[heading Recursive Inlined Functions]
+
+An interesting peculiarity of functions like __at__ when applied to a
+__forward_sequence__ like __list__ is that what could have been linear
+runtime complexity effectively becomes constant O(1) due to compiler
+optimization of C++ inlined functions, however deeply recursive (up to a
+certain compiler limit of course). Compile time complexity remains linear.
+
+[heading Overloaded Functions]
+
+Associative sequences use function overloading to implement membership
+testing and type associated key lookup. This amounts to constant runtime
+and amortized constant compile time complexities. There is an overloaded
+function, `f(k)`, for each key /type/ `k`. The compiler chooses the
+appropriate function given a key, `k`.
+
+[heading Tag Dispatching]
+
+Tag dispatching is a generic programming technique for selecting template
+specializations. There are typically 3 components involved in the tag
+dispatching mechanism:
+
+# A type for which an appropriate template specialization is required
+# A metafunction that associates the type with a tag type
+# A template that is specialized for the tag type
+
+For example, the fusion `result_of::begin` metafunction is implemented
+as follows:
+
+ template <typename Sequence>
+ struct begin
+ {
+ typedef typename
+ result_of::begin_impl<typename traits::tag_of<Sequence>::type>::
+ template apply<Sequence>::type
+ type;
+ };
+
+In the case:
+
+# `Sequence` is the type for which a suitable implementation of
+ `result_of::begin_impl` is required
+# `traits::tag_of` is the metafunction that associates `Sequence`
+ with an appropriate tag
+# `result_of::begin_impl` is the template which is specialized to provide
+ an implementation for each tag type
+
+[heading Extensibility]
+
+Unlike __mpl__, there is no extensibe sequence concept in fusion. This does
+not mean that Fusion sequences are not extensible. In fact, all Fusion
+sequences are inherently extensible. It is just that the manner of sequence
+extension in Fusion is diferent from both __stl__ and __mpl__ on account of
+the lazy nature of fusion __algorithms__. __stl__ containers extend
+themselves in place though member functions such as __push_back__ and
+__insert__. __mpl__ sequences, on the other hand, are extended through
+"intrinsic" functions that actually return whole sequences. __mpl__ is
+purely functional and can not have side effects. For example, __mpl__'s
+`push_back` does not actually mutate an `mpl::vector`. It can't do that.
+Instead, it returns an extended `mpl::vector`.
+
+Like __mpl__, Fusion too is purely functional and can not have side
+effects. With runtime efficiency in mind, Fusion sequences are extended
+through generic functions that return __views__. __views__ are sequences
+that do not actually contain data, but instead impart an alternative
+presentation over the data from one or more underlying sequences. __views__
+are proxies. They provide an efficient yet purely functional way to work on
+potentially expensive sequence operations. For example, given a __vector__,
+Fusion's __push_back__ returns a __joint_view__, instead of an actual
+extended __vector__. A __joint_view__ holds a reference to the original
+sequence plus the appended data --making it very cheap to pass around.
+
+[heading Element Conversion]
+
+Functions that take in elemental values to form sequences (e.g.
+__make_list__) convert their arguments to something suitable to be stored
+as a sequence element. In general, the element types are stored as plain
+values. Example:
+
+ __make_list__(1, 'x')
+
+returns a __list__`<int, char>`.
+
+There are a few exceptions, however.
+
+[*Arrays:]
+
+Array arguments are deduced to reference to const types. For example
+[footnote Note that the type of a string literal is an array of const
+characters, not `const char*`. To get __make_list__ to create a __list__
+with an element of a non-const array type one must use the `ref` wrapper
+(see __note_boost_ref__).]:
+
+ __make_list__("Donald", "Daisy")
+
+creates a __list__ of type
+
+ __list__<const char (&)[7], const char (&)[6]>
+
+[*Function pointers:]
+
+Function pointers are deduced to the plain non-reference type (i.e. to
+plain function pointer). Example:
+
+ void f(int i);
+ ...
+ __make_list__(&f);
+
+creates a __list__ of type
+
+ __list__<void (*)(int)>
+
+[heading boost::ref]
+
+Fusion's generation functions (e.g. __make_list__) by default stores the
+element types as plain non-reference types. Example:
+
+ void foo(const A& a, B& b) {
+ ...
+ __make_list__(a, b)
+
+creates a __list__ of type
+
+ __list__<A, B>
+
+Sometimes the plain non-reference type is not desired. You can use
+`boost::ref` and `boost::cref` to store references or const references
+(respectively) instead. The mechanism does not compromise const correctness
+since a const object wrapped with ref results in a tuple element with const
+reference type (see the fifth code line below). Examples:
+
+For example:
+
+ A a; B b; const A ca = a;
+ __make_list__(cref(a), b); // creates list<const A&, B>
+ __make_list__(ref(a), b); // creates list<A&, B>
+ __make_list__(ref(a), cref(b)); // creates list<A&, const B&>
+ __make_list__(cref(ca)); // creates list<const A&>
+ __make_list__(ref(ca)); // creates list<const A&>
+
+See __boost_ref__ for details.
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/organization.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/organization.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,87 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Organization]
+
+The library is organized into layers of modules, with each module addressing a particular
+area of responsibility. A module may not depend on modules in higher layers.
+
+The library is organized in three layers:
+
+[heading Layers]
+
+[:[$images/fusion_org.png]]
+
+The entire library is found in the `"boost/fusion"` directory. Modules are
+organized in directories. Each module has its own header file placed in
+the same directory with the actual module-directory. For example, there
+exists `"boost/fusion/support.hpp"` in the same directory as
+"boost/fusion/support". Everything, except those found inside "detail"
+directories, is public.
+
+There is also a `"boost/fusion/include/"` directory that contains all the
+headers to all the components and modules. If you are unsure where to
+find a specific component or module, or don't want to fuss with
+hierarchy and nesting, use this.
+
+The library is header-only. There is no need to build object files to
+link against.
+
+[heading Directory]
+
+* tuple
+* algorithm
+ * iteration
+ * query
+ * transformation
+* adapted
+ * array
+ * mpl
+ * boost::tuple
+ * std_pair
+ * struct
+ * variant
+* view
+ * filter_view
+ * iterator_range
+ * joint_view
+ * reverse_view
+ * single_view
+ * transform_view
+ * zip_view
+* container
+ * deque
+ * list
+ * map
+ * set
+ * vector
+ * generation
+* mpl
+* functional
+* sequence
+ * comparison
+ * intrinsic
+ * io
+* iterator
+* support
+
+[heading Example]
+
+If, for example, you want to use `list`, depending on the granularity that
+you desire, you may do so by including one of
+
+ #include <boost/fusion/container.hpp>
+ #include <boost/fusion/include/container.hpp>
+ #include <boost/fusion/container/list.hpp>
+ #include <boost/fusion/include/list.hpp>
+
+The first includes all containers The second includes only `list`
+[footnote Modules may contain smaller components. Header file
+information for each component will be provided as part of the
+component's documentation.].
+
+[endsect]

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/preface.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/preface.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,75 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Preface]
+
+[:['["Algorithms + Data Structures = Programs.]]]
+[:*--Niklaus Wirth*]
+
+[heading Description]
+
+Fusion is a library for working with heterogenous collections of data,
+commonly referred to as tuples. A set of containers (vector, list, set and map)
+is provided, along with views that provide a transformed presentation
+of their underlying data. Collectively the containers and views are referred to
+as sequences, and Fusion has a suite of algorithms that operate upon the
+various sequence types, using an iterator concept that binds everything
+together.
+
+The architecture is modeled after __mpl__ which in turn is modeled after
+__stl__. It is named "fusion" because the library is a "fusion" of compile
+time metaprogramming with runtime programming.
+
+[heading Motivation]
+
+Tuples are powerful beasts. After having developed two significant projects
+(__spirit__ and __phoenix__) that relied heavily metaprogramming, it
+became apparent that tuples are a powerful means to simplify otherwise tricky
+tasks; especially those that require a combination of metaprogramming and
+manipulation of heterogenous data types with values. While __mpl__ is an
+extremely powerful metaprogramming tool, __mpl__ focuses on type
+manipulation only. Ultimately, you'll have to map these types to real
+values to make them useful in the runtime world where all the real action
+takes place.
+
+As __spirit__ and __phoenix__ evolved, patterns and idioms related to tuple
+manipulation emerged. Soon, it became clear that those patterns and idioms
+were best assembled in a tuples algorithms library. __david_abrahams__
+outlined such a scheme in 2002. At that time, it just so happened that
+__spirit__ and __phoenix__ had an adhoc collection of tuple manipulation
+and traversal routines. It was an instant /AHA!/ moment.
+
+[heading How to use this manual]
+
+Some icons are used to mark certain topics indicative of their relevance.
+These icons precede some text to indicate:
+
+[table Icons
+ [[Icon] [Name] [Meaning]]
+ [[__note__] [Note] [Information provided is auxiliary but will
+ give the reader a deeper insight into a specific
+ topic. May be skipped.]]
+ [[__alert__] [Alert] [Information provided is of utmost importance.]]
+ [[__caution__] [Caution] [A mild warning.]]
+ [[__tip__] [Tip] [A potentially useful and helpful piece of
+ information.]]
+]
+
+This documentation is automatically generated by Boost QuickBook documentation
+tool. QuickBook can be found in the __boost_tools__.
+
+[heading Support]
+
+Please direct all questions to Spirit's mailing list. You can subscribe to the
+__spirit_list__. The mailing list has a searchable archive. A search link to
+this archive is provided in __spirit__'s home page. You may also read and post
+messages to the mailing list through __spirit_general__ (thanks to __gmane__).
+The news group mirrors the mailing list. Here is a link to the archives:
+__mlist_archive__.
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/quick_start.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/quick_start.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,168 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Quick Start]
+
+I assume the reader is already familiar with tuples (__tuple__) and its
+ancestor `std::pair`. The tuple is a generalization of `std::pair` for
+multiple heterogeneous elements (triples, quadruples, etc.). The tuple is
+more or less a synonym for fusion's `__vector__`.
+
+For starters, we shall include all of Fusion's __sequence__(s) [footnote There
+are finer grained header files available if you wish to have more control
+over which components to include (see section __organization__ for
+details).]:
+
+ #include <boost/fusion/sequence.hpp>
+ #include <boost/fusion/include/sequence.hpp>
+
+Let's begin with a `__vector__` [footnote Unless otherwise noted, components are
+in namespace `boost::fusion`. For the sake of simplicity, code in this
+quick start implies `using` directives for the fusion components we will be
+using.]:
+
+ __vector__<int, char, std::string> stuff(1, 'x', "howdy");
+ int i = __at_c__<0>(stuff);
+ char ch = __at_c__<1>(stuff);
+ std::string s = __at_c__<2>(stuff);
+
+Just replace `tuple` for `__vector__` and `get` for `__at_c__` and this is exactly
+like __tuple__. Actually, either names can be used interchangeably. Yet,
+the similarity ends there. You can do a lot more with Fusion `__vector__` or
+`tuple`. Let's see some examples.
+
+[heading Print the vector as XML]
+
+First, let's include the algorithms:
+
+ #include <boost/fusion/algorithm.hpp>
+ #include <boost/fusion/include/algorithm.hpp>
+
+Now, let's write a function object that prints XML of the form <type>data</type>
+for each member in the tuple.
+
+ struct print_xml
+ {
+ template <typename T>
+ void operator()(T const& x) const
+ {
+ std::cout
+ << '<' << typeid(x).name() << '>'
+ << x
+ << "</" << typeid(x).name() << '>'
+ ;
+ }
+ };
+
+Now, finally:
+
+ __for_each__(stuff, print_xml());
+
+That's it! `__for_each__` is a fusion algorithm. It is a generic algorithm
+similar to __stl__'s. It iterates over the sequence and calls a user
+supplied function. In our case, it calls `print_xml`'s `operator()` for
+each element in `stuff`.
+
+[caution The result of `typeid(x).name()` is platform specific. The code
+here is just for exposition. Of course you already know that :-)]
+
+`__for_each__` is generic. With `print_xml`, you can use it to print just about
+any Fusion __sequence__.
+
+[heading Print only pointers]
+
+Let's get a little cleverer. Say we wish to write a /generic/ function
+that takes in an arbitrary sequence and XML prints only those elements
+which are pointers. Ah, easy. First, let's include the `is_pointer` boost
+type trait:
+
+ #include <boost/type_traits/is_pointer.hpp>
+
+Then, simply:
+
+ template <typename Sequence>
+ void xml_print_pointers(Sequence const& seq)
+ {
+ __for_each__(__filter_if__<boost::is_pointer<_> >(seq), print_xml());
+ }
+
+`__filter_if__` is another Fusion algorithm. It returns a __filter_view__,
+a conforming Fusion sequence. This view reflects only those elements that
+pass the given predicate. In this case, the predicate is
+`boost::is_pointer<_>`. This "filtered view" is then passed to the
+__for_each__ algorithm, which then prints the "filtered view" as XML.
+
+Easy, right?
+
+[heading Associative tuples]
+
+Ok, moving on...
+
+Apart from `__vector__`, fusion has a couple of other sequence types to choose
+from. Each sequence has its own characteristics. We have `__list__`, `__set__`,
+`__map__`, plus a multitude of `views` that provide various ways to present the
+sequences.
+
+Fusion's `__map__` associate types with elements. It can be used as a cleverer
+replacement of the `struct`. Example:
+
+ namespace fields
+ {
+ struct name;
+ struct age;
+ }
+
+ typedef __map__<
+ __fusion_pair__<fields::name, std::string>
+ , __fusion_pair__<fields::age, int> >
+ person;
+
+`__map__` is an associative sequence. Its elements are Fusion pairs which differ
+somewhat from `std::pair`. Fusion pairs only contain one member, with the type of
+their second template parameter. The first type parameter of the pair is used as an
+index to the associated element in the sequence. For example, given a `a_person`
+of type, `person`, you can do:
+
+ using namespace fields;
+ std::string person_name = __at_key__<name>(a_person);
+ int person_age = __at_key__<age>(a_person);
+
+Why go through all this trouble, you say? Well, for one, unlike the
+`struct`, we are dealing with a generic data structure. There are a
+multitude of facilities available at your disposal provided out of the box
+with fusion or written by others. With these facilities, introspection
+comes for free, for example. We can write one serialization function (well,
+two, if you consider loading and saving) that will work for all your fusion
+`__map__`s. Example:
+
+ struct saver
+ {
+ template <typename Pair>
+ void operator()(Pair const& data) const
+ {
+ some_archive << data.second;
+ }
+ };
+
+ template <typename Stuff>
+ void save(Stuff const& stuff)
+ {
+ __for_each__(stuff, saver());
+ }
+
+The `save` function is generic and will work for all types of `stuff`
+regardless if it is a `person`, a `dog` or a whole `alternate_universe`.
+
+[heading Tip of the Iceberg]
+
+And... we've barely scratched the surface! You can compose and expand the
+data structures, remove elements from the structures, find specific data
+types, query the elements, filter out types for inspection, transform data
+structures, etc. What you've seen is just the tip of the iceberg.
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/references.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/references.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,26 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 References]
+
+# [@http://boost.org/libs/iterator/doc/new-iter-concepts.html New Iterator Concepts],
+ David Abrahams, Jeremy Siek, Thomas Witt, 2004-11-01.
+# [@http://boost.org/libs/tuple/doc/tuple_users_guide.html The Boost Tuple Library],
+ Jaakko Jarvi, 2001.
+# [@http://www.boost.org/libs/spirit/ Spirit Parser Library],
+ Joel de Guzman, 2001-2006.
+# [@http://www.boost.org/libs/mpl/ The Boost MPL Library],
+ Aleksey Gurtovoy and David Abrahams, 2002-2004.
+# [@http://www.boost.org/doc/html/array.html Boost Array],
+ Nicolai Josuttis, 2002-2004.
+# [@http://www.sgi.com/tech/stl/ Standard Template Library Programmer's Guide],
+ Hewlett-Packard Company, 1994.
+# [@http://www.boost.org/doc/html/ref.html Boost.Ref],
+ Jaakko Jarvi, Peter Dimov, Douglas Gregor, Dave Abrahams, 1999-2002.
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/sequence.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/sequence.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,1870 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Sequence]
+
+Like __mpl__, the Sequence is a fundamental concept in Fusion. A Sequence
+may or may not actually store or contain data. __containers__ are sequences
+that hold data. __views__, on the other hand, are sequences that do not
+store any data. Instead, they are proxies that impart an alternative
+presentation over another sequence. All models of Sequence have an
+associated __iterator__ type that can be used to iterate through the
+Sequence's elements.
+
+[heading Header]
+
+ #include <boost/fusion/sequence.hpp>
+ #include <boost/fusion/include/sequence.hpp>
+
+[section Concepts]
+
+Fusion Sequences are organized into a hierarchy of concepts.
+
+[heading Traversal]
+
+Fusion's sequence traversal related concepts parallel Fusion's
+__iterator_concepts__. __forward_sequence__ is the most basic concept.
+__bidirectional_sequence__ is a refinement of __forward_sequence__.
+__random_access_sequence__ is a refinement of __bidirectional_sequence__.
+These concepts pertain to sequence traversal.
+
+[heading Associativity]
+
+The __associative_sequence__ concept is orthogonal to traversal. An Associative
+Sequence allows efficient retrieval of elements based on keys.
+
+[section Forward Sequence]
+
+[heading Description]
+
+A Forward Sequence is a Sequence whose elements are arranged in a definite
+order. The ordering is guaranteed not to change from iteration to
+iteration. The requirement of a definite ordering allows the definition of
+element-by-element equality (if the container's element type is Equality
+Comparable) and of lexicographical ordering (if the container's element
+type is LessThan Comparable).
+
+[variablelist Notation
+ [[`s`] [A Forward Sequence]]
+ [[`S`] [A Forward Sequence type]]
+ [[`o`] [An arbitrary object]]
+ [[`e`] [A Sequence element]]
+]
+
+[heading Valid Expressions]
+
+For any Forward Sequence the following expressions must be valid:
+
+[table
+ [[Expression] [Return type] [Type Requirements] [Runtime Complexity]]
+ [[`__begin__(s)`] [__forward_iterator__] [] [Constant]]
+ [[`__end__(s)`] [__forward_iterator__] [] [Constant]]
+ [[`__size__(s)`] [__mpl_integral_constant__.
+ Convertible to int.] [] [Constant]]
+ [[`__empty__(s)`] [__mpl_boolean_constant__.
+ Convertible to bool.] [] [Constant]]
+ [[`__front__(s)`] [Any type] [] [Constant]]
+ [[`__front__(s) = o`] [Any type] [`s` is mutable and
+ `e = o`, where `e`
+ is the first element
+ in the sequence, is
+ a valid expression.] [Constant]]
+]
+
+[heading Result Type Expressions]
+
+[table
+ [[Expression] [Compile Time Complexity]]
+ [[`__result_of_begin__<S>::type`] [Amortized constant time]]
+ [[`__result_of_end__<S>::type`] [Amortized constant time]]
+ [[`__result_of_size__<S>::type`] [Unspecified]]
+ [[`__result_of_empty__<S>::type`] [Constant time]]
+ [[`__result_of_front__<S>::type`] [Amortized constant time]]
+]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`__begin__(s)`] [An iterator to the first element of the sequence; see __begin__.]]
+ [[`__end__(s)`] [A past-the-end iterator to the sequence; see __end__.]]
+ [[`__size__(s)`] [The size of the sequence; see __size__.]]
+ [[`__empty__(s)`] [A boolean Integral Constant `c` such that
+ `c::value == true` if and only if the sequence
+ is empty; see __empty__.]]
+ [[`__front__(s)`] [The first element in the sequence; see __front__.]]
+]
+
+[heading Invariants]
+
+For any Forward Sequence s the following invariants always hold:
+
+* `[__begin__(s), __end__(s))` is always a valid range.
+* An __algorithm__ that iterates through the range `[__begin__(s), __end__(s))`
+ will pass through every element of `s` exactly once.
+* `__begin__(s)` is identical to `__end__(s))` if and only if `s` is empty.
+* Two different iterations through `s` will access its elements in
+ the same order.
+
+[heading Models]
+
+* __std_pair__
+* __boost_array__
+* __vector__
+* __cons__
+* __list__
+* __set__
+* __map__
+* __single_view__
+* __filter_view__
+* __iterator_range__
+* __joint_view__
+* __transform_view__
+* __reverse_view__
+* __zip_view__
+
+[endsect]
+
+[section Bidirectional Sequence]
+
+[heading Description]
+
+A Bidirectional Sequence is a __forward_sequence__ whose iterators model
+__bidirectional_iterator__.
+
+[heading Refinement of]
+
+__forward_sequence__
+
+[variablelist Notation
+ [[`s`] [A Forward Sequence]]
+ [[`S`] [A Forward Sequence type]]
+ [[`o`] [An arbitrary object]]
+ [[`e`] [A Sequence element]]
+]
+
+[heading Valid Expressions]
+
+In addition to the requirements defined in __forward_sequence__, for any
+Bidirectional Sequence the following must be met:
+
+[table
+ [[Expression] [Return type] [Type Requirements] [Runtime Complexity]]
+ [[`__begin__(s)`] [__bidirectional_iterator__] [] [Constant]]
+ [[`__end__(s)`] [__bidirectional_iterator__] [] [Constant]]
+ [[`__back__(s)`] [Any type] [] [Constant]]
+ [[`__back__(s) = o`] [Any type] [`s` is mutable and
+ `e = o`, where `e`
+ is the first element
+ in the sequence, is
+ a valid expression.] [Constant]]
+]
+
+[heading Result Type Expressions]
+
+[table
+ [[Expression] [Compile Time Complexity]]
+ [[`__result_of_begin__<S>::type`] [Amortized constant time]]
+ [[`__result_of_end__<S>::type`] [Amortized constant time]]
+ [[`__result_of_back__<S>::type`] [Amortized constant time]]
+]
+
+[heading Expression Semantics]
+
+The semantics of an expression are defined only where they differ from, or
+are not defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`__back__(s)`] [The last element in the sequence; see __back__.]]
+]
+
+[heading Models]
+
+* __std_pair__
+* __boost_array__
+* __vector__
+* __reverse_view__
+* __iterator_range__ (where adapted sequence is a Bidirectional Sequence)
+* __transform_view__ (where adapted sequence is a Bidirectional Sequence)
+* __zip_view__ (where adapted sequences are models Bidirectional Sequence)
+
+[endsect]
+
+[section Random Access Sequence]
+
+[heading Description]
+
+A Random Access Sequence is a __bidirectional_sequence__ whose iterators
+model __random_access_iterator__. It guarantees constant time access to
+arbitrary sequence elements.
+
+[heading Refinement of]
+
+__bidirectional_sequence__
+
+[variablelist Notation
+ [[`s`] [A Random Access Sequence]]
+ [[`S`] [A Random Access Sequence type]]
+ [[`N`] [An __mpl_integral_constant__]]
+ [[`o`] [An arbitrary object]]
+ [[`e`] [A Sequence element]]
+]
+
+[heading Valid Expressions]
+
+In addition to the requirements defined in __bidirectional_sequence__, for
+any Random Access Sequence the following must be met:
+
+[table
+ [[Expression] [Return type] [Type Requirements] [Runtime Complexity]]
+ [[`__begin__(s)`] [__random_access_iterator__] [] [Constant]]
+ [[`__end__(s)`] [__random_access_iterator__] [] [Constant]]
+ [[`__at__<N>(s)`] [Any type] [] [Constant]]
+ [[`__at__<N>(s) = o`] [Any type] [`s` is mutable and
+ `e = o`, where `e`
+ is the first element
+ in the sequence, is
+ a valid expression.] [Constant]]
+]
+
+[heading Result Type Expressions]
+
+[table
+ [[Expression] [Compile Time Complexity]]
+ [[`__result_of_begin__<S>::type`] [Amortized constant time]]
+ [[`__result_of_end__<S>::type`] [Amortized constant time]]
+ [[`__result_of_at__<S, N>::type`] [Amortized constant time]]
+ [[`__result_of_value_at__<S, N>::type`] [Amortized constant time]]
+]
+
+[blurb __note__ `__result_of_at__<S, N>` returns the actual type returned by
+`__at__<N>(s)`. In most cases, this is a reference. Hence, there is no way to
+know the exact element type using `__result_of_at__<S, N>`.The element at `N`
+may actually be a reference to begin with. For this purpose, you can use
+`__result_of_value_at__<S, N>`.]
+
+[heading Expression Semantics]
+
+The semantics of an expression are defined only where they differ from, or
+are not defined in __bidirectional_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`__at__<N>(s)`] [The Nth element from the beginning of the sequence; see __at__.]]
+]
+
+[heading Models]
+
+* __std_pair__
+* __boost_array__
+* __vector__
+* __reverse_view__
+* __iterator_range__ (where adapted sequence is a Random Access Sequence)
+* __transform_view__ (where adapted sequence is a Random Access Sequence)
+* __zip_view__ (where adapted sequences are models Random Access Sequence)
+
+[endsect]
+
+[section Associative Sequence]
+
+[heading Description]
+
+An Associative Sequence allows efficient retrieval of elements based on keys.
+Like associative sequences in __mpl__, and unlike associative containers in
+__stl__, Fusion associative sequences have no implied ordering relation.
+Instead, type identity is used to impose an equivalence relation on keys, and
+the order in which sequence elements are traversed during iteration is left
+unspecified. In addition, unlike __stl__, Associative Sequences have mutable
+iterators. This is due to the fact that there is no associated ordering relation
+and the runtime value of the keys themselves do not have any effect on the
+associativity of the sequence.
+
+
+[variablelist Notation
+ [[`s`] [An Associative Sequence]]
+ [[`S`] [An Associative Sequence type]]
+ [[`K`] [An arbitrary /key/ type]]
+ [[`o`] [An arbitrary object]]
+ [[`e`] [A Sequence element]]
+]
+
+[heading Valid Expressions]
+
+For any Associative Sequence the following expressions must be valid:
+
+[table
+ [[Expression] [Return type] [Type Requirements] [Runtime Complexity]]
+ [[`__has_key__<K>(s)`] [__mpl_boolean_constant__.
+ Convertible to bool.] [] [Constant]]
+ [[`__at_key__<K>(s)`] [Any type] [] [Constant]]
+ [[`__at_key__<K>(s) = o`] [Any type] [`s` is mutable and
+ `e = o`, where `e`
+ is the first element
+ in the sequence, is
+ a valid expression.] [Constant]]
+]
+
+[heading Result Type Expressions]
+
+[table
+ [[Expression] [Compile Time Complexity]]
+ [[`__result_of_has_key__<S, K>::type`] [Amortized constant time]]
+ [[`__result_of_at_key__<S, K>::type`] [Amortized constant time]]
+ [[`__result_of_value_at_key__<S, K>::type`] [Amortized constant time]]
+]
+
+[blurb __note__ `__result_of_at_key__<S, K>` returns the actual type returned
+by `__at_key__<K>(s)`. In most cases, this is a reference. Hence, there is no
+way to know the exact element type using `__result_of_at_key__<S, K>`.The
+element at `K` may actually be a reference to begin with. For this purpose,
+you can use `__result_of_value_at_key__<S, N>`.]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`__has_key__<K>(s)`] [A boolean Integral Constant `c` such that
+ `c::value == true` if and only if there is
+ one or more elements with the key `k` in `s`;
+ see __has_key__.]]
+ [[`__at_key__<K>(s)`] [The element associated with the key
+ `K` in the sequence `s`; see __at__.]]
+]
+
+[heading Models]
+
+* __set__
+* __map__
+
+[endsect]
+
+[endsect]
+
+[section Intrinsic]
+
+Intrinsic form the essential interface of every Fusion __sequence__. __stl__
+counterparts of these functions are usually implemented as member
+functions. Intrinsic functions, unlike __algorithms__, are not generic
+across the full __sequence__ repertoire. They need to be implemented for
+each Fusion __sequence__[footnote In practice, many of intrinsic functions
+have default implementations that will work in majority of cases].
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic.hpp>
+ #include <boost/fusion/include/intrinsic.hpp>
+
+[section Functions]
+
+[section begin]
+
+[heading Description]
+
+Returns an iterator pointing to the first element in the sequence.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename __result_of_begin__<Sequence>::type
+ begin(Sequence& seq);
+
+ template <typename Sequence>
+ typename __result_of_begin__<Sequence const>::type
+ begin(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]]
+]
+
+[heading Expression Semantics]
+
+ begin(seq);
+
+[*Return type]: __forward_iterator__ if `seq` is a __forward_sequence__
+else, __bidirectional_iterator__ if `seq` is a __bidirectional_sequence__
+else, __random_access_iterator__ if `seq` is a __random_access_sequence__.
+
+[*Semantics]: Returns an iterator pointing to the first element in the sequence.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/begin.hpp>
+ #include <boost/fusion/include/begin.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(__deref__(begin(v)) == 1);
+
+[endsect]
+
+[section end]
+
+[heading Description]
+
+Returns an iterator pointing to one element past the end of the sequence.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename __result_of_end__<Sequence>::type
+ end(Sequence& seq);
+
+ template <typename Sequence>
+ typename __result_of_end__<Sequence const>::type
+ end(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __forward_sequence__] [The sequence we wish to get an iterator from.]]
+]
+
+[heading Expression Semantics]
+
+ end(seq);
+
+[*Return type]: __forward_iterator__ if `seq` is a __forward_sequence__
+else, __bidirectional_iterator__ if `seq` is a __bidirectional_sequence__
+else, __random_access_iterator__ if `seq` is a __random_access_sequence__.
+
+[*Semantics]: Returns an iterator pointing to one element past the end of
+the sequence.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/end.hpp>
+ #include <boost/fusion/include/end.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(__deref__(__prior__(end(v))) == 3);
+
+[endsect]
+
+[section empty]
+
+[heading Description]
+
+Returns a type convertible to `bool` that evaluates to `true` if the
+sequence is empty, else, evaluates to `false`.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename __result_of_empty__<Sequence>::type
+ empty(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]]
+]
+
+[heading Expression Semantics]
+
+ empty(seq);
+
+[*Return type]: Convertible to `bool`.
+
+[*Semantics]: Evaluates to `true` if the sequence is empty, else, evaluates
+to `false`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/empty.hpp>
+ #include <boost/fusion/include/empty.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(empty(v) == false);
+
+[endsect]
+
+[section front]
+
+[heading Description]
+
+Returns the first element in the sequence.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename __result_of_front__<Sequence>::type
+ front(Sequence& seq);
+
+ template <typename Sequence>
+ typename __result_of_front__<Sequence const>::type
+ front(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]]
+]
+
+[heading Expression Semantics]
+
+ front(seq);
+
+[*Return type]: Returns a reference to the first element in the sequence
+`seq` if `seq` is mutable and `e = o`, where `e` is the first element in
+the sequence, is a valid expression. Else, returns a type convertable to
+the first element in the sequence.
+
+[*Precondition]: `__empty__(seq) == false`
+
+[*Semantics]: Returns the first element in the sequence.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/front.hpp>
+ #include <boost/fusion/include/front.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(front(v) == 1);
+
+[endsect]
+
+[section back]
+
+[heading Description]
+
+Returns the last element in the sequence.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename __result_of_back__<Sequence>::type
+ back(Sequence& seq);
+
+ template <typename Sequence>
+ typename __result_of_back__<Sequence const>::type
+ back(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __bidirectional_sequence__] [The sequence we wish to investigate.]]
+]
+
+[heading Expression Semantics]
+
+ back(seq);
+
+[*Return type]: Returns a reference to the last element in the sequence
+`seq` if `seq` is mutable and `e = o`, where `e` is the last element in the
+sequence, is a valid expression. Else, returns a type convertable to the
+last element in the sequence.
+
+[*Precondition]: `__empty__(seq) == false`
+
+[*Semantics]: Returns the last element in the sequence.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/back.hpp>
+ #include <boost/fusion/include/back.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(back(v) == 3);
+
+[endsect]
+
+[section size]
+
+[heading Description]
+
+Returns a type convertible to `int` that evaluates the number of elements
+in the sequence.
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ typename __result_of_size__<Sequence>::type
+ size(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __forward_sequence__] [The sequence we wish to investigate.]]
+]
+
+[heading Expression Semantics]
+
+ size(seq);
+
+[*Return type]: Convertible to `int`.
+
+[*Semantics]: Returns the number of elements in the sequence.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/size.hpp>
+ #include <boost/fusion/include/size.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(size(v) == 3);
+
+[endsect]
+
+[section at]
+
+[heading Description]
+
+Returns the N-th element from the beginning of the sequence.
+
+[heading Synopsis]
+
+ template <typename N, typename Sequence>
+ typename __result_of_at__<Sequence, N>::type
+ at(Sequence& seq);
+
+ template <typename N, typename Sequence>
+ typename __result_of_at__<Sequence const, N>::type
+ at(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]]
+ [[`N`] [An __mpl_integral_constant__] [An index from the beginning of the
+ sequence.]]
+]
+
+[heading Expression Semantics]
+
+ at<N>(seq);
+
+[*Return type]: Returns a reference to the N-th element from the beginning
+of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th
+element from the beginning of the sequence, is a valid expression. Else,
+returns a type convertable to the N-th element from the beginning of the
+sequence.
+
+[*Precondition]: `0 <= N::value < __size__(s)`
+
+[*Semantics]: Equivalent to
+
+ __deref__(__advance__<N>(__begin__(s)))
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/at.hpp>
+ #include <boost/fusion/include/at.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(at<mpl::int_<1> >(v) == 2);
+
+[endsect]
+
+[section at_c]
+
+[heading Description]
+
+Returns the N-th element from the beginning of the sequence.
+
+[heading Synopsis]
+
+ template <int N, typename Sequence>
+ typename __result_of_at_c__<Sequence, N>::type
+ at_c(Sequence& seq);
+
+ template <int N, typename Sequence>
+ typename __result_of_at_c__<Sequence const, N>::type
+ at_c(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __random_access_sequence__] [The sequence we wish to investigate.]]
+ [[`N`] [An integral constant] [An index from the beginning of the
+ sequence.]]
+]
+
+[heading Expression Semantics]
+
+ at_c<N>(seq);
+
+[*Return type]: Returns a reference to the N-th element from the beginning
+of the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the N-th
+element from the beginning of the sequence, is a valid expression. Else,
+returns a type convertable to the N-th element from the beginning of the
+sequence.
+
+[*Precondition]: `0 <= N < __size__(s)`
+
+[*Semantics]: Equivalent to
+
+ __deref__(__advance__<N>(__begin__(s)))
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/at_c.hpp>
+ #include <boost/fusion/include/at_c.hpp>
+
+[heading Example]
+
+ __vector__<int, int, int> v(1, 2, 3);
+ assert(at_c<1>(v) == 2);
+
+[endsect]
+
+[section has_key]
+
+[heading Description]
+
+Returns a type convertible to `bool` that evaluates to `true` if the
+sequence contains an element associated with a Key, else, evaluates to
+`false`.
+
+[heading Synopsis]
+
+ template <typename Key, typename Sequence>
+ typename __result_of_has_key__<Sequence, Key>::type
+ has_key(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]]
+ [[`Key`] [Any type] [The queried key.]]
+]
+
+[heading Expression Semantics]
+
+ has_key<Key>(seq);
+
+[*Return type]: Convertible to `bool`.
+
+[*Semantics]: Evaluates to `true` if the sequence contains an element
+associated with Key, else, evaluates to `false`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/has_key.hpp>
+ #include <boost/fusion/include/has_key.hpp>
+
+[heading Example]
+
+ __set__<int, char, bool> s(1, 'x', true);
+ assert(has_key<char>(s) == true);
+
+[endsect]
+
+[section at_key]
+
+[heading Description]
+
+Returns the element associated with a Key from the sequence.
+
+[heading Synopsis]
+
+ template <typename Key, typename Sequence>
+ typename __result_of_at_key__<Sequence, Key>::type
+ at_key(Sequence& seq);
+
+ template <typename Key, typename Sequence>
+ typename __result_of_at_key__<Sequence const, Key>::type
+ at_key(Sequence const& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`seq`] [Model of __associative_sequence__] [The sequence we wish to investigate.]]
+ [[`Key`] [Any type] [The queried key.]]
+]
+
+[heading Expression Semantics]
+
+ at_key<Key>(seq);
+
+[*Return type]: Returns a reference to the element associated with Key from
+the sequence `seq` if `seq` is mutable and `e = o`, where `e` is the
+element associated with Key, is a valid expression. Else, returns a type
+convertable to the element associated with Key.
+
+[*Precondition]: `has_key<Key>(seq) == true`
+
+[*Semantics]: Returns the element associated with Key.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/at_key.hpp>
+ #include <boost/fusion/include/at_key.hpp>
+
+[heading Example]
+
+ __set__<int, char, bool> s(1, 'x', true);
+ assert(at_key<char>(s) == 'x');
+
+[endsect]
+
+[section swap]
+
+[heading Description]
+
+Performs an element by element swap of the elements in 2 sequences.
+
+[heading Synopsis]
+ template<typename Seq1, typename Seq2>
+ void swap(Seq1& seq1, Seq2& seq2);
+
+[heading Parameters]
+
+[table
+ [[Parameters] [Requirement] [Description]]
+ [[`seq1`, `seq2`] [Models of __forward_sequence__][The sequences whos elements we wish to swap.]]
+]
+
+[heading Expression Semantics]
+
+ swap(seq1, seq2);
+
+[*Return type]: `void`
+
+[*Precondition]: `__size__(seq1) == __size__(seq2)`
+
+[*Semantics]: Calls `swap(a1, b1)` for corresponding elements in `seq1` and `seq2`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/swap.hpp>
+ #include <boost/fusion/include/swap.hpp>
+
+[heading Example]
+ __vector__<int, std::string> v1(1, "hello"), v2(2, "world");
+ swap(v1, v2);
+ assert(v1 == __make_vector__(2, "world"));
+ assert(v2 == __make_vector__(1, "hello"));
+
+[endsect]
+
+[endsect]
+
+[section Metafunctions]
+
+[section begin]
+
+[heading Description]
+Returns the result type of __begin__.
+
+[heading Synopsis]
+ template<typename Seq>
+ struct begin
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+]
+
+[heading Expression Semantics]
+ result_of::begin<Seq>::type
+
+[*Return type]: An iterator modelling the same traversal concept as `Seq`.
+
+[*Semantics]: Returns the type of an iterator to the first element of `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/begin.hpp>
+ #include <boost/fusion/include/begin.hpp>
+
+[heading Example]
+ typedef __vector__<int> vec;
+ typedef __result_of_begin__<vec>::type it;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_deref__<it>::type, int&>))
+
+[endsect]
+
+[section end]
+
+[heading Description]
+Returns the result type of __end__.
+
+[heading Synopsis]
+ template<typename Seq>
+ struct end
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+]
+
+[heading Expression Semantics]
+ result_of::end<Seq>::type
+
+[*Return type]: A model of the same traversal concept as `Seq`.
+
+[*Semantics]: Returns the type of an iterator one past the end of `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/end.hpp>
+ #include <boost/fusion/include/end.hpp>
+
+[heading Example]
+ typedef __vector__<int> vec;
+ typedef __result_of_prior__<__result_of_end__<vec>::type>::type first;
+ BOOST_MPL_ASSERT((__result_of_equal_to__<first, __result_of_begin__<vec>::type>))
+
+[endsect]
+
+[section empty]
+
+[heading Description]
+Returns the result type of __empty__.
+
+[heading Synopsis]
+ template<typename Seq>
+ struct empty
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+]
+
+[heading Expression Semantics]
+ result_of::empty<Seq>::type
+
+[*Return type]: An __mpl_integral_constant__
+
+[*Semantics]: Returns `mpl::true_` if `Seq` has zero elements, `mpl::false_` otherwise.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/empty.hpp>
+ #include <boost/fusion/include/empty.hpp>
+
+[heading Example]
+ typedef __vector__<> empty_vec;
+ typedef __vector__<int,float,char> vec;
+
+ BOOST_MPL_ASSERT((__result_of_empty__<empty_vec>));
+ BOOST_MPL_ASSERT_NOT((__result_of_empty__<vec>));
+
+[endsect]
+
+[section front]
+
+[heading Description]
+Returns the result type of __front__.
+
+[heading Synopsis]
+ template<typename Seq>
+ struct front
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+]
+
+[heading Expression Semantics]
+ result_of::front<Seq>::type
+
+[*Return type]: Any type
+
+[*Semantics]: The type returned by dereferencing an iterator to the first element in `Seq`. Equivalent to `__result_of_deref__<__result_of_begin__<Seq>::type>::type`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/front.hpp>
+ #include <boost/fusion/include/front.hpp>
+
+[heading Example]
+ typedef __vector__<int,char> vec;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_front__<vec>::type, int&>));
+
+[endsect]
+
+[section back]
+
+[heading Description]
+Returns the result type of __back__.
+
+[heading Synopsis]
+ template<typename Seq>
+ struct back
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+]
+
+[heading Expression Semantics]
+ result_of::back<Seq>::type
+
+[*Return type]: Any type
+
+[*Semantics]: The type returned by dereferencing an iterator to the last element in the sequence. Equivalent to `__result_of_deref__<__result_of_prior__<__result_of_end__<Seq>::type>::type>::type`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/back.hpp>
+ #include <boost/fusion/include/back.hpp>
+
+[heading Example]
+ typedef __vector__<int,char> vec;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_back__<vec>::type, char&>));
+
+[endsect]
+
+[section size]
+
+[heading Description]
+Returns the result type of __size__.
+
+[heading Synopsis]
+ template<typename Seq>
+ struct size
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+]
+
+[heading Expression Semantics]
+ result_of::size<Seq>::type
+
+[*Return type]: An __mpl_integral_constant__.
+
+[*Semantics]: Returns the number of elements in `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/size.hpp>
+ #include <boost/fusion/include/size.hpp>
+
+[heading Example]
+ typedef __vector__<int,float,char> vec;
+ typedef __result_of_size__<vec>::type size_mpl_integral_constant;
+ BOOST_MPL_ASSERT_RELATION(size_mpl_integral_constant::value, ==, 3);
+
+[endsect]
+
+[section at]
+
+[heading Description]
+
+Returns the result type of __at__[footnote __result_of_at__ reflects the
+actual return type of the function __at__. __sequence__(s) typically return
+references to its elements via the __at__ function. If you want to get
+the actual element type, use __result_of_value_at__].
+
+[heading Synopsis]
+ template<
+ typename Seq,
+ typename N>
+ struct at
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+ [[`N`][An __mpl_integral_constant__][Index of element]]
+]
+
+[heading Expression Semantics]
+ result_of::at<Seq, N>::type
+
+[*Return type]: Any type.
+
+[*Semantics]: Returns the result type of using __at__ to access the `N`th element of `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/at.hpp>
+ #include <boost/fusion/include/at.hpp>
+
+[heading Example]
+ typedef __vector__<int,float,char> vec;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_at__<vec, boost::mpl::int_<1> >::type, float&>));
+
+[endsect]
+
+[section at_c]
+
+[heading Description]
+
+Returns the result type of __at_c__[footnote __result_of_at_c__ reflects
+the actual return type of the function __at_c__. __sequence__(s) typically
+return references to its elements via the __at_c__ function. If you want to
+get the actual element type, use __result_of_value_at_c__].
+
+[heading Synopsis]
+ template<
+ typename Seq,
+ int M>
+ struct at_c
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+ [[`M`][Positive integer index][Index of element]]
+]
+
+[heading Expression Semantics]
+ result_of::at_c<Seq, M>::type
+
+[*Return type]: Any type
+
+[*Semantics]: Returns the result type of using __at_c__ to access the `M`th element of `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/at_c.hpp>
+ #include <boost/fusion/include/at_c.hpp>
+
+[heading Example]
+ typedef __vector__<int,float,char> vec;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_at_c__<vec, 1>::type, float&>));
+
+[endsect]
+
+[section value_at]
+
+[heading Description]
+
+Returns the actual type at a given index from the __sequence__.
+
+[heading Synopsis]
+ template<
+ typename Seq,
+ typename N>
+ struct value_at
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+ [[`N`][An __mpl_integral_constant__][Index of element]]
+]
+
+[heading Expression Semantics]
+ result_of::value_at<Seq, N>::type
+
+[*Return type]: Any type.
+
+[*Semantics]: Returns the actual type at the `N`th element of `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/value_at.hpp>
+ #include <boost/fusion/include/value_at.hpp>
+
+[heading Example]
+ typedef __vector__<int,float,char> vec;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at__<vec, boost::mpl::int_<1> >::type, float>));
+
+[endsect]
+
+[section value_at_c]
+
+[heading Description]
+
+Returns the actual type at a given index from the __sequence__.
+
+[heading Synopsis]
+ template<
+ typename Seq,
+ int M>
+ struct value_at_c
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+ [[`M`][Positive integer index][Index of element]]
+]
+
+[heading Expression Semantics]
+ result_of::value_at_c<Seq, M>::type
+
+[*Return type]: Any type
+
+[*Semantics]: Returns the actual type at the `M`th element of `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/value_at_c.hpp>
+ #include <boost/fusion/include/value_at_c.hpp>
+
+[heading Example]
+ typedef __vector__<int,float,char> vec;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_value_at_c__<vec, 1>::type, float>));
+
+[endsect]
+
+[section has_key]
+
+[heading Description]
+Returns the result type of __has_key__.
+
+[heading Synopsis]
+ template<
+ typename Seq,
+ typename Key>
+ struct has_key
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+ [[`Key`][Any type][Key type]]
+]
+
+[heading Expression Semantics]
+ result_of::has_key<Seq, Key>::type
+
+[*Return type]: An __mpl_integral_constant__.
+
+[*Semantics]: Returns `mpl::true_` if `Seq` contains an element with key type `Key`, returns `mpl::false_` otherwise.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/has_key.hpp>
+ #include <boost/fusion/include/has_key.hpp>
+
+[heading Example]
+ typedef __map__<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > mymap;
+ BOOST_MPL_ASSERT((__result_of_has_key__<mymap, int>));
+ BOOST_MPL_ASSERT_NOT((__result_of_has_key__<mymap, void*>));
+
+[endsect]
+
+[section at_key]
+
+[heading Description]
+
+Returns the result type of __at_key__[footnote __result_of_at_key__
+reflects the actual return type of the function __at_key__. __sequence__s
+typically return references to its elements via the __at_key__ function. If
+you want to get the actual element type, use __result_of_value_at_key__].
+
+[heading Synopsis]
+ template<
+ typename Seq,
+ typename Key>
+ struct at_key
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+ [[`Key`][Any type][Key type]]
+]
+
+[heading Expression Semantics]
+ result_of::at_key<Seq, Key>::type
+
+[*Return type]: Any type.
+
+[*Semantics]: Returns the result of using __at_key__ to access the element with key type `Key` in `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/at_key.hpp>
+ #include <boost/fusion/include/at_key.hpp>
+
+[heading Example]
+ typedef __map__<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > mymap;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__<mymap, int>::type, char&>));
+
+[endsect]
+
+[section value_at_key]
+
+[heading Description]
+Returns the actual element type associated with a Key from the __sequence__.
+
+[heading Synopsis]
+ template<
+ typename Seq,
+ typename Key>
+ struct value_at_key
+ {
+ typedef __unspecified__ type;
+ };
+
+[table Parameters
+ [[Parameter] [Requirement] [Description]]
+ [[`Seq`][A model of __forward_sequence__][Argument sequence]]
+ [[`Key`][Any type][Key type]]
+]
+
+[heading Expression Semantics]
+ result_of::value_at_key<Seq, Key>::type
+
+[*Return type]: Any type.
+
+[*Semantics]: Returns the actual element type associated with key type
+`Key` in `Seq`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+ #include <boost/fusion/include/value_at_key.hpp>
+
+[heading Example]
+ typedef __map__<__pair__<int, char>, __pair__<char, char>, __pair__<double, char> > mymap;
+ BOOST_MPL_ASSERT((boost::is_same<__result_of_at_key__<mymap, int>::type, char>));
+
+[endsect]
+
+[section swap]
+
+[heading Description]
+Returns the return type of swap.
+
+[heading Synopsis]
+ template<typename Seq1, typename Seq2>
+ struct swap
+ {
+ typedef void type;
+ };
+
+[table Parameters
+ [[Parameters] [Requirement] [Description]]
+ [[`Seq1`, `Seq2`][Models of __forward_sequence__][The sequences being swapped]]
+]
+
+[heading Expression Semantics]
+ result_of::swap<Seq1, Seq2>::type
+
+[*Return type]: `void`.
+
+[*Semantics]: Always returns `void`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/intrinsic/swap.hpp>
+ #include <boost/fusion/include/swap.hpp>
+
+[endsect]
+
+[endsect]
+
+[endsect]
+
+[section Operator]
+
+These operators, like the __algorithms__, work generically on all Fusion
+sequences. All conforming Fusion sequences automatically get these
+operators for free.
+
+[section I/O]
+
+The I/O operators: `<<` and `>>` work generically on all Fusion sequences.
+The global `operator<<` has been overloaded for generic output streams such
+that __sequence__(s) are output by recursively calling `operator<<` for each
+element. Analogously, the global `operator>>` has been overloaded to
+extract __sequence__(s) from generic input streams by recursively calling
+`operator>>` for each element.
+
+The default delimiter between the elements is space, and the __sequence__
+is enclosed in parenthesis. For Example:
+
+ __vector__<float, int, std::string> a(1.0f, 2, std::string("Howdy folks!");
+ cout << a;
+
+outputs the __vector__ as: (1.0 2 Howdy folks!)
+
+The library defines three manipulators for changing the default behavior:
+
+[variablelist Manipulators
+ [[`tuple_open(arg)`] [Defines the character that is output before the first element.]]
+ [[`tuple_close(arg)`] [Defines the character that is output after the last element.]]
+ [[`tuple_delimiter(arg)`] [Defines the delimiter character between elements.]]
+]
+
+The argument to `tuple_open`, `tuple_close` and `tuple_delimiter` may be a
+`char`, `wchar_t`, a C-string, or a wide C-string.
+
+Example:
+
+ std::cout << tuple_open('[') << tuple_close(']') << tuple_delimiter(", ") << a;
+
+outputs the same __vector__, `a` as: [1.0, 2, Howdy folks!]
+
+The same manipulators work with `operator>>` and `istream` as well. Suppose
+the `std::cin` stream contains the following data:
+
+ (1 2 3) [4:5]
+
+The code:
+
+ __vector__<int, int, int> i;
+ __vector__<int, int> j;
+
+ std::cin >> i;
+ std::cin >> set_open('[') >> set_close(']') >> set_delimiter(':');
+ std::cin >> j;
+
+reads the data into the __vector__(s) `i` and `j`.
+
+Note that extracting __sequence__(s) with `std::string` or C-style string
+elements does not generally work, since the streamed __sequence__
+representation may not be unambiguously parseable.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/io.hpp>
+ #include <boost/fusion/include/io.hpp>
+
+[section in]
+
+[heading Description]
+
+Read a __sequence__ from an input stream.
+
+[heading Synopsis]
+
+ template <typename IStream, typename Sequence>
+ IStream&
+ operator>>(IStream& is, Sequence& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[is] [An input stream.] [Stream to extract information from.]]
+ [[seq] [A __sequence__.] [The sequence to read.]]
+]
+
+[heading Expression Semantics]
+
+ is >> seq
+
+[*Return type]: IStream&
+
+[*Semantics]: For each element, `e`, in sequence, `seq`, call `is >> e`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/io/in.hpp>
+ #include <boost/fusion/include/in.hpp>
+
+[heading Example]
+
+ __vector__<int, std::string, char> v;
+ std::cin >> v;
+
+[endsect]
+
+[section out]
+
+[heading Description]
+
+Write a __sequence__ to an output stream.
+
+[heading Synopsis]
+
+ template <typename OStream, typename Sequence>
+ OStream&
+ operator<<(OStream& os, Sequence& seq);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[os] [An output stream.] [Stream to write information to.]]
+ [[seq] [A __sequence__.] [The sequence to write.]]
+]
+
+[heading Expression Semantics]
+
+ os << seq
+
+[*Return type]: OStream&
+
+[*Semantics]: For each element, `e`, in sequence, `seq`, call `os << e`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/io/out.hpp>
+ #include <boost/fusion/include/out.hpp>
+
+[heading Example]
+
+ std::cout << __make_vector__(123, "Hello", 'x') << std::endl;
+
+[endsect]
+
+[endsect]
+
+[section Comparison]
+
+The Comparison operators: `==`, `!=`, `<`, `<=`, `>=` and `>=` work
+generically on all Fusion sequences. Comparison operators are "short-
+circuited": elementary comparisons start from the first elements and are
+performed only until the result is clear.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/comparison.hpp>
+ #include <boost/fusion/include/comparison.hpp>
+
+[section equal]
+
+[heading Description]
+
+Compare two sequences for equality.
+
+[heading Synopsis]
+
+ template <typename Seq1, typename Seq2>
+ bool
+ operator==(Seq1 const& a, Seq2 const& b);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]]
+]
+
+[heading Expression Semantics]
+
+ a == b
+
+[*Return type]: `bool`
+
+[*Requirements]:
+
+For each element, `e1`, in sequence `a`, and for each element, `e2`, in
+sequence `b`, `a == b` is a valid expression returning a type that is
+convertible to bool.
+
+An attempt to compare two Sequences of different lengths results in a
+compile time error.
+
+[*Semantics]:
+
+For each element, `e1`, in sequence `a`, and for each element, `e2`, in
+sequence `b`, `e1 == e2` returns true. For any 2 zero length __sequence__s,
+e and f, e == f returns true.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/comparison/equal_to.hpp>
+ #include <boost/fusion/include/equal_to.hpp>
+
+[heading Example]
+
+ __vector__<int, char> v1(5, 'a');
+ __vector__<int, char> v2(5, 'a');
+ assert(v1 == v2);
+
+[endsect]
+
+[section not equal]
+
+Compare two sequences for inequality.
+
+[heading Synopsis]
+
+ template <typename Seq1, typename Seq2>
+ bool
+ operator!=(Seq1 const& a, Seq2 const& b);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]]
+]
+
+[heading Expression Semantics]
+
+ a != b
+
+[*Return type]: `bool`
+
+[*Requirements]:
+
+For each element, `e1`, in sequence `a`, and for each element, `e2`, in
+sequence `b`, `a == b` is a valid expression returning a type that is
+convertible to bool.
+
+An attempt to compare two Sequences of different lengths results in a
+compile time error.
+
+[*Semantics]:
+
+Returns !(a == b).
+
+[heading Header]
+
+ #include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+ #include <boost/fusion/include/not_equal_to.hpp>
+
+[heading Example]
+
+ __vector__<int, char> v3(5, 'b');
+ __vector__<int, char> t4(2, 'a');
+ assert(v1 != v3);
+ assert(v1 != t4);
+ assert(!(v1 != v2));
+
+[endsect]
+
+[section less than]
+
+Lexicographically compare two sequences.
+
+[heading Synopsis]
+
+ template <typename Seq1, typename Seq2>
+ bool
+ operator<(Seq1 const& a, Seq2 const& b);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]]
+]
+
+[heading Expression Semantics]
+
+ a < b
+
+[*Return type]: `bool`
+
+[*Requirements]:
+
+For each element, `e1`, in sequence `a`, and for each element, `e2`, in
+sequence `b`, `a < b` is a valid expression returning a type that is
+convertible to bool.
+
+An attempt to compare two Sequences of different lengths results in a
+compile time error.
+
+[*Semantics]: Returns the lexicographical comparison of between `a` and `b`.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/comparison/less.hpp>
+ #include <boost/fusion/include/less.hpp>
+
+[heading Example]
+
+ __vector__<int, float> v1(4, 3.3f);
+ __vector__<short, float> v2(5, 3.3f);
+ __vector__<long, double> v3(5, 4.4);
+ assert(v1 < v2);
+ assert(v2 < v3);
+
+[endsect]
+
+[section less than equal]
+
+Lexicographically compare two sequences.
+
+[heading Synopsis]
+
+ template <typename Seq1, typename Seq2>
+ bool
+ operator<=(Seq1 const& a, Seq2 const& b);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]]
+]
+
+[heading Expression Semantics]
+
+ a <= b
+
+[*Return type]: `bool`
+
+[*Requirements]:
+
+For each element, `e1`, in sequence `a`, and for each element, `e2`, in
+sequence `b`, `a < b` is a valid expression returning a type that is
+convertible to bool.
+
+An attempt to compare two Sequences of different lengths results in a
+compile time error.
+
+[*Semantics]: Returns !(b < a).
+
+[heading Header]
+
+ #include <boost/fusion/sequence/comparison/less_equal.hpp>
+ #include <boost/fusion/include/less_equal.hpp>
+
+[heading Example]
+
+ __vector__<int, float> v1(4, 3.3f);
+ __vector__<short, float> v2(5, 3.3f);
+ __vector__<long, double> v3(5, 4.4);
+ assert(v1 <= v2);
+ assert(v2 <= v3);
+
+[endsect]
+
+[section greater than]
+
+Lexicographically compare two sequences.
+
+[heading Synopsis]
+
+ template <typename Seq1, typename Seq2>
+ bool
+ operator>(Seq1 const& a, Seq2 const& b);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]]
+]
+
+[heading Expression Semantics]
+
+ a > b
+
+[*Return type]: `bool`
+
+[*Requirements]:
+
+For each element, `e1`, in sequence `a`, and for each element, `e2`, in
+sequence `b`, `a < b` is a valid expression returning a type that is
+convertible to bool.
+
+An attempt to compare two Sequences of different lengths results in a
+compile time error.
+
+[*Semantics]: Returns b < a.
+
+[heading Header]
+
+ #include <boost/fusion/sequence/comparison/less_equal.hpp>
+ #include <boost/fusion/include/less_equal.hpp>
+
+[heading Example]
+
+ __vector__<int, float> v1(4, 3.3f);
+ __vector__<short, float> v2(5, 3.3f);
+ __vector__<long, double> v3(5, 4.4);
+ assert(v2 > v1);
+ assert(v3 > v2);
+
+[endsect]
+
+[section greater than equal]
+
+Lexicographically compare two sequences.
+
+[heading Synopsis]
+
+ template <typename Seq1, typename Seq2>
+ bool
+ operator>=(Seq1 const& a, Seq2 const& b);
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`a, b`] [Instances of __sequence__] [__sequence__(s) to compare]]
+]
+
+[heading Expression Semantics]
+
+ a >= b
+
+[*Return type]: `bool`
+
+[*Requirements]:
+
+For each element, `e1`, in sequence `a`, and for each element, `e2`, in
+sequence `b`, `a < b` is a valid expression returning a type that is
+convertible to bool.
+
+An attempt to compare two Sequences of different lengths results in a
+compile time error.
+
+[*Semantics]: Returns !(a < b).
+
+[heading Header]
+
+ #include <boost/fusion/sequence/comparison/greater_equal.hpp>
+ #include <boost/fusion/include/greater_equal.hpp>
+
+[heading Example]
+
+ __vector__<int, float> v1(4, 3.3f);
+ __vector__<short, float> v2(5, 3.3f);
+ __vector__<long, double> v3(5, 4.4);
+ assert(v2 >= v1);
+ assert(v3 >= v2);
+
+[endsect]
+
+[endsect]
+
+[endsect]
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/support.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/support.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,442 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Support]
+
+A couple of classes and metafunctions provide basic support for Fusion.
+
+[section is_sequence]
+
+[heading Description]
+
+Metafunction that evaluates to `mpl::true_` if a certain type `T` is a
+conforming Fusion __sequence__, `mpl::false_` otherwise. This may be
+specialized to accomodate clients which provide Fusion conforming sequences.
+
+[heading Synopsis]
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_sequence
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T`] [Any type] [The type to query.]]
+]
+
+[heading Expression Semantics]
+
+ typedef traits::is_sequence<T>::type c;
+
+[*Return type]: An __mpl_boolean_constant__.
+
+[*Semantics]: Metafunction that evaluates to `mpl::true_` if a certain type
+`T` is a conforming Fusion sequence, `mpl::false_` otherwise.
+
+[heading Header]
+
+ #include <boost/fusion/support/is_sequence.hpp>
+ #include <boost/fusion/include/is_sequence.hpp>
+
+[heading Example]
+
+ BOOST_MPL_ASSERT_NOT(( traits::is_sequence< std::vector<int> > ));
+ BOOST_MPL_ASSERT_NOT(( is_sequence< int > ));
+ BOOST_MPL_ASSERT(( traits::is_sequence<__list__<> > ));
+ BOOST_MPL_ASSERT(( traits::is_sequence<__list__<int> > ));
+ BOOST_MPL_ASSERT(( traits::is_sequence<__vector__<> > ));
+ BOOST_MPL_ASSERT(( traits::is_sequence<__vector__<int> > ));
+
+[endsect]
+
+[section is_view]
+
+[heading Description]
+
+Metafunction that evaluates to `mpl::true_` if a certain type `T` is a
+conforming Fusion __view__, `mpl::false_` otherwise. A view is a
+specialized sequence that does not actually contain data. Views hold
+sequences which may be other views. In general, views are held by other
+views by value, while non-views are held by other views by reference. `is_view`
+may be specialized to accomodate clients providing Fusion conforming views.
+
+[heading Synopsis]
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_view
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T`] [Any type] [The type to query.]]
+]
+
+[heading Expression Semantics]
+
+ typedef traits::is_view<T>::type c;
+
+[*Return type]: An __mpl_boolean_constant__.
+
+[*Semantics]: Metafunction that evaluates to `mpl::true_` if a certain type
+`T` is a conforming Fusion view, `mpl::false_` otherwise.
+
+[heading Header]
+
+ #include <boost/fusion/support/is_view.hpp>
+ #include <boost/fusion/include/is_view.hpp>
+
+[heading Example]
+
+ BOOST_MPL_ASSERT_NOT(( traits::is_view<std::vector<int> > ));
+ BOOST_MPL_ASSERT_NOT(( traits::is_view<int> ));
+
+ using boost::mpl::_
+ using boost::is_pointer;
+ typedef __vector__<int*, char, long*, bool, double> vector_type;
+ typedef __filter_view__<vector_type, is_pointer<_> > filter_view_type;
+ BOOST_MPL_ASSERT(( traits::is_view<filter_view_type> ));
+
+[endsect]
+
+[section tag_of]
+
+[heading Description]
+
+All conforming Fusion sequences and iterators have an associated tag type. The
+purpose of the tag is to enable __tag_dispatching__ from __intrinsic__
+functions to implementations appropriate for the type.
+
+This metafunction may be specialized to accomodate clients providing Fusion
+conforming sequences.
+
+[heading Synopsis]
+
+ namespace traits
+ {
+ template<typename Sequence>
+ struct tag_of
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T`] [Any type] [The type to query.]]
+]
+
+[heading Expression Semantics]
+
+ typedef traits::tag_of<T>::type tag;
+
+[*Return type]: Any type.
+
+[*Semantics]: Returns the tag type associated with `T`.
+
+[heading Header]
+
+ #include <boost/fusion/support/tag_of.hpp>
+ #include <boost/fusion/include/tag_of.hpp>
+
+[heading Example]
+
+ typedef traits::tag_of<__list__<> >::type tag1;
+ typedef traits::tag_of<__list__<int> >::type tag2;
+ typedef traits::tag_of<__vector__<> >::type tag3;
+ typedef traits::tag_of<__vector__<int> >::type tag4;
+
+ BOOST_MPL_ASSERT((boost::is_same<tag1, tag2>));
+ BOOST_MPL_ASSERT((boost::is_same<tag3, tag4>));
+
+[endsect]
+
+[section category_of]
+
+[heading Description]
+
+A metafunction that establishes the conceptual classification of a particular
+__sequence__ or __iterator__ (see __iterator_concepts__ and
+__sequence_concepts__).
+
+[heading Synopsis]
+
+ namespace traits
+ {
+ template <typename T>
+ struct category_of
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading Parameters]
+
+[table
+ [[Parameter] [Requirement] [Description]]
+ [[`T`] [Any type] [The type to query.]]
+]
+
+[heading Expression Semantics]
+
+ typedef traits::category_of<T>::type category;
+
+[*Return type]:
+
+For Iterators, the return type is derived from one of:
+
+ namespace boost { namespace fusion
+ {
+ struct incrementable_traversal_tag {};
+
+ struct single_pass_traversal_tag
+ : incrementable_traversal_tag {};
+
+ struct forward_traversal_tag
+ : single_pass_traversal_tag {};
+
+ struct bidirectional_traversal_tag
+ : forward_traversal_tag {};
+
+ struct random_access_traversal_tag
+ : bidirectional_traversal_tag {};
+ }}
+
+For Sequences, the return type is derived from one of:
+
+ namespace boost { namespace fusion
+ {
+ struct incrementable_sequence_tag {};
+
+ struct single_pass_sequence_tag
+ : incrementable_sequence_tag {};
+
+ struct forward_traversal_tag
+ : single_pass_sequence_tag {};
+
+ struct bidirectional_traversal_tag
+ : forward_traversal_tag {};
+
+ struct random_access_traversal_tag
+ : bidirectional_traversal_tag {};
+ }}
+
+And optionally from:
+
+ namespace boost { namespace fusion
+ {
+ struct associative_sequence_tag {};
+ }}
+
+[*Semantics]: Establishes the conceptual classification of a particular
+__sequence__ or __iterator__.
+
+[heading Header]
+
+ #include <boost/fusion/support/category_of.hpp>
+ #include <boost/fusion/include/category_of.hpp>
+
+[heading Example]
+
+ using boost::is_base_of;
+ typedef traits::category_of<__list__<> >::type list_category;
+ typedef traits::category_of<__vector__<> >::type vector_category;
+ BOOST_MPL_ASSERT(( is_base_of<forward_traversal_tag, list_category> ));
+ BOOST_MPL_ASSERT(( is_base_of<random_access_traversal_tag, vector_category> ));
+
+[endsect]
+
+[section deduce]
+
+[heading Description]
+Metafunction to apply __element_conversion__ to the full argument type.
+
+It removes references to `const`, references to array types are kept, even
+if the array is `const`. Reference wrappers are removed (see
+__note_boost_ref__).
+
+[heading Header]
+
+ #include <boost/fusion/support/deduce.hpp>
+ #include <boost/fusion/include/deduce.hpp>
+
+[heading Synopsis]
+ namespace traits
+ {
+ template <typename T>
+ struct deduce
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading Example]
+ template <typename T>
+ struct holder
+ {
+ typename traits::deduce<T const&>::type element;
+
+ holder(T const& a)
+ : element(a)
+ { }
+ };
+
+ template <typename T>
+ holder<T> make_holder(T const& a)
+ {
+ return holder<T>(a);
+ }
+
+[heading See also]
+* __deduce_sequence__
+
+[endsect]
+
+[section deduce_sequence]
+
+[heading Description]
+Applies __element_conversion__ to each element in a __forward_sequence__.
+The resulting type is a __random_access_sequence__ that provides a converting
+constructor accepting the original type as its argument.
+
+[heading Header]
+
+ #include <boost/fusion/support/deduce_sequence.hpp>
+ #include <boost/fusion/include/deduce_sequence.hpp>
+
+[heading Synopsis]
+ namespace traits
+ {
+ template <class Sequence>
+ struct deduce_sequence
+ {
+ typedef __unspecified__ type;
+ };
+ }
+
+[heading Example]
+ template <class Seq>
+ struct holder
+ {
+ typename traits::deduce_sequence<Seq>::type element;
+
+ holder(Seq const& a)
+ : element(a)
+ { }
+ };
+
+ template <typename T0, typename T1>
+ holder< __vector__<T0 const&, T1 const&> >
+ make_holder(T0 const& a0, T1 const& a1)
+ {
+ typedef __vector__<T0 const&, T1 const&> arg_vec_t;
+ return holder<arg_vec_t>( arg_vec_t(a0,a1) );
+ }
+
+[heading See also]
+* __deduce__
+
+[endsect]
+
+[section pair]
+
+[heading Description]
+
+Fusion `pair` type is a half runtime pair. A half runtime pair is similar
+to a __std_pair__, but, unlike __std_pair__, the first type does not have data.
+It is used as elements in __map__s, for example.
+
+[heading Synopsis]
+
+ template <typename First, typename Second>
+ struct pair;
+
+ namespace result_of
+ {
+ template <typename Pair>
+ struct first;
+
+ template <typename Pair>
+ struct second;
+
+ template <typename First, typename Second>
+ struct make_pair;
+ }
+
+ template <typename First, typename Second>
+ typename result_of::make_pair<First,Second>::type
+ make_pair(Second const&);
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description]]
+ [[First] [The first type. This is purely a type. No data is held.]]
+ [[Second] [The second type. This contains data.]]
+]
+
+[variablelist Notation
+ [[`P`] [Fusion pair type]]
+ [[`p`, `p2`] [Fusion pairs]]
+ [[`F`, `S`] [Arbitrary types]]
+ [[`s`] [Value of type `S`]]
+ [[`o`] [Output stream]]
+ [[`i`] [Input stream]]
+]
+
+[heading Expression Semantics]
+
+[table
+ [[Expression] [Semantics]]
+ [[`P::first_type`] [The type of the first template parameter, `F`, equivalent to
+ `result_of::first<P>::type`. ]]
+ [[`P::second_type`] [The type of the second template parameter, `S`, equivalent to
+ `result_of::second<P>::type`. ]]
+ [[`P()`] [Default construction.]]
+ [[`P(s)`] [Construct a pair given value for the second type, `s`.]]
+ [[`P(p2)`] [Copy constructs a pair from another pair, `p2`.]]
+ [[`p.second`] [Get the data from `p1`.]]
+ [[`p = p2`] [Assigns a pair, `p1`, from another pair, `p2`.]]
+ [[make_pair<F>(s)] [Make a pair given the first type, `F`, and a value for
+ the second type, `s`. The second type assumes the type of `s`]]
+ [[`o << p`] [Output `p` to output stream, `o`.]]
+ [[`i >> p`] [Input `p` from input stream, `i`.]]
+ [[`p == p2`] [Tests two pairs for equality.]]
+ [[`p != p2`] [Tests two pairs for inequality.]]
+]
+
+[heading Header]
+
+ #include <boost/fusion/support/pair.hpp>
+ #include <boost/fusion/include/pair.hpp>
+
+[heading Example]
+
+ pair<int, char> p('X');
+ std::cout << p << std::endl;
+ std::cout << make_pair<int>('X') << std::endl;
+ assert((p == make_pair<int>('X')));
+
+[endsect]
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/tuple.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/tuple.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,274 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 Tuple]
+
+The TR1 technical report describes extensions to the C++ standard library.
+Many of these extensions will be considered for the next
+iteration of the C++ standard. TR1 describes a tuple type, and
+support for treating `std::pair` as a type of tuple.
+
+Fusion provides full support for the __tr1__tuple__ interface, and the extended
+uses of `std::pair` described in the TR1 document.
+
+[section Class template tuple]
+Fusion's implementation of the __tr1__tuple__ is also a fusion __forward_sequence__.
+As such the fusion tuple type provides a lot of functionality beyond that required by TR1.
+
+Currently tuple is basically a synonym for __vector__, although this may be changed
+in future releases of fusion.
+
+[heading Synopsis]
+ template<
+ typename T1 = __unspecified__,
+ typename T2 = __unspecified__,
+ ...
+ typename TN = __unspecified__>
+ class tuple;
+
+[heading Header]
+
+ #include <boost/fusion/tuple/tuple>
+ #include <boost/fusion/include/tuple.hpp>
+
+[section Construction]
+
+[heading Description]
+The __tr1__tuple__ type provides a default constructor, a constructor that takes initializers for all of its elements, a copy constructor, and a converting copy constructor. The details of the various constructors are described in this section.
+
+[heading Specification]
+
+[variablelist Notation
+ [[`T1 ... TN`, `U1 ... UN`][Tuple element types]]
+ [[`P1 ... PN`] [Parameter types]]
+ [[`Ti`, `Ui`] [The type of the `i`th element of a tuple]]
+ [[`Pi`] [The type of the `i`th parameter]]
+]
+
+ tuple();
+
+[*Requirements]: Each `Ti` is default constructable.
+
+[*Semantics]: Default initializes each element of the tuple.
+
+ tuple(P1,P2,...,PN);
+
+[*Requirements]: Each `Pi` is `Ti` if `Ti` is a reference type, `const Ti&` otherwise.
+
+[*Semantics]: Copy initializes each element with the corresponding parameter.
+
+ tuple(const tuple& t);
+
+[*Requirements]: Each `Ti` should be copy constructable.
+
+[*Semantics]: Copy constructs each element of `*this` with the corresponding element of `t`.
+
+ template<typename U1, typename U2, ..., typename UN>
+ tuple(const tuple<U1, U2, ..., UN>& t);
+
+[*Requirements]: Each `Ti` shall be constructible from the corresponding `Ui`.
+
+[*Semantics]: Constructs each element of `*this` with the corresponding element of `t`.
+
+[endsect]
+
+[section Tuple creation functions]
+
+[heading Description]
+TR1 describes 2 utility functions for creating __tr1__tuple__s. `make_tuple` builds a tuple out of it's argument list, and `tie` builds a tuple of references to it's arguments. The details of these creation functions are described in this section.
+
+[heading Specification]
+
+ template<typename T1, typename T2, ..., typename TN>
+ tuple<V1, V2, ..., VN> make_tuple(const T1& t1, const T2& t2, ..., const TN& tn);
+
+Where `Vi` is `X&` if the cv-unqualified type `Ti` is `reference_wrapper<X>`, otherwise `Vi` is `Ti`.
+
+[*Returns]: `tuple<V1, V2, ..., VN>(t1, t2, ..., tN)`
+
+ template<typename T1, typename T2, ..., typename TN>
+ tuple<T1&, T2&, ..., TN&> tie(T1& t1, T2& t2, ..., TN& tn);
+
+[*Returns]: tuple<T1&, T2&, ..., TN&>(t1, t2, ..., tN). When argument `ti` is `ignore`, assigning any value to the corresponding tuple element has has no effect.
+
+[endsect]
+
+[section Tuple helper classes]
+
+[heading Description]
+The __tr1__tuple__ provides 2 helper traits, for compile time access to the tuple size, and the element types.
+
+[heading Specification]
+
+ tuple_size<T>::value
+
+[*Requires]: `T` is any fusion sequence type, including `tuple`.
+
+[*Type]: __mpl_integral_constant__
+
+[*Value]: The number of elements in the sequence. Equivalent to `__result_of_size__<T>::type`.
+
+ tuple_element<I, T>::type
+
+[*Requires]: `T` is any fusion sequence type, including `tuple`. `0 <= I < N` or the program is ill formed.
+
+[*Value]: The type of the `I`th element of `T`. Equivalent to `__result_of_value_at__<I,T>::type`.
+
+[endsect]
+
+[section Element access]
+
+[heading Description]
+The __tr1__tuple__ provides the `get` function to provide access to it's elements by zero based numeric index.
+
+[heading Specification]
+ template<int I, T>
+ RJ get(T& t);
+
+[*Requires]: `0 < I <= N`. The program is ill formed if `I` is out of bounds.
+`T` is any fusion sequence type, including `tuple`.
+
+[*Return type]: `RJ` is equivalent to `__result_of_at_c__<I,T>::type`.
+
+[*Returns]: A reference to the `I`th element of `T`.
+
+ template<int I, typename T>
+ PJ get(T const& t);
+
+[*Requires]: `0 < I <= N`. The program is ill formed if `I` is out of bounds.
+`T` is any fusion sequence type, including `tuple`.
+
+[*Return type]: `PJ` is equivalent to `__result_of_at_c__<I,T>::type`.
+
+[*Returns]: A const reference to the `I`th element of `T`.
+
+[endsect]
+
+[section Relational operators]
+
+[heading Description]
+The __tr1__tuple__ provides the standard boolean relational operators.
+
+[heading Specification]
+
+[variablelist Notation
+ [[`T1 ... TN`, `U1 ... UN`][Tuple element types]]
+ [[`P1 ... PN`] [Parameter types]]
+ [[`Ti`, `Ui`] [The type of the `i`th element of a tuple]]
+ [[`Pi`] [The type of the `i`th parameter]]
+]
+
+ template<typename T1, typename T2, ..., typename TN,
+ typename U1, typename U2, ..., typename UN>
+ bool operator==(
+ const tuple<T1, T2, ..., TN>& lhs,
+ const tuple<U1, U2, ..., UN>& rhs);
+
+[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) == __tuple_get__<i>(rhs)` is a valid
+expression returning a type that is convertible to `bool`.
+
+[*Semantics]: Returns `true` if and only if `__tuple_get__<i>(lhs) == __tuple_get__<i>(rhs)` for all `i`.
+For any 2 zero length tuples `e` and `f`, `e == f` returns `true`.
+
+ template<typename T1, typename T2, ..., typename TN,
+ typename U1, typename U2, ..., typename UN>
+ bool operator<(
+ const tuple<T1, T2, ..., TN>& lhs,
+ const tuple<U1, U2, ..., UN>& rhs);
+
+[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) < __tuple_get__<i>(rhs)` is a valid
+expression returning a type that is convertible to `bool`.
+
+[*Semantics]: Returns the lexicographical comparison of between `lhs` and `rhs`.
+
+ template<typename T1, typename T2, ..., typename TN,
+ typename U1, typename U2, ..., typename UN>
+ bool operator!=(
+ const tuple<T1, T2, ..., TN>& lhs,
+ const tuple<U1, U2, ..., UN>& rhs);
+
+[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) == __tuple_get__<i>(rhs)` is a valid
+expression returning a type that is convertible to `bool`.
+
+[*Semantics]: Returns `!(lhs == rhs)`.
+
+ template<typename T1, typename T2, ..., typename TN,
+ typename U1, typename U2, ..., typename UN>
+ bool operator<=(
+ const tuple<T1, T2, ..., TN>& lhs,
+ const tuple<U1, U2, ..., UN>& rhs);
+
+[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(rhs) < __tuple_get__<i>(lhs)` is a valid
+expression returning a type that is convertible to `bool`.
+
+[*Semantics]: Returns `!(rhs < lhs)`
+
+ template<typename T1, typename T2, ..., typename TN,
+ typename U1, typename U2, ..., typename UN>
+ bool operator>(
+ const tuple<T1, T2, ..., TN>& lhs,
+ const tuple<U1, U2, ..., UN>& rhs);
+
+[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(rhs) < __tuple_get__<i>(lhs)` is a valid
+expression returning a type that is convertible to `bool`.
+
+[*Semantics]: Returns `rhs < lhs`.
+
+ template<typename T1, typename T2, ..., typename TN,
+ typename U1, typename U2, ..., typename UN>
+ bool operator>=(
+ const tuple<T1, T2, ..., TN>& lhs,
+ const tuple<U1, U2, ..., UN>& rhs);
+
+[*Requirements]: For all `i`, `1 <= i < N`, `__tuple_get__<i>(lhs) < __tuple_get__<i>(rhs)` is a valid
+expression returning a type that is convertible to `bool`.
+
+[*Semantics]: Returns `!(lhs < rhs)`.
+
+[endsect]
+
+[endsect]
+
+[section Pairs]
+
+[heading Description]
+The __tr1__tuple__ interface is specified to provide uniform access to `std::pair` as if it were a 2 element tuple.
+
+[heading Specification]
+
+ tuple_size<std::pair<T1, T2> >::value
+
+[*Type]: An __mpl_integral_constant__
+
+[*Value]: Returns 2, the number of elements in a pair.
+
+ tuple_element<0, std::pair<T1, T2> >::type
+
+[*Type]: `T1`
+
+[*Value]: Returns the type of the first element of the pair
+
+ tuple_element<1, std::pair<T1, T2> >::type
+
+[*Type]: `T2`
+
+[*Value]: Returns thetype of the second element of the pair
+
+ template<int I, typename T1, typename T2>
+ P& get(std::pair<T1, T2>& pr);
+
+ template<int I, typename T1, typename T2>
+ const P& get(const std::pair<T1, T2>& pr);
+
+[*Type]: If `I == 0` `P` is `T1`, else if `I == 1` `P` is `T2` else the program is ill-formed.
+
+[*Returns: `pr.first` if `I == 0` else `pr.second`.
+
+[endsect]
+
+[endsect]
+

Added: sandbox/SOC/2009/fusion/libs/fusion/doc/view.qbk
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/doc/view.qbk 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,476 @@
+[/==============================================================================
+ Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+ Use, modification and distribution is subject to 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 View]
+
+Views are sequences that do not actually contain data, but instead impart
+an alternative presentation over the data from one or more underlying
+sequences. Views are proxies. They provide an efficient yet purely
+functional way to work on potentially expensive sequence operations. Views
+are inherently lazy. Their elements are only computed on demand only when
+the elements of the underlying sequence(s) are actually accessed. Views'
+lazy nature make them very cheap to copy and be passed around by value.
+
+[heading Header]
+
+ #include <boost/fusion/view.hpp>
+ #include <boost/fusion/include/view.hpp>
+
+[section single_view]
+
+`single_view` is a view into a value as a single element sequence.
+
+[heading Header]
+
+ #include <boost/fusion/view/single_view.hpp>
+ #include <boost/fusion/include/single_view.hpp>
+
+[heading Synopsis]
+
+ template <typename T>
+ struct single_view;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`T`] [Any type] []]
+]
+
+[heading Model of]
+
+* __forward_sequence__
+
+[variablelist Notation
+ [[`S`] [A `single_view` type]]
+ [[`s`, `s2`] [Instances of `single_view`]]
+ [[`x`] [An instance of `T`]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`S(x)`] [Creates a `single_view` from `x`.]]
+ [[`S(s)`] [Copy constructs a `single_view` from another `single_view`, `s`.]]
+ [[`s = s2`] [Assigns to a `single_view`, `s`, from another `single_view`, `s2`.]]
+]
+
+[heading Example]
+
+ single_view<int> view(3);
+ std::cout << view << std::endl;
+
+[endsect]
+
+[section filter_view]
+
+[heading Description]
+
+`filter_view` is a view into a subset of its underlying sequence's elements
+satisfying a given predicate (an __mpl__ metafunction). The `filter_view`
+presents only those elements for which its predicate evaluates to
+`mpl::true_`.
+
+[heading Header]
+
+ #include <boost/fusion/view/filter_view.hpp>
+ #include <boost/fusion/include/filter_view.hpp>
+
+[heading Synopsis]
+
+ template <typename Sequence, typename Pred>
+ struct filter_view;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Sequence`] [A __forward_sequence__] []]
+ [[`Pred`] [Unary Metafunction
+ returning an `mpl::bool_`] []]
+]
+
+[heading Model of]
+
+* __forward_sequence__
+
+[variablelist Notation
+ [[`F`] [A `filter_view` type]]
+ [[`f`, `f2`] [Instances of `filter_view`]]
+ [[`s`] [A __forward_sequence__]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`F(s)`] [Creates a `filter_view` given a sequence, `s`.]]
+ [[`F(f)`] [Copy constructs a `filter_view` from another `filter_view`, `f`.]]
+ [[`f = f2`] [Assigns to a `filter_view`, `f`, from another `filter_view`, `f2`.]]
+]
+
+[heading Example]
+
+ using boost::mpl::_;
+ using boost::mpl::not_;
+ using boost::is_class;
+
+ typedef __vector__<std::string, char, long, bool, double> vector_type;
+
+ vector_type v("a-string", '@', 987654, true, 6.6);
+ filter_view<vector_type const, not_<is_class<_> > > view(v);
+ std::cout << view << std::endl;
+
+[endsect]
+
+[section iterator_range]
+
+[heading Description]
+
+`iterator_range` presents a sub-range of its underlying sequence delimited
+by a pair of iterators.
+
+[heading Header]
+
+ #include <boost/fusion/view/iterator_range.hpp>
+ #include <boost/fusion/include/iterator_range.hpp>
+
+[heading Synopsis]
+
+ template <typename First, typename Last>
+ struct iterator_range;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`First`] [A fusion __iterator__] []]
+ [[`Last`] [A fusion __iterator__] []]
+]
+
+[heading Model of]
+
+* __forward_sequence__, __bidirectional_sequence__ or
+__random_access_sequence__ depending on the traversal characteristics (see
+__traversal_concept__) of its underlying sequence.
+
+[variablelist Notation
+ [[`IR`] [An `iterator_range` type]]
+ [[`f`] [An instance of `First`]]
+ [[`l`] [An instance of `Last`]]
+ [[`ir`, `ir2`] [Instances of `iterator_range`]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`IR(f, l)`] [Creates an `iterator_range` given iterators, `f` and `l`.]]
+ [[`IR(ir)`] [Copy constructs an `iterator_range` from another `iterator_range`, `ir`.]]
+ [[`ir = ir2`] [Assigns to a `iterator_range`, `ir`, from another `iterator_range`, `ir2`.]]
+]
+
+[heading Example]
+
+ char const* s = "Ruby";
+ typedef __vector__<int, char, double, char const*> vector_type;
+ vector_type vec(1, 'x', 3.3, s);
+
+ typedef __result_of_begin__<vector_type>::type A;
+ typedef __result_of_end__<vector_type>::type B;
+ typedef __result_of_next__<A>::type C;
+ typedef __result_of_prior__<B>::type D;
+
+ C c(vec);
+ D d(vec);
+
+ iterator_range<C, D> range(c, d);
+ std::cout << range << std::endl;
+
+[endsect]
+
+[section joint_view]
+
+[heading Description]
+
+`joint_view` presents a view which is a concatenation of two sequences.
+
+[heading Header]
+
+ #include <boost/fusion/view/joint_view.hpp>
+ #include <boost/fusion/include/joint_view.hpp>
+
+[heading Synopsis]
+
+ template <typename Sequence1, typename Sequence2>
+ struct joint_view;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Sequence1`] [A __forward_sequence__] []]
+ [[`Sequence2`] [A __forward_sequence__] []]
+]
+
+[heading Model of]
+
+* __forward_sequence__
+
+[variablelist Notation
+ [[`JV`] [A `joint_view` type]]
+ [[`s1`] [An instance of `Sequence1`]]
+ [[`s2`] [An instance of `Sequence2`]]
+ [[`jv`, `jv2`] [Instances of `joint_view`]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`JV(s1, s2)`] [Creates a `joint_view` given sequences, `s1` and `s2`.]]
+ [[`JV(jv)`] [Copy constructs a `joint_view` from another `joint_view`, `jv`.]]
+ [[`jv = jv2`] [Assigns to a `joint_view`, `jv`, from another `joint_view`, `jv2`.]]
+]
+
+[heading Example]
+
+ __vector__<int, char> v1(3, 'x');
+ __vector__<std::string, int> v2("hello", 123);
+ joint_view<
+ __vector__<int, char>
+ , __vector__<std::string, int>
+ > view(v1, v2);
+ std::cout << view << std::endl;
+
+[endsect]
+
+[section zip_view]
+
+[heading Description]
+
+`zip_view` presents a view which iterates over a collection of __sequence__(s) in parallel. A `zip_view`
+is constructed from a __sequence__ of references to the component __sequence__s.
+
+[heading Header]
+
+ #include <boost/fusion/view/zip_view.hpp>
+ #include <boost/fusion/include/zip_view.hpp>
+
+[heading Synopsis]
+
+ template <typename Sequences>
+ struct zip_view;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Sequences`] [A __forward_sequence__ of references to other Fusion __sequence__s] []]
+]
+
+[heading Model of]
+
+* __forward_sequence__, __bidirectional_sequence__ or
+__random_access_sequence__ depending on the traversal characteristics (see
+__traversal_concept__) of its underlying sequence.
+
+[variablelist Notation
+ [[`ZV`] [A `joint_view` type]]
+ [[`s`] [An instance of `Sequences`]]
+ [[`zv1`, `zv2`] [Instances of `ZV`]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`ZV(s)`] [Creates a `zip_view` given a sequence of references to the component __sequence__s.]]
+ [[`ZV(zv1)`] [Copy constructs a `zip_view` from another `zip_view`, `zv`.]]
+ [[`zv1 = zv2`] [Assigns to a `zip_view`, `zv`, from another `zip_view`, `zv2`.]]
+]
+
+[heading Example]
+ typedef __vector__<int,int> vec1;
+ typedef __vector__<char,char> vec2;
+ vec1 v1(1,2);
+ vec2 v2('a','b');
+ typedef __vector__<vec1&, vec2&> sequences;
+ std::cout << zip_view<sequences>(sequences(v1, v2)) << std::endl; // ((1 a) (2 b))
+
+[endsect]
+
+[section transform_view]
+
+The unary version of `transform_view` presents a view of its underlying
+sequence given a unary function object or function pointer. The binary
+version of `transform_view` presents a view of 2 underlying sequences,
+given a binary function object or function pointer. The `transform_view`
+inherits the traversal characteristics (see __traversal_concept__) of
+its underlying sequence or sequences.
+
+[heading Header]
+
+ #include <boost/fusion/view/transform_view.hpp>
+ #include <boost/fusion/include/transform_view.hpp>
+
+[heading Synopsis]
+
+[*Unary Version]
+
+ template <typename Sequence, typename F1>
+ struct transform_view;
+
+[*Binary Version]
+
+ template <typename Sequence1, typename Sequence2, typename F2>
+ struct transform_view;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Sequence`] [A __forward_sequence__] []]
+ [[`Sequence1`] [A __forward_sequence__] []]
+ [[`Sequence2`] [A __forward_sequence__] []]
+ [[`F1`] [A unary function object or function pointer. `__boost_result_of_call__<F1(E)>::type` is the return type of an instance of `F1` when called with a value of each element type `E` in the input sequence.] []]
+ [[`F2`] [A binary function object or function pointer. `__boost_result_of_call__<F2(E1, E2)>::type` is the return type of an instance of `F2` when called with a value of each corresponding pair of element type `E1` and `E2` in the input sequences.] []]
+]
+
+[heading Model of]
+
+* __forward_sequence__, __bidirectional_sequence__ or
+__random_access_sequence__ depending on the traversal characteristics (see
+__traversal_concept__) of its underlying sequence.
+
+[variablelist Notation
+ [[`TV`] [A `transform_view` type]]
+ [[`BTV`] [A binary `transform_view` type]]
+ [[`UTV`] [A unary `transform_view` type]]
+ [[`f1`] [An instance of `F1`]]
+ [[`f2`] [An instance of `F2`]]
+ [[`s`] [An instance of `Sequence`]]
+ [[`s1`] [An instance of `Sequence1`]]
+ [[`s2`] [An instance of `Sequence2`]]
+ [[`tv`, `tv2`] [Instances of `transform_view`]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __forward_sequence__, __bidirectional_sequence__ or
+__random_access_sequence__ depending on the traversal characteristics (see
+__traversal_concept__) of its underlying sequence or sequences.
+
+[table
+ [[Expression] [Semantics]]
+ [[`UTV(s, f1)`] [Creates a unary `transform_view` given sequence,
+ `s` and unary function object or function pointer, `f1`.]]
+ [[`BTV(s1, s2, f2)`] [Creates a binary `transform_view` given sequences, `s1` and `s2`
+ and binary function object or function pointer, `f2`.]]
+ [[`TV(tv)`] [Copy constructs a `transform_view` from another `transform_view`, `tv`.]]
+ [[`tv = tv2`] [Assigns to a `transform_view`, `tv`, from another `transform_view`, `tv2`.]]
+]
+
+[heading Example]
+
+ struct square
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename U>
+ struct result<Self(U)>
+ : remove_reference<U>
+ {};
+
+ template <typename T>
+ T operator()(T x) const
+ {
+ return x * x;
+ }
+ };
+
+ typedef __vector__<int, short, double> vector_type;
+ vector_type vec(2, 5, 3.3);
+
+ transform_view<vector_type, square> transform(vec, square());
+ std::cout << transform << std::endl;
+
+[endsect]
+
+[section reverse_view]
+
+`reverse_view` presents a reversed view of underlying sequence. The first
+element will be its last and the last element will be its first.
+
+[heading Header]
+
+ #include <boost/fusion/view/reverse_view.hpp>
+ #include <boost/fusion/include/reverse_view.hpp>
+
+[heading Synopsis]
+
+ template <typename Sequence>
+ struct reverse_view;
+
+[heading Template parameters]
+
+[table
+ [[Parameter] [Description] [Default]]
+ [[`Sequence`] [A __bidirectional_sequence__] []]
+]
+
+[heading Model of]
+
+* __bidirectional_sequence__
+
+[variablelist Notation
+ [[`RV`] [A `reverse_view` type]]
+ [[`s`] [An instance of `Sequence`]]
+ [[`rv`, `rv2`] [Instances of `reverse_view`]]
+]
+
+[heading Expression Semantics]
+
+Semantics of an expression is defined only where it differs from, or is not
+defined in __bidirectional_sequence__.
+
+[table
+ [[Expression] [Semantics]]
+ [[`RV(s)`] [Creates a unary `reverse_view` given sequence, `s`.]]
+ [[`RV(rv)`] [Copy constructs a `reverse_view` from another `reverse_view`, `rv`.]]
+ [[`rv = rv2`] [Assigns to a `reverse_view`, `rv`, from another `reverse_view`, `rv2`.]]
+]
+
+[heading Example]
+
+ typedef __vector__<int, short, double> vector_type;
+ vector_type vec(2, 5, 3.3);
+
+ reverse_view<vector_type> reverse(vec);
+ std::cout << reverse << std::endl;
+
+[endsect]
+
+[endsect]

Added: sandbox/SOC/2009/fusion/libs/fusion/example/cookbook/do_the_bind.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/cookbook/do_the_bind.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,268 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+
+ Problem:
+
+ How to "do the Bind?"
+
+ This recipe shows how to implement a function binder, similar to
+ Boost.Bind based on the Functional module of Fusion.
+
+ It works as follows:
+
+ 'bind' is a global, stateless function object. It is implemented in
+ fused form (fused_binder) and transformed into a variadic function
+ object. When called, 'bind' returns another function object, which
+ holds the arguments of the call to 'bind'. It is, again, implemented
+ in fused form (fused_bound_function) and transformed into unfused
+ form.
+==============================================================================*/
+
+
+#include <boost/fusion/functional/invocation/invoke.hpp>
+#include <boost/fusion/functional/adapter/unfused.hpp>
+#include <boost/fusion/support/deduce_sequence.hpp>
+
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/view/filter_view.hpp>
+
+#include <boost/functional/forward_adapter.hpp>
+#include <boost/functional/lightweight_forward_adapter.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/max.hpp>
+#include <boost/mpl/next.hpp>
+
+#include <boost/ref.hpp>
+#include <iostream>
+#include <typeinfo>
+
+namespace impl
+{
+ namespace fusion = boost::fusion;
+ namespace traits = boost::fusion::traits;
+ namespace result_of = boost::fusion::result_of;
+ namespace mpl = boost::mpl;
+ using mpl::placeholders::_;
+
+ // Placeholders (we inherit from mpl::int_, so we can use placeholders
+ // as indices for fusion::at, later)
+ template <int I> struct placeholder : mpl::int_<I> { };
+
+ // A traits class to find out whether T is a placeholeder
+ template <typename T> struct is_placeholder : mpl::false_ { };
+ template <int I> struct is_placeholder< placeholder<I> > : mpl::true_ { };
+ template <int I> struct is_placeholder< placeholder<I>& > : mpl::true_ { };
+ template <int I> struct is_placeholder< placeholder<I> const > : mpl::true_ { };
+ template <int I> struct is_placeholder< placeholder<I> const& > : mpl::true_ { };
+
+ // This class template provides a Polymorphic Function Object to be used
+ // with fusion::transform. It is applied to the sequence of arguments that
+ // describes the binding and holds a reference to the sequence of arguments
+ // from the final call.
+ template<class FinalArgs> struct argument_transform
+ {
+ FinalArgs const& ref_final_args;
+ public:
+
+ explicit argument_transform(FinalArgs const& final_args)
+ : ref_final_args(final_args)
+ { }
+
+ // A placeholder? Replace it with an argument from the final call...
+ template <int Index>
+ inline typename result_of::at_c<FinalArgs const, Index>::type
+ operator()(placeholder<Index> const&) const
+ {
+ return fusion::at_c<Index>(this->ref_final_args);
+ }
+ // ...just return the bound argument, otherwise.
+ template <typename T> inline T & operator()(T & bound) const
+ {
+ return bound;
+ }
+
+ template <typename Signature>
+ struct result;
+
+ template <class Self, typename T>
+ struct result< Self (T) >
+ : mpl::eval_if< is_placeholder<T>,
+ result_of::at<FinalArgs,typename boost::remove_reference<T>::type>,
+ mpl::identity<T>
+ >
+ { };
+ };
+
+ // Fused implementation of the bound function, the function object
+ // returned by bind
+ template <class BindArgs> class fused_bound_function
+ {
+ // Transform arguments to be held by value
+ typedef typename traits::deduce_sequence<BindArgs>::type bound_args;
+
+ bound_args fsq_bind_args;
+ public:
+
+ fused_bound_function(BindArgs const& bind_args)
+ : fsq_bind_args(bind_args)
+ { }
+
+ template <typename Signature>
+ struct result;
+
+ template <class FinalArgs>
+ struct result_impl
+ : result_of::invoke< typename result_of::front<bound_args>::type,
+ typename result_of::transform<
+ typename result_of::pop_front<bound_args>::type,
+ argument_transform<FinalArgs> const
+ >::type
+ >
+ { };
+
+ template <class Self, class FinalArgs>
+ struct result< Self (FinalArgs) >
+ : result_impl< typename boost::remove_reference<FinalArgs>::type >
+ { };
+
+ template <class FinalArgs>
+ inline typename result_impl<FinalArgs>::type
+ operator()(FinalArgs const& final_args) const
+ {
+ return fusion::invoke( fusion::front(this->fsq_bind_args),
+ fusion::transform( fusion::pop_front(this->fsq_bind_args),
+ argument_transform<FinalArgs>(final_args) ) );
+ }
+ // Could add a non-const variant - omitted for readability
+
+ };
+
+ // Find the number of placeholders in use
+ struct n_placeholders
+ {
+ struct fold_op
+ {
+ template <typename Sig> struct result;
+ template <class S, class A, class B> struct result< S(A &,B &) >
+ : mpl::max<A,B> { };
+ };
+ struct filter_pred
+ {
+ template <class X> struct apply : is_placeholder<X> { };
+ };
+
+ template <typename Seq>
+ struct apply
+ : mpl::next< typename result_of::fold<
+ fusion::filter_view<Seq,filter_pred>, mpl::int_<-1>, fold_op
+ >::type>::type
+ { };
+ };
+
+ // Fused implementation of the 'bind' function
+ struct fused_binder
+ {
+ template <class Signature>
+ struct result;
+
+ template <class BindArgs,
+ int Placeholders = n_placeholders::apply<BindArgs>::value>
+ struct result_impl
+ {
+ typedef boost::forward_adapter<fusion::unfused<
+ fused_bound_function<BindArgs>,!Placeholders>,Placeholders> type;
+ };
+
+ template <class Self, class BindArgs>
+ struct result< Self (BindArgs) >
+ : result_impl< typename boost::remove_reference<BindArgs>::type >
+ { };
+
+ template <class BindArgs>
+ inline typename result_impl< BindArgs >::type
+ operator()(BindArgs & bind_args) const
+ {
+ return typename result< void(BindArgs) >::type(
+ fusion::unfused< fused_bound_function<BindArgs>,
+ ! n_placeholders::apply<BindArgs>::value >(bind_args) );
+ }
+ };
+
+ // The binder's unfused type. We use lightweght_forward_adapter to make
+ // that thing more similar to Boost.Bind. Because of that we have to use
+ // Boost.Ref (below in the sample code)
+ typedef boost::lightweight_forward_adapter< fusion::unfused<fused_binder> > binder;
+}
+
+// Placeholder globals
+impl::placeholder<0> const _1_ = impl::placeholder<0>();
+impl::placeholder<1> const _2_ = impl::placeholder<1>();
+impl::placeholder<2> const _3_ = impl::placeholder<2>();
+impl::placeholder<3> const _4_ = impl::placeholder<3>();
+
+// The bind function is a global, too
+impl::binder const bind = impl::binder();
+
+
+// OK, let's try it out:
+
+struct func
+{
+ typedef int result_type;
+
+ inline int operator()() const
+ {
+ std::cout << "operator()" << std::endl;
+ return 0;
+ }
+
+ template <typename A>
+ inline int operator()(A const& a) const
+ {
+ std::cout << "operator()(A const& a)" << std::endl;
+ std::cout << " a = " << a << " A = " << typeid(A).name() << std::endl;
+ return 1;
+ }
+
+ template <typename A, typename B>
+ inline int operator()(A const& a, B & b) const
+ {
+ std::cout << "operator()(A const& a, B & b)" << std::endl;
+ std::cout << " a = " << a << " A = " << typeid(A).name() << std::endl;
+ std::cout << " b = " << b << " B = " << typeid(B).name() << std::endl;
+ return 2;
+ }
+};
+
+int main()
+{
+ func f;
+ int value = 42;
+ using boost::ref;
+
+ int errors = 0;
+
+ errors += !( bind(f)() == 0);
+ errors += !( bind(f,"Hi")() == 1);
+ errors += !( bind(f,_1_)("there.") == 1);
+ errors += !( bind(f,"The answer is",_1_)(12) == 2);
+ errors += !( bind(f,_1_,ref(value))("Really?") == 2);
+ errors += !( bind(f,_1_,_2_)("Dunno. If there is an answer, it's",value) == 2);
+
+ return !! errors;
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/example/cookbook/fill_em_up.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/cookbook/fill_em_up.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,105 @@
+/*=============================================================================
+ Copyright (c) 2006 Joel de Guzman
+
+ 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)
+
+ Problem:
+
+ So... you have an input sequence I and a target vector R. You want to
+ copy I into R. But, I may have less elements than the result vector R.
+ For those elements not in R, you want them to be default constructed.
+
+ Here's a case:
+
+ I: list<double, std::string>
+ R: vector<double, std::string, int, short>
+
+ You want the elements at the right of I not in R (i.e. int, short)
+ default constructed. Those at the left, found in both I and R, you want
+ to simply copy from I.
+
+ Of course you want to be able to handle any type of I and R.
+
+==============================================================================*/
+
+// We'll use these containers as examples
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+// For doing I/O
+#include <boost/fusion/sequence/io.hpp>
+
+// We'll use join and advance for processing
+#include <boost/fusion/algorithm/transformation/join.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+
+// The fusion <--> MPL link header
+#include <boost/fusion/mpl.hpp>
+
+// Same-o same-o
+#include <iostream>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+
+ // Let's specify our own tuple delimeters for nicer printing
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ // Here's your input sequence
+ typedef list<double, std::string> I;
+ I i(123.456, "Hello");
+
+ // Here's your output sequence. For now, it is just a typedef
+ typedef vector<double, std::string, int, short> R;
+
+ // Let's get the sizes of the sequences. Yeah, you already know that.
+ // But with templates, you are simply given, say, R and I, corresponding
+ // to the types of the sequences. You'll have to deal with it generically.
+ static int const r_size = result_of::size<R>::value;
+ static int const i_size = result_of::size<I>::value;
+
+ // Make sure that I has no more elements than R
+ // Be nice and catch obvious errors earlier rather than later.
+ // Without this assert, the mistake will still be caught by Fusion,
+ // but the error will point to somewhere really obscure.
+ BOOST_STATIC_ASSERT(i_size <= r_size);
+
+ // Let's get the begin and end iterator types of the output sequence
+ // There's no actual vector yet. We just want to know the types.
+ typedef result_of::begin<R>::type r_begin;
+ typedef result_of::end<R>::type r_end;
+
+ // Let's skip i_size elements from r_begin. Again, we just want to know the type.
+ typedef result_of::advance_c<r_begin, i_size>::type r_advance;
+
+ // Now, make MPL iterators from r_advance and r_end. Ditto, just types.
+ typedef mpl::fusion_iterator<r_advance> mpl_r_advance;
+ typedef mpl::fusion_iterator<r_end> mpl_r_end;
+
+ // Make an mpl::iterator_range from the MPL iterators we just created
+ // You guessed it! --just a type.
+ typedef mpl::iterator_range<mpl_r_advance, mpl_r_end> tail;
+
+ // Use join to join the input sequence and our mpl::iterator_range
+ // Our mpl::iterator_range is 'tail'. Here, we'll actually instantiate
+ // 'tail'. Notice that this is a flyweight object, typically just 1 byte
+ // in size -- it doesn't really hold any data, but is a fully conforming
+ // sequence nonetheless. When asked to return its elements, 'tail' returns
+ // each element default constructed. Breeds like a rabbit!
+
+ // Construct R from the joined sequences:
+ R r(join(i, tail()));
+
+ // Then finally, print the result:
+ std::cout << r << std::endl;
+
+ return 0;
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/Jamfile 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+#==============================================================================
+# Copyright (c) 2003-2006 Joel de Guzman
+# Copyright (c) 2006 Dan Marsden
+#
+# Use, modification and distribution is subject to 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)
+#==============================================================================
+
+# bring in rules for testing
+import testing ;
+
+{
+ test-suite example :
+
+ [ run test_example.cpp : : : : ]
+ [ run triple.cpp : : : : ]
+ ;
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/advance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/advance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,48 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+
+ template<typename Struct, int Pos>
+ struct example_struct_iterator;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct advance_impl;
+
+ template<>
+ struct advance_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator, typename N>
+ struct apply
+ {
+ typedef typename Iterator::struct_type struct_type;
+ typedef typename Iterator::index index;
+ typedef example::example_struct_iterator<
+ struct_type, index::value + N::value> type;
+
+ static type
+ call(Iterator const& it)
+ {
+ return type(it.struct_);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <string>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_impl;
+
+ template<>
+ struct at_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence, typename Key>
+ struct apply;
+
+ template<typename Sequence>
+ struct apply<Sequence, mpl::int_<0> >
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>,
+ std::string const&,
+ std::string&>::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return seq.name;
+ };
+ };
+
+ template<typename Sequence>
+ struct apply<Sequence, mpl::int_<1> >
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>,
+ int const&,
+ int&>::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return seq.age;
+ };
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/at_key_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/at_key_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,73 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <string>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_const.hpp>
+
+namespace fields
+{
+ struct name;
+ struct age;
+}
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct at_key_impl;
+
+ template<>
+ struct at_key_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence, typename Key>
+ struct apply;
+
+ template<typename Sequence>
+ struct apply<Sequence, fields::name>
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>,
+ std::string const&,
+ std::string&>::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return seq.name;
+ };
+ };
+
+ template<typename Sequence>
+ struct apply<Sequence, fields::age>
+ {
+ typedef typename mpl::if_<
+ is_const<Sequence>,
+ int const&,
+ int&>::type type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return seq.age;
+ };
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/begin_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/begin_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include "../example_struct_iterator.hpp"
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct begin_impl;
+
+ template<>
+ struct begin_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef example::example_struct_iterator<Sequence, 0> type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/category_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/category_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/fusion/support/category_of.hpp>
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<>
+ struct category_of_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ struct type : random_access_traversal_tag, associative_sequence_tag {};
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/deref_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/deref_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/mpl/if.hpp>
+
+#include <string>
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+
+ template<typename Struct, int Pos>
+ struct example_struct_iterator;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct deref_impl;
+
+ template<>
+ struct deref_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply;
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 0> >
+ {
+ typedef typename mpl::if_<
+ is_const<Struct>, std::string const&, std::string&>::type type;
+
+ static type
+ call(example::example_struct_iterator<Struct, 0> const& it)
+ {
+ return it.struct_.name;
+ }
+ };
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 1> >
+ {
+ typedef typename mpl::if_<
+ is_const<Struct>, int const&, int&>::type type;
+
+ static type
+ call(example::example_struct_iterator<Struct, 1> const& it)
+ {
+ return it.struct_.age;
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/distance_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/distance_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/mpl/minus.hpp>
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct distance_impl;
+
+ template<>
+ struct distance_impl<example::example_struct_iterator_tag>
+ {
+ template<typename First, typename Last>
+ struct apply
+ : mpl::minus<typename Last::index, typename First::index>
+ {
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/end_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/end_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include "../example_struct_iterator.hpp"
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct end_impl;
+
+ template<>
+ struct end_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ {
+ typedef example::example_struct_iterator<Sequence, 2> type;
+
+ static type
+ call(Sequence& seq)
+ {
+ return type(seq);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/equal_to_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/equal_to_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,39 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/mpl/equal_to.hpp>
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct equal_to_impl;
+
+ template<>
+ struct equal_to_impl<example::example_struct_iterator_tag>
+ {
+ template<typename It1, typename It2>
+ struct apply
+ : mpl::equal_to<
+ typename It1::index,
+ typename It2::index>
+ {};
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/has_key_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/has_key_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/or.hpp>
+
+namespace fields
+{
+ struct name;
+ struct age;
+}
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct has_key_impl;
+
+ template<>
+ struct has_key_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence, typename Key>
+ struct apply
+ : mpl::or_<
+ is_same<Key, fields::name>,
+ is_same<Key, fields::age> >
+ {};
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/is_sequence_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/is_sequence_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/mpl/bool.hpp>
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_sequence_impl;
+
+ template<>
+ struct is_sequence_impl<example::example_sequence_tag>
+ {
+ template<typename T>
+ struct apply : mpl::true_ {};
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/is_view_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/is_view_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,33 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/mpl/bool.hpp>
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion
+{
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl;
+
+ template<>
+ struct is_view_impl<example::example_sequence_tag>
+ : boost::mpl::false_
+ {};
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/next_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/next_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,47 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+
+ template<typename Struct, int Pos>
+ struct example_struct_iterator;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct next_impl;
+
+ template<>
+ struct next_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::struct_type struct_type;
+ typedef typename Iterator::index index;
+ typedef example::example_struct_iterator<struct_type, index::value + 1> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.struct_);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/prior_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/prior_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,47 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+
+ template<typename Struct, int Pos>
+ struct example_struct_iterator;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct prior_impl;
+
+ template<>
+ struct prior_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply
+ {
+ typedef typename Iterator::struct_type struct_type;
+ typedef typename Iterator::index index;
+ typedef example::example_struct_iterator<struct_type, index::value - 1> type;
+
+ static type
+ call(Iterator const& i)
+ {
+ return type(i.struct_);
+ }
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/size_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/size_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,37 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/mpl/int.hpp>
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct size_impl;
+
+ template<>
+ struct size_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence>
+ struct apply
+ : mpl::int_<2>
+ {};
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_at_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_at_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,45 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_at_impl;
+
+ template<>
+ struct value_at_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply;
+
+ template<typename Sequence>
+ struct apply<Sequence, mpl::int_<0> >
+ {
+ typedef std::string type;
+ };
+
+ template<typename Sequence>
+ struct apply<Sequence, mpl::int_<1> >
+ {
+ typedef int type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_at_key_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_at_key_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,51 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+namespace fields
+{
+ struct name;
+ struct age;
+}
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_at_key_impl;
+
+ template<>
+ struct value_at_key_impl<example::example_sequence_tag>
+ {
+ template<typename Sequence, typename N>
+ struct apply;
+
+ template<typename Sequence>
+ struct apply<Sequence, fields::name>
+ {
+ typedef std::string type;
+ };
+
+ template<typename Sequence>
+ struct apply<Sequence, fields::age>
+ {
+ typedef int type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_of_impl.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/detail/value_of_impl.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,50 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+#include <string>
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+
+ template<typename Struct, int Pos>
+ struct example_struct_iterator;
+}
+
+namespace boost { namespace fusion {
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct value_of_impl;
+
+ template<>
+ struct value_of_impl<example::example_struct_iterator_tag>
+ {
+ template<typename Iterator>
+ struct apply;
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 0> >
+ {
+ typedef std::string type;
+ };
+
+ template<typename Struct>
+ struct apply<example::example_struct_iterator<Struct, 1> >
+ {
+ typedef int type;
+ };
+ };
+ }
+}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,26 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include "./tag_of.hpp"
+#include "./example_struct_iterator.hpp"
+#include "./detail/begin_impl.hpp"
+#include "./detail/end_impl.hpp"
+#include "./detail/at_impl.hpp"
+#include "./detail/value_at_impl.hpp"
+#include "./detail/size_impl.hpp"
+#include "./detail/category_of_impl.hpp"
+#include "./detail/at_key_impl.hpp"
+#include "./detail/value_at_key_impl.hpp"
+#include "./detail/has_key_impl.hpp"
+#include "./detail/is_sequence_impl.hpp"
+#include "./detail/is_view_impl.hpp"
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct_iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct_iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/fusion/support/iterator_base.hpp>
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/static_assert.hpp>
+
+#include "./detail/next_impl.hpp"
+#include "./detail/prior_impl.hpp"
+#include "./detail/deref_impl.hpp"
+#include "./detail/advance_impl.hpp"
+#include "./detail/distance_impl.hpp"
+#include "./detail/value_of_impl.hpp"
+#include "./detail/equal_to_impl.hpp"
+
+namespace example
+{
+ struct example_struct_iterator_tag;
+
+ template<typename Struct, int Pos>
+ struct example_struct_iterator;
+}
+
+namespace boost { namespace fusion {
+
+ struct random_access_traversal_tag;
+
+ namespace traits
+ {
+ template<typename Struct, int Pos>
+ struct tag_of<example::example_struct_iterator<Struct, Pos> >
+ {
+ typedef example::example_struct_iterator_tag type;
+ };
+ }
+}}
+
+namespace example {
+ template<typename Struct, int Pos>
+ struct example_struct_iterator
+ : boost::fusion::iterator_base<example_struct_iterator<Struct, Pos> >
+ {
+ BOOST_STATIC_ASSERT(Pos >=0 && Pos < 3);
+ typedef Struct struct_type;
+ typedef boost::mpl::int_<Pos> index;
+ typedef boost::fusion::random_access_traversal_tag category;
+
+ example_struct_iterator(Struct& str)
+ : struct_(str) {}
+
+ Struct& struct_;
+ };
+}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct_type.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/example_struct_type.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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
+#define
+
+#include <string>
+
+namespace example
+{
+ struct example_struct
+ {
+ std::string name;
+ int age;
+ example_struct(
+ const std::string& n,
+ int a)
+ : name(n), age(a)
+ {}
+ };
+}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/tag_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/tag_of.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,31 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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
+#define
+
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include "./example_struct_type.hpp"
+
+namespace example
+{
+ struct example_sequence_tag;
+}
+
+namespace boost { namespace fusion {
+
+namespace traits {
+
+ template<>
+ struct tag_of<example::example_struct>
+ {
+ typedef example::example_sequence_tag type;
+ };
+}}}
+
+#endif

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/test_example.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/test_example.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,62 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include "./example_struct.hpp"
+#include "./example_struct_type.hpp"
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/fusion/sequence/intrinsic.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/iterator.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/assert.hpp>
+
+int main()
+{
+ example::example_struct bert("bert", 99);
+ using namespace boost::fusion;
+
+ BOOST_MPL_ASSERT((traits::is_associative<example::example_struct>));
+ BOOST_MPL_ASSERT((traits::is_random_access<example::example_struct>));
+ BOOST_MPL_ASSERT((traits::is_sequence<example::example_struct>));
+
+ BOOST_TEST(deref(begin(bert)) == "bert");
+ BOOST_TEST(*next(begin(bert)) == 99);
+ BOOST_TEST(*prior(end(bert)) == 99);
+ BOOST_TEST(*advance_c<1>(begin(bert)) == 99);
+ BOOST_TEST(*advance_c<-1>(end(bert)) == 99);
+ BOOST_TEST(distance(begin(bert), end(bert)) == 2);
+
+ typedef result_of::begin<example::example_struct>::type first;
+ typedef result_of::next<first>::type second;
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<first>::type, std::string>));
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_of<second>::type, int>));
+
+ BOOST_TEST(begin(bert) != end(bert));
+ BOOST_TEST(advance_c<2>(begin(bert)) == end(const_cast<const example::example_struct&>(bert)));
+
+ BOOST_TEST(at_c<0>(bert) == "bert");
+ BOOST_TEST(at_c<1>(bert) == 99);
+
+ BOOST_TEST(at_key<fields::name>(bert) == "bert");
+ BOOST_TEST(at_key<fields::age>(bert) == 99);
+
+ BOOST_TEST(has_key<fields::name>(bert));
+ BOOST_TEST(has_key<fields::age>(bert));
+ BOOST_TEST(!has_key<int>(bert));
+
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<example::example_struct, 0>::type, std::string>));
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_c<example::example_struct, 1>::type, int>));
+
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<example::example_struct, fields::name>::type, std::string>));
+ BOOST_MPL_ASSERT((boost::is_same<result_of::value_at_key<example::example_struct, fields::age>::type, int>));
+
+ BOOST_TEST(size(bert) == 2);
+
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/extension/triple.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/extension/triple.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,317 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+
+/*=============================================================================
+ An implementation of a std::pair like triple<T0, T1, T2>
+ We use fusion::sequence_facade and fusion::iterator_facade
+ to make our triple a fully conforming Boost.Fusion random
+ traversal sequence.
+==============================================================================*/
+
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/fusion/sequence/sequence_facade.hpp>
+#include <boost/fusion/iterator/iterator_facade.hpp>
+#include <boost/fusion/sequence/intrinsic.hpp>
+#include <boost/fusion/iterator.hpp>
+#include <boost/fusion/support/category_of.hpp>
+
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/minus.hpp>
+#include <boost/mpl/assert.hpp>
+
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <string>
+
+namespace mpl = boost::mpl;
+namespace fusion = boost::fusion;
+
+namespace demo
+{
+ template<typename Seq, int N>
+ struct triple_iterator
+ : fusion::iterator_facade<triple_iterator<Seq, N>, fusion::random_access_traversal_tag>
+ {
+ typedef mpl::int_<N> index;
+ typedef Seq seq_type;
+
+ triple_iterator(Seq& seq)
+ : seq_(seq) {}
+
+ Seq& seq_;
+
+ template<typename T>
+ struct value_of;
+
+ template<typename Sq>
+ struct value_of<triple_iterator<Sq, 0> >
+ : mpl::identity<typename Sq::t0_type>
+ {};
+
+ template<typename Sq>
+ struct value_of<triple_iterator<Sq, 1> >
+ : mpl::identity<typename Sq::t1_type>
+ {};
+
+ template<typename Sq>
+ struct value_of<triple_iterator<Sq, 2> >
+ : mpl::identity<typename Sq::t2_type>
+ {};
+
+ template<typename T>
+ struct deref;
+
+ template <typename Sq>
+ struct deref<triple_iterator<Sq, 0> >
+ {
+ typedef typename
+ mpl::if_<
+ boost::is_const<Sq>
+ , typename Sq::t0_type const&
+ , typename Sq::t0_type&
+ >::type
+ type;
+
+ static type
+ call(triple_iterator<Sq, 0> const& iter)
+ {
+ return iter.seq_.t0;
+ }
+ };
+
+ template <typename Sq>
+ struct deref<triple_iterator<Sq, 1> >
+ {
+ typedef typename
+ mpl::if_<
+ boost::is_const<Sq>
+ , typename Sq::t1_type const&
+ , typename Sq::t1_type&
+ >::type
+ type;
+
+ static type
+ call(triple_iterator<Sq, 1> const& iter)
+ {
+ return iter.seq_.t1;
+ }
+ };
+
+ template <typename Sq>
+ struct deref<triple_iterator<Sq, 2> >
+ {
+ typedef typename
+ mpl::if_<
+ boost::is_const<Sq>
+ , typename Sq::t2_type const&
+ , typename Sq::t2_type&
+ >::type
+ type;
+
+ static type
+ call(triple_iterator<Sq, 2> const& iter)
+ {
+ return iter.seq_.t2;
+ }
+ };
+
+ template<typename It>
+ struct next
+ {
+ typedef triple_iterator<
+ typename It::seq_type, It::index::value + 1> type;
+
+ static type call(It const& it)
+ {
+ return type(it.seq_);
+ }
+ };
+
+ template<typename It>
+ struct prior
+ {
+ typedef triple_iterator<
+ typename It::seq_type, It::index::value - 1> type;
+
+ static type call(It const& it)
+ {
+ return type(it.seq_);
+ }
+ };
+
+ template<typename It1, typename It2>
+ struct distance
+ {
+ typedef typename mpl::minus<typename It2::index, typename It1::index>::type type;
+
+ static type call(It1 const& it1, It2 const& it2)
+ {
+ return type();
+ }
+ };
+
+ template<typename It, typename M>
+ struct advance
+ {
+ typedef triple_iterator<
+ typename It::seq_type,
+ It::index::value + M::value> type;
+
+ static type call(It const& it)
+ {
+ return type(it.seq_);
+ }
+ };
+ };
+
+ template<typename T0, typename T1, typename T2>
+ struct triple
+ : fusion::sequence_facade<triple<T0, T1, T2>, fusion::random_access_traversal_tag>
+ {
+ triple(T0 const& t0, T1 const& t1, T2 const& t2)
+ : t0(t0), t1(t1), t2(t2)
+ {}
+
+ template<typename Sq>
+ struct begin
+ {
+ typedef demo::triple_iterator<
+ Sq, 0> type;
+
+ static type call(Sq& sq)
+ {
+ return type(sq);
+ }
+ };
+
+ template<typename Sq>
+ struct end
+ {
+ typedef demo::triple_iterator<
+ Sq, 3> type;
+
+ static type call(Sq& sq)
+ {
+ return type(sq);
+ }
+ };
+
+ template<typename Sq>
+ struct size
+ : mpl::int_<3>
+ {};
+
+ template<typename Sq, typename N>
+ struct value_at
+ : value_at<Sq, mpl::int_<N::value> >
+ {};
+
+ template<typename Sq>
+ struct value_at<Sq, mpl::int_<0> >
+ {
+ typedef typename Sq::t0_type type;
+ };
+
+ template<typename Sq>
+ struct value_at<Sq, mpl::int_<1> >
+ {
+ typedef typename Sq::t1_type type;
+ };
+
+ template<typename Sq>
+ struct value_at<Sq, mpl::int_<2> >
+ {
+ typedef typename Sq::t2_type type;
+ };
+
+ template<typename Sq, typename N>
+ struct at
+ : at<Sq, mpl::int_<N::value> >
+ {};
+
+ template<typename Sq>
+ struct at<Sq, mpl::int_<0> >
+ {
+ typedef typename
+ mpl::if_<
+ boost::is_const<Sq>
+ , typename Sq::t0_type const&
+ , typename Sq::t0_type&
+ >::type
+ type;
+
+ static type call(Sq& sq)
+ {
+ return sq.t0;
+ }
+ };
+
+ template<typename Sq>
+ struct at<Sq, mpl::int_<1> >
+ {
+ typedef typename
+ mpl::if_<
+ boost::is_const<Sq>
+ , typename Sq::t1_type const&
+ , typename Sq::t1_type&
+ >::type
+ type;
+
+ static type call(Sq& sq)
+ {
+ return sq.t1;
+ }
+ };
+
+ template<typename Sq>
+ struct at<Sq, mpl::int_<2> >
+ {
+ typedef typename
+ mpl::if_<
+ boost::is_const<Sq>
+ , typename Sq::t2_type const&
+ , typename Sq::t2_type&
+ >::type
+ type;
+
+ static type call(Sq& sq)
+ {
+ return sq.t2;
+ }
+ };
+
+ typedef T0 t0_type;
+ typedef T1 t1_type;
+ typedef T2 t2_type;
+
+ T0 t0;
+ T1 t1;
+ T2 t2;
+ };
+}
+
+int main()
+{
+ typedef demo::triple<int, char, std::string> my_triple;
+ my_triple t(101, 'a', "hello");
+ BOOST_TEST(*fusion::begin(t) == 101);
+ BOOST_TEST(*fusion::next(fusion::begin(t)) == 'a');
+ BOOST_TEST(*fusion::prior(fusion::end(t)) == "hello");
+ BOOST_TEST(fusion::distance(fusion::begin(t), fusion::end(t)) == 3);
+ BOOST_TEST(fusion::size(t) == 3);
+ BOOST_MPL_ASSERT((boost::is_same<int, fusion::result_of::value_at_c<my_triple, 0>::type>));
+ BOOST_MPL_ASSERT((boost::is_same<char, fusion::result_of::value_at_c<my_triple, 1>::type>));
+ BOOST_MPL_ASSERT((boost::is_same<std::string, fusion::result_of::value_at_c<my_triple, 2>::type>));
+ BOOST_TEST(fusion::at_c<0>(t) == 101);
+ BOOST_TEST(fusion::at_c<1>(t) == 'a');
+ BOOST_TEST(fusion::at_c<2>(t) == "hello");
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/Jamfile 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+#==============================================================================
+# Copyright (c) 2003-2006 Joel de Guzman
+# Copyright (c) 2006 Dan Marsden
+#
+# Use, modification and distribution is subject to 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)
+#==============================================================================
+project fusion-performance ;
+
+exe accumulate : accumulate.cpp ;
+
+exe inner_product : inner_product.cpp ;
+
+exe inner_product2 : inner_product2.cpp ;
+
+exe sequence_efficiency : sequence_efficiency.cpp ;
+
+#exe functional : functional.cpp ;
+

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/accumulate.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/accumulate.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,356 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/array.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/adapted/array.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <algorithm>
+#include <numeric>
+#include <functional>
+#include <iostream>
+#include <cmath>
+#include <limits>
+
+#ifdef _MSC_VER
+// inline aggressively
+# pragma inline_recursion(on) // turn on inline recursion
+# pragma inline_depth(255) // max inline depth
+#endif
+
+int const REPEAT_COUNT = 10;
+
+double const duration = 0.5;
+
+namespace
+{
+ template<int N>
+ double time_for_std_accumulate(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr;
+ std::generate(arr.begin(), arr.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::accumulate(arr.begin(), arr.end(), 0);
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::accumulate(arr.begin(), arr.end(), 0);
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+
+ struct poly_add
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs,Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ Lhs operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return lhs + rhs;
+ }
+ };
+
+ struct poly_mult
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ Lhs operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return lhs * rhs;
+ }
+ };
+
+ template<int N>
+ double time_for_fusion_accumulate(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr;
+ std::generate(arr.begin(), arr.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(arr, 0, poly_add());
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ std::cout << iter << " iterations" << std::endl;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(arr, 0, poly_add());
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ std::cout << ".";
+ std::cout.flush();
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+
+#if 0
+ template<int N>
+ double time_for_std_inner_product(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr1;
+ boost::array<int, N> arr2;
+ std::generate(arr1.begin(), arr1.end(), rand);
+ std::generate(arr2.begin(), arr2.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0);
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0);
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+
+ template<int N>
+ double time_for_fusion_inner_product(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr1;
+ boost::array<int, N> arr2;
+ std::generate(arr1.begin(), arr1.end(), rand);
+ std::generate(arr2.begin(), arr2.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add());
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add());
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+
+ struct poly_combine
+ {
+ template<typename Lhs, typename Rhs>
+ struct result
+ : boost::fusion::detail::remove_reference<Rhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ typename result<Lhs,Rhs>::type
+ operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return rhs + boost::fusion::at_c<0>(lhs) * boost::fusion::at_c<1>(lhs);
+ }
+ };
+
+ template<int N>
+ double time_for_fusion_inner_product2(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr1;
+ boost::array<int, N> arr2;
+ std::generate(arr1.begin(), arr1.end(), rand);
+ std::generate(arr2.begin(), arr2.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::zip(arr1, arr2), 0, poly_combine());
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ std::cout << iter << " iterations" << std::endl;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::zip(arr1, arr2), 0, poly_combine());
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+#endif
+}
+
+int main()
+{
+ int total = 0;
+ int res;
+ std::cout << "short accumulate std test " << time_for_std_accumulate<8>(res) << std::endl;
+ total += res;
+ std::cout << "short accumulate fusion test " << time_for_fusion_accumulate<8>(res) << std::endl;
+ total += res;
+
+ std::cout << "medium accumulate std test " << time_for_std_accumulate<64>(res) << std::endl;
+ total += res;
+ std::cout << "medium accumulate fusion test " << time_for_fusion_accumulate<64>(res) << std::endl;
+ total += res;
+
+ std::cout << "long accumulate std test " << time_for_std_accumulate<128>(res) << std::endl;
+ total += res;
+ std::cout << "long accumulate fusion test " << time_for_fusion_accumulate<128>(res) << std::endl;
+ total += res;
+
+#if 0
+ std::cout << "short inner_product std test " << time_for_std_inner_product<8>(res) << std::endl;
+ total += res;
+ std::cout << "short inner_product fusion test " << time_for_fusion_inner_product<8>(res) << std::endl;
+ total += res;
+ std::cout << "short inner_product fusion 2 test " << time_for_fusion_inner_product2<8>(res) << std::endl;
+ total += res;
+
+ std::cout << "medium inner_product std test " << time_for_std_inner_product<64>(res) << std::endl;
+ total += res;
+ std::cout << "medium inner_product fusion test " << time_for_fusion_inner_product<64>(res) << std::endl;
+ total += res;
+ std::cout << "medium inner_product fusion 2 test " << time_for_fusion_inner_product2<64>(res) << std::endl;
+ total += res;
+
+
+ std::cout << "long inner_product std test " << time_for_std_inner_product<128>(res) << std::endl;
+ total += res;
+ std::cout << "long inner_product fusion test " << time_for_fusion_inner_product<128>(res) << std::endl;
+ total += res;
+ std::cout << "long inner_product fusion 2 test " << time_for_fusion_inner_product2<128>(res) << std::endl;
+ total += res;
+#endif
+
+ return total;
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/functional.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/functional.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,305 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/functional/adapter/unfused_generic.hpp>
+#include <boost/fusion/functional/adapter/unfused_rvalue_args.hpp>
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+
+#include <boost/utility/result_of.hpp>
+#include <boost/config.hpp>
+#include <boost/timer.hpp>
+#include <algorithm>
+#include <iostream>
+
+#ifdef _MSC_VER
+// inline aggressively
+# pragma inline_recursion(on) // turn on inline recursion
+# pragma inline_depth(255) // max inline depth
+#endif
+
+int const REPEAT_COUNT = 3;
+
+double const duration = 0.125;
+
+
+namespace
+{
+ struct fused_sum
+ {
+ template <typename Seq>
+ int operator()(Seq const& seq) const
+ {
+ int state = 0;
+ return boost::fusion::fold(seq, state, sum_op());
+ }
+
+ typedef int result_type;
+
+ private:
+
+ struct sum_op
+ {
+ template <typename T>
+ int operator()(T const& elem, int value) const
+ {
+ return value + sizeof(T) * elem;
+ }
+
+ template <typename T>
+ int operator()(T & elem, int value) const
+ {
+ elem += sizeof(T);
+ return value;
+ }
+
+ typedef int result_type;
+ };
+ };
+
+ struct unfused_sum
+ {
+ inline int operator()() const
+ {
+ return 0;
+ }
+ template<typename T0>
+ inline int operator()(T0 const& a0) const
+ {
+ return a0;
+ }
+ template<typename T0, typename T1>
+ inline int operator()(T0 const& a0, T1 const& a1) const
+ {
+ return a0 + a1;
+ }
+ template<typename T0, typename T1, typename T2>
+ inline int operator()(T0 const& a0, T1 const& a1, T2 a2) const
+ {
+ return a0 + a1 + a2;
+ }
+ template<typename T0, typename T1, typename T2, typename T3>
+ inline int operator()(T0 const& a0, T1 const& a1, T2 const& a2, T3 const& a3) const
+ {
+ return a0 + a1 + a2 + a3;
+ }
+
+ typedef int result_type;
+ };
+
+ template<typename F>
+ double call_unfused(F const& func, int & j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i += func();
+ i += func(0);
+ i += func(0,1);
+ i += func(0,1,2);
+ i += func(0,1,2,3);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = func(); j += i;
+ i = func(0); j += i;
+ i = func(0,1); j += i;
+ i = func(0,1,2); j += i;
+ i = func(0,1,2,3); j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ return result / iter;
+ }
+
+ template<typename F>
+ double call_fused_ra(F const& func, int & j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ do
+ {
+ boost::fusion::vector<> v0;
+ boost::fusion::vector<int> v1(0);
+ boost::fusion::vector<int,int> v2(0,1);
+ boost::fusion::vector<int,int,int> v3(0,1,2);
+ boost::fusion::vector<int,int,int,int> v4(0,1,2,3);
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i += func(v0);
+ i += func(v1);
+ i += func(v2);
+ i += func(v3);
+ i += func(v4);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ boost::fusion::vector<> v0;
+ boost::fusion::vector<int> v1(0);
+ boost::fusion::vector<int,int> v2(0,1);
+ boost::fusion::vector<int,int,int> v3(0,1,2);
+ boost::fusion::vector<int,int,int,int> v4(0,1,2,3);
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = func(v0); j += i;
+ i = func(v1); j += i;
+ i = func(v2); j += i;
+ i = func(v3); j += i;
+ i = func(v4); j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ return result / iter;
+ }
+
+ template<typename F>
+ double call_fused(F const& func, int & j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ do
+ {
+ boost::fusion::list<> l0;
+ boost::fusion::list<int> l1(0);
+ boost::fusion::list<int,int> l2(0,1);
+ boost::fusion::list<int,int,int> l3(0,1,2);
+ boost::fusion::list<int,int,int,int> l4(0,1,2,3);
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i += func(l0);
+ i += func(l1);
+ i += func(l2);
+ i += func(l3);
+ i += func(l4);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ boost::fusion::list<> l0;
+ boost::fusion::list<int> l1(0);
+ boost::fusion::list<int,int> l2(0,1);
+ boost::fusion::list<int,int,int> l3(0,1,2);
+ boost::fusion::list<int,int,int,int> l4(0,1,2,3);
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = func(l0); j += i;
+ i = func(l1); j += i;
+ i = func(l2); j += i;
+ i = func(l3); j += i;
+ i = func(l4); j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ return result / iter;
+ }
+}
+
+int main()
+{
+ int total = 0;
+ int res;
+ typedef fused_sum F;
+ typedef unfused_sum U;
+
+ std::cout << "Compiler: " << BOOST_COMPILER << std::endl;
+ std::cout << std::endl << "Unfused adapters:" << std::endl;
+ {
+ F f;
+ std::cout << "F /* a fused function object */ " << call_fused_ra(f,res) << std::endl;
+ total += res;
+ }
+ {
+ F f;
+ std::cout << "without random access " << call_fused(f,res) << std::endl;
+ total += res;
+ }
+ {
+ boost::fusion::unfused_rvalue_args<F> f;
+ std::cout << "unfused_rvalue_args<F> " << call_unfused(f,res) << std::endl;
+ total += res;
+ }
+ {
+ boost::fusion::unfused_generic<F> f;
+ std::cout << "unfused_generic<F> " << call_unfused(f,res) << std::endl;
+ total += res;
+ }
+ std::cout << std::endl << "Fused adapters:" << std::endl;
+ {
+ unfused_sum f;
+ std::cout << "U /* an unfused function object */ " << call_unfused(f,res) << std::endl;
+ total += res;
+ }
+ {
+ boost::fusion::fused_function_object<U> f;
+ std::cout << "fused_function_object<U> " << call_fused_ra(f,res) << std::endl;
+ total += res;
+ }
+ {
+ boost::fusion::fused_function_object<U> f;
+ std::cout << "without random access " << call_fused(f,res) << std::endl;
+ total += res;
+ }
+ {
+ boost::fusion::unfused_rvalue_args< boost::fusion::fused_function_object<U> > f;
+ std::cout << "unfused_rvalue_args<fused_function_object<U> > " << call_unfused(f,res) << std::endl;
+ total += res;
+ }
+ {
+ boost::fusion::unfused_generic< boost::fusion::fused_function_object<U> > f;
+ std::cout << "unfused_generic<fused_function_object<U> > " << call_unfused(f,res) << std::endl;
+ total += res;
+ }
+
+ return total;
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,184 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/array.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/adapted/array.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <algorithm>
+#include <numeric>
+#include <functional>
+#include <iostream>
+#include <cmath>
+#include <limits>
+
+#ifdef _MSC_VER
+// inline aggressively
+# pragma inline_recursion(on) // turn on inline recursion
+# pragma inline_depth(255) // max inline depth
+#endif
+
+int const REPEAT_COUNT = 10;
+
+double const duration = 0.5;
+
+namespace
+{
+ struct poly_add
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ Lhs operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return lhs + rhs;
+ }
+ };
+
+ struct poly_mult
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ Lhs operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return lhs * rhs;
+ }
+ };
+
+ template<int N>
+ double time_for_std_inner_product(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr1;
+ boost::array<int, N> arr2;
+ std::generate(arr1.begin(), arr1.end(), rand);
+ std::generate(arr2.begin(), arr2.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0);
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0);
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+
+ template<int N>
+ double time_for_fusion_inner_product(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr1;
+ boost::array<int, N> arr2;
+ std::generate(arr1.begin(), arr1.end(), rand);
+ std::generate(arr2.begin(), arr2.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add());
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::transform(arr1, arr2, poly_mult()), 0, poly_add());
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+}
+
+int main()
+{
+ int total = 0;
+ int res;
+
+ std::cout << "short inner_product std test " << time_for_std_inner_product<8>(res) << std::endl;
+ total += res;
+ std::cout << "short inner_product fusion test " << time_for_fusion_inner_product<8>(res) << std::endl;
+ total += res;
+
+ std::cout << "medium inner_product std test " << time_for_std_inner_product<64>(res) << std::endl;
+ total += res;
+ std::cout << "medium inner_product fusion test " << time_for_fusion_inner_product<64>(res) << std::endl;
+ total += res;
+
+ std::cout << "long inner_product std test " << time_for_std_inner_product<128>(res) << std::endl;
+ total += res;
+ std::cout << "long inner_product fusion test " << time_for_fusion_inner_product<128>(res) << std::endl;
+ total += res;
+
+ return total;
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product2.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/inner_product2.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,206 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/array.hpp>
+#include <boost/timer.hpp>
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/adapted/array.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <algorithm>
+#include <numeric>
+#include <functional>
+#include <iostream>
+#include <cmath>
+#include <limits>
+
+#ifdef _MSC_VER
+// inline aggressively
+# pragma inline_recursion(on) // turn on inline recursion
+# pragma inline_depth(255) // max inline depth
+#endif
+
+int const REPEAT_COUNT = 10;
+
+double const duration = 0.5;
+
+namespace
+{
+ struct poly_add
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ Lhs operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return lhs + rhs;
+ }
+ };
+
+ struct poly_mult
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ Lhs operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return lhs * rhs;
+ }
+ };
+
+ template<int N>
+ double time_for_std_inner_product(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr1;
+ boost::array<int, N> arr2;
+ std::generate(arr1.begin(), arr1.end(), rand);
+ std::generate(arr2.begin(), arr2.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0);
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = std::inner_product(arr1.begin(), arr1.end(), arr2.begin(), 0);
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+
+ struct poly_combine
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Rhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ typename result<poly_combine(Lhs,Rhs)>::type
+ operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return rhs + boost::fusion::at_c<0>(lhs) * boost::fusion::at_c<1>(lhs);
+ }
+ };
+
+ template<int N>
+ double time_for_fusion_inner_product2(int& j)
+ {
+ boost::timer tim;
+ int i = 0;
+ long long iter = 65536;
+ long long counter, repeats;
+ double result = (std::numeric_limits<double>::max)();
+ double runtime = 0;
+ double run;
+ boost::array<int, N> arr1;
+ boost::array<int, N> arr2;
+ std::generate(arr1.begin(), arr1.end(), rand);
+ std::generate(arr2.begin(), arr2.end(), rand);
+ do
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::zip(arr1, arr2), 0, poly_combine());
+ static_cast<void>(i);
+ }
+ runtime = tim.elapsed();
+ iter *= 2;
+ } while(runtime < duration);
+ iter /= 2;
+
+ std::cout << iter << " iterations" << std::endl;
+
+ // repeat test and report least value for consistency:
+ for(repeats = 0; repeats < REPEAT_COUNT; ++repeats)
+ {
+ tim.restart();
+ for(counter = 0; counter < iter; ++counter)
+ {
+ i = boost::fusion::accumulate(
+ boost::fusion::zip(arr1, arr2), 0, poly_combine());
+ j += i;
+ }
+ run = tim.elapsed();
+ result = (std::min)(run, result);
+ }
+ std::cout << i << std::endl;
+ return result / iter;
+ }
+}
+
+int main()
+{
+ int total = 0;
+ int res;
+
+ std::cout << "short inner_product std test " << time_for_std_inner_product<8>(res) << std::endl;
+ total += res;
+ std::cout << "short inner_product fusion 2 test " << time_for_fusion_inner_product2<8>(res) << std::endl;
+ total += res;
+
+ std::cout << "medium inner_product std test " << time_for_std_inner_product<64>(res) << std::endl;
+ total += res;
+ std::cout << "medium inner_product fusion 2 test " << time_for_fusion_inner_product2<64>(res) << std::endl;
+ total += res;
+
+#if 0 // Leads to ICE with MSVC 8.0
+ std::cout << "long inner_product std test " << time_for_std_inner_product<128>(res) << std::endl;
+ total += res;
+ std::cout << "long inner_product fusion 2 test " << time_for_fusion_inner_product2<128>(res) << std::endl;
+ total += res;
+#endif
+
+ return total;
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/measure.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/measure.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,85 @@
+// Copyright David Abrahams, Matthias Troyer, Michael Gauckler
+// 2005. 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)
+
+#if !defined(LIVE_CODE_TYPE)
+# define LIVE_CODE_TYPE int
+#endif
+
+#include <boost/timer.hpp>
+
+namespace test
+{
+ // This value is required to ensure that a smart compiler's dead
+ // code elimination doesn't optimize away anything we're testing.
+ // We'll use it to compute the return code of the executable to make
+ // sure it's needed.
+ LIVE_CODE_TYPE live_code;
+
+ // Call objects of the given Accumulator type repeatedly with x as
+ // an argument.
+ template <class Accumulator, class Arg>
+ void hammer(Arg const& x, long const repeats)
+ {
+ // Strategy: because the sum in an accumulator after each call
+ // depends on the previous value of the sum, the CPU's pipeline
+ // might be stalled while waiting for the previous addition to
+ // complete. Therefore, we allocate an array of accumulators,
+ // and update them in sequence, so that there's no dependency
+ // between adjacent addition operations.
+ //
+ // Additionally, if there were only one accumulator, the
+ // compiler or CPU might decide to update the value in a
+ // register rather that writing it back to memory. we want each
+ // operation to at least update the L1 cache. *** Note: This
+ // concern is specific to the particular application at which
+ // we're targeting the test. ***
+
+ // This has to be at least as large as the number of
+ // simultaneous accumulations that can be executing in the
+ // compiler pipeline. A safe number here is larger than the
+ // machine's maximum pipeline depth. If you want to test the L2
+ // or L3 cache, or main memory, you can increase the size of
+ // this array. 1024 is an upper limit on the pipeline depth of
+ // current vector machines.
+ const std::size_t number_of_accumulators = 1024;
+ live_code = 0; // reset to zero
+
+ Accumulator a[number_of_accumulators];
+
+ for (long iteration = 0; iteration < repeats; ++iteration)
+ {
+ for (Accumulator* ap = a; ap < a + number_of_accumulators; ++ap)
+ {
+ (*ap)(x);
+ }
+ }
+
+ // Accumulate all the partial sums to avoid dead code
+ // elimination.
+ for (Accumulator* ap = a; ap < a + number_of_accumulators; ++ap)
+ {
+ live_code += ap->sum;
+ }
+ }
+
+ // Measure the time required to hammer accumulators of the given
+ // type with the argument x.
+ template <class Accumulator, class T>
+ double measure(T const& x, long const repeats)
+ {
+ // Hammer accumulators a couple of times to ensure the
+ // instruction cache is full of our test code, and that we don't
+ // measure the cost of a page fault for accessing the data page
+ // containing the memory where the accumulators will be
+ // allocated
+ hammer<Accumulator>(x, repeats);
+ hammer<Accumulator>(x, repeats);
+
+ // Now start a timer
+ boost::timer time;
+ hammer<Accumulator>(x, repeats); // This time, we'll measure
+ return time.elapsed() / repeats; // return the time of one iteration
+ }
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/sequence_efficiency.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/sequence_efficiency.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,251 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include "measure.hpp"
+
+//TODO: BOOST_FUSION_MAX
+#define FUSION_MAX_LIST_SIZE 30
+#define FUSION_MAX_VECTOR_SIZE 30
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/list.hpp>
+
+#include <boost/type_traits/remove_reference.hpp>
+
+#include <boost/lexical_cast.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/preprocessor/enum.hpp>
+
+#include <iostream>
+
+#ifdef _MSC_VER
+// inline aggressively
+# pragma inline_recursion(on) // turn on inline recursion
+# pragma inline_depth(255) // max inline depth
+#endif
+
+// About the tests:
+//
+// The tests below compare various fusion sequences to see how abstraction
+// affects prformance.
+//
+// We have 3 sequence sizes for each fusion sequence we're going to test.
+//
+// small = 3 elements
+// medium = 10 elements
+// big = 30 elements
+//
+// The sequences are initialized with values 0..N-1 from numeric strings
+// parsed by boost::lexical_cast to make sure that the compiler is not
+// optimizing by replacing the computation with constant results computed
+// at compile time.
+//
+// These sequences will be subjected to our accumulator which calls
+// fusion::accumulate:
+//
+// this->sum += boost::fusion::accumulate(seq, 0, poly_add());
+//
+// where poly_add simply sums the current value with the content of
+// the sequence element. This accumulator will be called many times
+// through the "hammer" test (see measure.hpp).
+//
+// The tests are compared against a base using a plain_accumulator
+// which does a simple addition:
+//
+// this->sum += x;
+
+namespace
+{
+ struct poly_add
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename Lhs, typename Rhs>
+ struct result<Self(Lhs, Rhs)>
+ : boost::fusion::detail::remove_reference<Lhs>
+ {};
+
+ template<typename Lhs, typename Rhs>
+ Lhs operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return lhs + rhs;
+ }
+ };
+
+ // Our Accumulator function
+ template <typename T>
+ struct accumulator
+ {
+ accumulator()
+ : sum()
+ {}
+
+ template <typename Sequence>
+ void operator()(Sequence const& seq)
+ {
+ this->sum += boost::fusion::accumulate(seq, 0, poly_add());
+ }
+
+ T sum;
+ };
+
+ // Plain Accumulator function
+ template <typename T>
+ struct plain_accumulator
+ {
+ plain_accumulator()
+ : sum()
+ {}
+
+ template <typename X>
+ void operator()(X const& x)
+ {
+ this->sum += x;
+ }
+
+ T sum;
+ };
+
+ template <typename T>
+ void check(T const& seq, char const* info)
+ {
+ test::measure<accumulator<int> >(seq, 1);
+ std::cout << info << test::live_code << std::endl;
+ }
+
+ template <typename T>
+ void measure(T const& seq, char const* info, long const repeats, double base)
+ {
+ double t = test::measure<accumulator<int> >(seq, repeats);
+ std::cout
+ << info
+ << t
+ << " (" << int((t/base)*100) << "%)"
+ << std::endl;
+ }
+
+ template <typename T>
+ void test_assembler(T const& seq)
+ {
+ test::live_code = boost::fusion::accumulate(seq, 0, poly_add());
+ }
+}
+
+// We'll initialize the sequences from numeric strings that
+// pass through boost::lexical_cast to make sure that the
+// compiler is not optimizing by replacing the computation
+// with constant results computed at compile time.
+#define INIT(z, n, text) boost::lexical_cast<int>(BOOST_PP_STRINGIZE(n))
+
+int main()
+{
+ using namespace boost::fusion;
+ std::cout.setf(std::ios::scientific);
+
+ vector<
+ int, int, int
+ >
+ vsmall(BOOST_PP_ENUM(3, INIT, _));
+
+ list<
+ int, int, int
+ >
+ lsmall(BOOST_PP_ENUM(3, INIT, _));
+
+ vector<
+ int, int, int, int, int, int, int, int, int, int
+ >
+ vmedium(BOOST_PP_ENUM(10, INIT, _));
+
+ list<
+ int, int, int, int, int, int, int, int, int, int
+ >
+ lmedium(BOOST_PP_ENUM(10, INIT, _));
+
+ //TODO cschmidt: uncomment this once mpl got variadic templates
+ //and we are not limited to BOOST_MPL_MAX_VECTOR_SIZE any more!
+ /*vector<
+ int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ >
+ vbig(BOOST_PP_ENUM(30, INIT, _));
+
+ list<
+ int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ >
+ lbig(BOOST_PP_ENUM(30, INIT, _));*/
+
+ // first decide how many repetitions to measure
+ long repeats = 100;
+ double measured = 0;
+ while (measured < 2.0 && repeats <= 10000000)
+ {
+ repeats *= 10;
+
+ boost::timer time;
+
+ test::hammer<plain_accumulator<int> >(0, repeats);
+ test::hammer<accumulator<int> >(vsmall, repeats);
+ test::hammer<accumulator<int> >(lsmall, repeats);
+ test::hammer<accumulator<int> >(vmedium, repeats);
+ test::hammer<accumulator<int> >(lmedium, repeats);
+ //test::hammer<accumulator<int> >(vbig, repeats);
+ //test::hammer<accumulator<int> >(lbig, repeats);
+
+ measured = time.elapsed();
+ }
+
+ test::measure<plain_accumulator<int> >(1, 1);
+ std::cout
+ << "base accumulated result: "
+ << test::live_code
+ << std::endl;
+
+ double base_time = test::measure<plain_accumulator<int> >(1, repeats);
+ std::cout
+ << "base time: "
+ << base_time;
+
+ std::cout
+ << std::endl
+ << "-------------------------------------------------------------------"
+ << std::endl;
+
+ check(vsmall, "small vector accumulated result: ");
+ check(lsmall, "small list accumulated result: ");
+ check(vmedium, "medium vector accumulated result: ");
+ check(lmedium, "medium list accumulated result: ");
+ //check(vbig, "big vector accumulated result: ");
+ //check(lbig, "big list accumulated result: ");
+
+ std::cout
+ << "-------------------------------------------------------------------"
+ << std::endl;
+
+ measure(vsmall, "small vector time: ", repeats, base_time);
+ measure(lsmall, "small list time: ", repeats, base_time);
+ measure(vmedium, "medium vector time: ", repeats, base_time);
+ measure(lmedium, "medium list time: ", repeats, base_time);
+ //measure(vbig, "big vector time: ", repeats, base_time);
+ //measure(lbig, "big list time: ", repeats, base_time);
+
+ std::cout
+ << "-------------------------------------------------------------------"
+ << std::endl;
+
+ // Let's see how this looks in assembler
+ test_assembler(vmedium);
+
+ // This is ultimately responsible for preventing all the test code
+ // from being optimized away. Change this to return 0 and you
+ // unplug the whole test's life support system.
+ return test::live_code != 0;
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/timings.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/timings.txt 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,57 @@
+===============================================================================
+Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+Use, modification and distribution is subject to 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)
+===============================================================================
+
+Timing result for sequence_efficiency.cpp comparing the speed of various
+fusion sequences. The test involves accumulating the elements of the
+sequence which is primed to have values 0..N (N=size of sequence). Small,
+medium and big sequences are tested where:
+
+ small = 3 elements
+ medium = 10 elements
+ big = 30 elements
+
+Tester: Joel de Guzman. WinXP, P4-3.0GHZ, 2GB RAM
+
+VC7.1 (flags = /MD /O2 /EHsc /GS)
+
+ small vector time: 1.870000e-006
+ small list time: 1.870000e-006
+ medium vector time: 1.880000e-006
+ medium list time: 3.600000e-006
+ big vector time: 2.030000e-006
+ big list time: 8.910000e-006
+
+VC8.0 (flags = /MD /O2 /EHsc /GS)
+
+ small vector time: 2.500000e-05
+ small list time: 2.500000e-05
+ medium vector time: 7.810000e-05
+ medium list time: 7.810000e-05
+ big vector time: 2.469000e-04
+ big list time: 2.453000e-04
+
+G++ 3.4 (flags = -ftemplate-depth-128 -funroll-loops -O3 -finline-functions -Wno-inline -Wall)
+
+ small vector time: 2.500000e-05
+ small list time: 2.500000e-05
+ medium vector time: 7.970000e-05
+ medium list time: 7.970000e-05
+ big vector time: 2.516000e-04
+ big list time: 2.485000e-04
+
+Intel 9.1 (flags = /MD /O2 /EHsc /GS)
+
+ small vector time: 1.125000e-006
+ small list time: 1.125000e-006
+ medium vector time: 1.125000e-006
+ medium list time: 1.141000e-006
+ big vector time: 1.140000e-006
+ big list time: 1.141000e-006
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/example/performance/zip_efficiency.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/performance/zip_efficiency.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,155 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include "measure.hpp"
+
+//~ #define FUSION_MAX_VECTOR_SIZE 30
+
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <iostream>
+
+#ifdef _MSC_VER
+// inline aggressively
+# pragma inline_recursion(on) // turn on inline recursion
+# pragma inline_depth(255) // max inline depth
+#endif
+
+namespace
+{
+ struct zip_add
+ {
+ template<typename Lhs, typename Rhs>
+ struct result
+ {
+ typedef typename
+ fusion::detail::remove_reference<
+ typename boost::fusion::result_of::value_at_c<Lhs, 0>::type
+ >::type
+ type;
+ };
+
+ template<typename Lhs, typename Rhs>
+ typename result<Lhs, Rhs>::type
+ operator()(const Lhs& lhs, const Rhs& rhs) const
+ {
+ return boost::fusion::at_c<0>(lhs) + boost::fusion::at_c<1>(lhs) + rhs;
+ }
+ };
+
+ // Our Accumulator function
+ template <typename T>
+ struct zip_accumulator
+ {
+ zip_accumulator()
+ : sum()
+ {}
+
+ template <typename Sequence>
+ void operator()(Sequence const& seq)
+ {
+ this->sum += boost::fusion::accumulate(seq, 0, zip_add());
+ }
+
+ T sum;
+ };
+
+ template <typename T>
+ void check(T const& seq, char const* info)
+ {
+ test::measure<zip_accumulator<int> >(seq, 1);
+ std::cout << info << test::live_code << std::endl;
+ }
+
+ template <typename T>
+ void measure(T const& seq, char const* info, long const repeats)
+ {
+ std::cout
+ << info
+ << test::measure<zip_accumulator<int> >(seq, repeats)
+ << std::endl;
+ }
+}
+
+int main()
+{
+ using namespace boost::fusion;
+
+ std::cout.setf(std::ios::scientific);
+
+ vector<
+ int, int, int
+ >
+ vsmall_1(BOOST_PP_ENUM_PARAMS(3,));
+
+ vector<
+ int, int, int
+ >
+ vsmall_2(BOOST_PP_ENUM_PARAMS(3,));
+
+ vector<
+ int, int, int, int, int, int, int, int, int, int
+ >
+ vmedium_1(BOOST_PP_ENUM_PARAMS(10,));
+
+ vector<
+ int, int, int, int, int, int, int, int, int, int
+ >
+ vmedium_2(BOOST_PP_ENUM_PARAMS(10,));
+
+ //~ vector<
+ //~ int, int, int, int, int, int, int, int, int, int
+ //~ , int, int, int, int, int, int, int, int, int, int
+ //~ , int, int, int, int, int, int, int, int, int, int
+ //~ >
+ //~ vbig_1(BOOST_PP_ENUM_PARAMS(30,));
+
+ //~ vector<
+ //~ int, int, int, int, int, int, int, int, int, int
+ //~ , int, int, int, int, int, int, int, int, int, int
+ //~ , int, int, int, int, int, int, int, int, int, int
+ //~ >
+ //~ vbig_2(BOOST_PP_ENUM_PARAMS(30,));
+
+ // first decide how many repetitions to measure
+ long repeats = 100;
+ double measured = 0;
+ while (measured < 2.0 && repeats <= 10000000)
+ {
+ repeats *= 10;
+
+ boost::timer time;
+
+ test::hammer<zip_accumulator<int> >(zip(vsmall_1, vsmall_2), repeats);
+ test::hammer<zip_accumulator<int> >(zip(vmedium_1, vmedium_2), repeats);
+ //~ test::hammer<zip_accumulator<int> >(zip(vbig_1, vbig_2), repeats);
+
+ measured = time.elapsed();
+ }
+
+ check(zip(vsmall_1, vsmall_2),
+ "small zip accumulated result: ");
+ check(zip(vmedium_1, vmedium_2),
+ "medium zip accumulated result: ");
+ //~ check(zip(vbig_1, vbig_2),
+ //~ "big zip accumulated result: ");
+
+ measure(zip(vsmall_1, vsmall_2),
+ "small zip time: ", repeats);
+ measure(zip(vmedium_1, vmedium_2),
+ "medium zip time: ", repeats);
+ //~ measure(zip(vbig_1, vbig_2),
+ //~ "big zip time: ", repeats);
+
+ // This is ultimately responsible for preventing all the test code
+ // from being optimized away. Change this to return 0 and you
+ // unplug the whole test's life support system.
+ return test::live_code != 0;
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/example/test/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/test/Jamfile.v2 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,9 @@
+# Copyright Christopher Schmidt 2009.
+# 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)
+
+project test ;
+
+exe test : [ glob *.cpp ]
+ ;

Added: sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/example/test/main.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,210 @@
+// Copyright Christopher Schmidt 2009.
+// 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)
+
+#include <type_traits>
+#include <utility>
+#include <iostream>
+
+#include <boost/fusion/sequence.hpp>
+#include <boost/fusion/iterator.hpp>
+#include <boost/fusion/algorithm.hpp>
+#include <boost/fusion/container.hpp>
+#include <boost/fusion/view.hpp>
+#include <boost/fusion/adapted.hpp>
+#include <boost/fusion/tuple.hpp>
+#include <boost/fusion/support.hpp>
+#include <boost/fusion/functional.hpp>
+
+#include <boost/mpl/placeholders.hpp>
+
+namespace fusion=boost::fusion;
+
+struct moveable
+{
+ moveable(int){};
+ moveable(moveable&&){}
+ moveable& operator=(moveable&&){return *this;}
+ moveable()=delete;
+ moveable(moveable const&)=delete;
+ moveable& operator=(moveable const&)=delete;
+};
+bool operator==(moveable const&, moveable const&)
+{
+ return true;
+}
+
+template<class... Args>
+struct get_vec_type
+{
+ typedef fusion::vector<Args...> type;
+};
+
+typedef get_vec_type<char,short,int,long,float,double,moveable>::type vec;
+typedef const vec cvec;
+
+typedef vec& lvec;
+typedef vec&& rvec;
+typedef const vec& clvec;
+typedef const vec&& crvec;
+
+template<typename Seq>
+void seq_test(Seq&& seq)
+{
+ using namespace fusion;
+
+ typedef typename detail::identity<Seq>::type id_seq;
+
+ typename result_of::begin<id_seq>::type beg=begin(std::forward<Seq>(seq));
+ typename result_of::begin<const id_seq>::type cbeg=begin(std::forward<Seq>(seq));
+
+ typename result_of::begin<id_seq&>::type beg2=begin(std::forward<Seq>(seq));
+ typename result_of::begin<const id_seq&>::type cbeg2=begin(std::forward<Seq>(seq));
+
+ typename result_of::begin<id_seq&&>::type beg3=begin(std::forward<Seq>(seq));
+ typename result_of::begin<const id_seq&&>::type cbeg3=begin(std::forward<Seq>(seq));
+
+ beg=beg;
+ cbeg=beg;
+
+ beg2=beg2;
+ cbeg2=beg2;
+
+ beg3=beg3;
+ cbeg3=beg3;
+
+ beg=beg2;
+ beg=beg3;
+ cbeg=beg2;
+ cbeg=cbeg2;
+ cbeg=beg3;
+ cbeg=cbeg3;
+
+ beg2=beg;
+ beg2=beg3;
+ cbeg2=beg;
+ cbeg2=cbeg;
+ cbeg2=beg3;
+ cbeg2=cbeg3;
+
+ beg3=beg2;
+ beg3=beg;
+ cbeg3=beg2;
+ cbeg3=cbeg2;
+ cbeg3=beg;
+ cbeg3=cbeg;
+
+ //beg=cbeg2;
+
+ deref(begin(std::forward<Seq>(seq)));
+ advance_c<1>(begin(std::forward<Seq>(seq)));
+ end(std::forward<Seq>(seq));
+}
+
+struct identity_int
+{
+ template<typename>
+ struct result
+ {
+ typedef int type;
+ };
+
+ int operator()(int i)
+ {
+ return i;
+ }
+};
+
+template<class>
+class C;
+
+int main()
+{
+ {
+ using namespace fusion;
+
+ static_assert(std::is_same<traits::tag_of<int>::type,non_fusion_tag>::value,"");
+ static_assert(std::is_same<traits::tag_of<boost::mpl::vector<> >::type,mpl_sequence_tag>::value,"");
+ static_assert(std::is_same<traits::tag_of<boost::mpl::begin<boost::mpl::vector<> >::type>::type,mpl_iterator_tag>::value,"");
+ }
+
+ {
+ using namespace fusion::result_of;
+
+ static_assert(std::is_same<deref<begin<vec>::type>::type,char&>::value,"");
+ static_assert(std::is_same<deref<begin<cvec>::type>::type,const char&>::value,"");
+ static_assert(std::is_same<deref<begin<lvec>::type>::type,char&>::value,"");
+ static_assert(std::is_same<deref<begin<rvec>::type>::type,char>::value,"");
+ static_assert(std::is_same<deref<begin<clvec>::type>::type,const char&>::value,"");
+ //TODO cschmidt: !!!
+ static_assert(std::is_same<deref<begin<crvec>::type>::type,const char>::value,"");
+ }
+
+ {
+ fusion::vector<moveable> v(0);
+ fusion::vector<moveable> v2=std::move(v);
+ //fusion::vector<moveable> v2=v;
+ }
+
+ {
+ using namespace fusion;
+ seq_test(make_vector(0,1));
+ seq_test(make_cons(0,make_cons(1)));
+ seq_test(make_list(0,1));
+ seq_test(make_set(0,1.0f));
+ seq_test(make_map<int,float>(0,1.0f));
+
+ seq_test(single_view<int>(0));
+ seq_test(filter_view<vector<int>&&,std::is_same<boost::mpl::_1,int> >(vector<int>()));
+ vector<int> vec;
+ seq_test(iterator_range<result_of::begin<vector<int>>::type,result_of::end<vector<int>>::type>(begin(vec),end(vec)));
+ seq_test(joint_view<vector<int>&&,vector<int>&&>(vector<int>(),vector<int>()));
+ seq_test(zip_view<vector<vector<int>&&, vector<int>&&> >(vector_tie(vector<int>(),vector<int>())));
+ seq_test(transform_view<vector<int>&&,identity_int>(vector<int>(),identity_int()));
+ seq_test(reverse_view<vector<int>&&>(vector<int>()));
+ }
+}
+
+/*#include <boost/mpl/transform.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/equal.hpp>
+
+#include <utility>
+
+namespace mpl=boost::mpl;
+
+struct my_make_pair {
+ template<typename T1, typename T2>
+ struct apply {
+ typedef std::pair<T1,T2> type;
+ };
+};
+
+
+
+int main(int argc, char *argv[])
+{
+ {
+ typedef mpl::vector<int,long> seq1;
+ typedef mpl::vector<float,double> seq2;
+ typedef mpl::vector<std::pair<int,float>,std::pair<long,double> > pairs;
+
+ typedef mpl::transform<seq1,seq2,my_make_pair>::type result;
+
+ static_assert( mpl::equal<result,pairs>::type::value, "");
+ }
+
+ typedef fusion::vector<int,long> seq1;
+
+ typedef fusion::vector<float,double> seq2;
+ typedef fusion::vector<std::pair<int,float>,std::pair<long,double> >
+pairs;
+
+ typedef mpl::transform<seq1,seq2,my_make_pair>::type result;
+
+ static_assert( mpl::equal<result,pairs>::type::value, "");
+ mpl::push_back<fusion::vector<>,int>::type z;
+
+ return 0;
+}*/

Added: sandbox/SOC/2009/fusion/libs/fusion/module.cmake
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/module.cmake 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1 @@
+boost_module (fusion DEPENDS function_types)
\ No newline at end of file

Added: sandbox/SOC/2009/fusion/libs/fusion/test/CMakeLists.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/CMakeLists.txt 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,29 @@
+#
+# Copyright Troy D. Straszheim
+#
+# Distributed under the Boost Software License, Version 1.0.
+# See http://www.boost.org/LICENSE_1_0.txt
+#
+#----------------------------------------------------------------------------
+# This file was automatically generated from the original CMakeLists.txt file
+# Add a variable to hold the headers for the library
+set (lib_headers
+ fusion
+)
+
+# Add a library target to the build system
+boost_library_project(
+ fusion
+ # SRCDIRS
+ # TESTDIRS
+ HEADERS ${lib_headers}
+ # DOCDIRS
+ DESCRIPTION "Library for working with tuples, including various containers, algorithms, etc."
+ MODULARIZED
+ AUTHORS "Joel de Guzman <joel -at- boost-consulting.com>"
+ "Dan Marsden <danmarsden -at- yahoo.co.uk>"
+ "Tobias Schwinger <tschwinger -at- isonews2.com>"
+ # MAINTAINERS
+)
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/Jamfile 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,114 @@
+##==============================================================================
+# Copyright (c) 2003-2006 Joel de Guzman
+#
+# Use, modification and distribution is subject to 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)
+#==============================================================================
+# bring in rules for testing
+import testing ;
+
+{
+ test-suite fusion :
+
+ [ run algorithm/all.cpp : : : : ]
+ [ run algorithm/any.cpp : : : : ]
+ [ run algorithm/clear.cpp : : : : ]
+ [ run algorithm/count_if.cpp : : : : ]
+ [ run algorithm/count.cpp : : : : ]
+ [ run algorithm/erase_key.cpp : : : : ]
+ [ run algorithm/erase.cpp : : : : ]
+ [ run algorithm/filter_if.cpp : : : : ]
+ [ run algorithm/filter.cpp : : : : ]
+ [ run algorithm/find_if.cpp : : : : ]
+ [ run algorithm/find.cpp : : : : ]
+ [ run algorithm/fold.cpp : : : : ]
+ [ run algorithm/for_each.cpp : : : : ]
+ [ run algorithm/insert_range.cpp : : : : ]
+ [ run algorithm/insert.cpp : : : : ]
+ [ run algorithm/join.cpp : : : : ]
+ [ run algorithm/none.cpp : : : : ]
+ [ run algorithm/pop_back.cpp : : : : ]
+ [ run algorithm/pop_front.cpp : : : : ]
+ [ run algorithm/push_back.cpp : : : : ]
+ [ run algorithm/push_front.cpp : : : : ]
+ [ run algorithm/remove_if.cpp : : : : ]
+ [ run algorithm/remove.cpp : : : : ]
+ [ run algorithm/replace_if.cpp : : : : ]
+ [ run algorithm/replace.cpp : : : : ]
+ [ run algorithm/reverse.cpp : : : : ]
+ [ run algorithm/transform.cpp : : : : ]
+ [ run algorithm/zip_ignore.cpp : : : : ]
+ [ run algorithm/zip.cpp : : : : ]
+ [ run algorithm/zip2.cpp : : : : ]
+
+ [ run sequence/adapt_struct.cpp : : : : ]
+ [ run sequence/adapt_assoc_struct.cpp : : : : ]
+ [ run sequence/array.cpp : : : : ]
+ [ run sequence/as_list.cpp : : : : ]
+ [ run sequence/as_map.cpp : : : : ]
+ [ run sequence/as_set.cpp : : : : ]
+ [ run sequence/as_vector.cpp : : : : ]
+ [ run sequence/boost_tuple.cpp : : : : ]
+ [ run sequence/cons.cpp : : : : ]
+ [ run sequence/deduce_sequence.cpp : : : : ]
+ [ run sequence/filter_view.cpp : : : : ]
+ [ run sequence/io.cpp : : : : ]
+ [ run sequence/iterator_range.cpp : : : : ]
+ [ run sequence/joint_view.cpp : : : : ]
+ [ run sequence/list_comparison.cpp : : : : ]
+ [ run sequence/list_construction.cpp : : : : ]
+ [ run sequence/list_copy.cpp : : : : ]
+ [ run sequence/list_iterator.cpp : : : : ]
+ [ run sequence/list_make.cpp : : : : ]
+ [ run sequence/list_misc.cpp : : : : ]
+ [ run sequence/list_mutate.cpp : : : : ]
+ [ run sequence/list_tie.cpp : : : : ]
+ [ run sequence/map_tie.cpp : : : : ]
+ [ run sequence/map.cpp : : : : ]
+ [ run sequence/reverse_view.cpp : : : : ]
+ [ run sequence/set.cpp : : : : ]
+ [ run sequence/single_view.cpp : : : : ]
+ [ run sequence/std_pair.cpp : : : : ]
+ [ run sequence/swap.cpp : : : : ]
+ [ run sequence/tr1_tuple_auto_conv.cpp : : : : ]
+ [ run sequence/transform_view.cpp : : : : ]
+ [ run sequence/tuple_comparison.cpp : : : : ]
+ [ run sequence/tuple_construction.cpp : : : : ]
+ [ run sequence/tuple_copy.cpp : : : : ]
+ [ run sequence/tuple_element.cpp : : : : ]
+ [ run sequence/tuple_make.cpp : : : : ]
+ [ run sequence/tuple_misc.cpp : : : : ]
+ [ run sequence/tuple_mutate.cpp : : : : ]
+ [ run sequence/tuple_tie.cpp : : : : ]
+ [ run sequence/vector_comparison.cpp : : : : ]
+ [ run sequence/vector_construction.cpp : : : : ]
+ [ run sequence/vector_copy.cpp : : : : ]
+ [ run sequence/vector_iterator.cpp : : : : ]
+ [ run sequence/vector_make.cpp : : : : ]
+ [ run sequence/vector_misc.cpp : : : : ]
+ [ run sequence/vector_mutate.cpp : : : : ]
+ [ run sequence/vector_n.cpp : : : : ]
+ [ run sequence/vector_tie.cpp : : : : ]
+ [ run sequence/vector_value_at.cpp : : : : ]
+ [ run sequence/zip_view_ignore.cpp : : : : ]
+ [ run sequence/zip_view.cpp : : : : ]
+ [ run sequence/zip_view2.cpp : : : : ]
+
+ [ run functional/fused_function_object.cpp : : : : ]
+ [ run functional/fused_procedure.cpp : : : : ]
+ [ run functional/fused.cpp : : : : ]
+ [ run functional/invoke_function_object.cpp : : : : ]
+ [ run functional/invoke_procedure.cpp : : : : ]
+ [ run functional/invoke.cpp : : : : ]
+ [ run functional/make_fused_function_object.cpp : : : : ]
+ [ run functional/make_fused_procedure.cpp : : : : ]
+ [ run functional/make_fused.cpp : : : : ]
+ [ run functional/make_unfused.cpp : : : : ]
+ [ run functional/unfused_typed.cpp : : : : ]
+ [ run functional/unfused.cpp : : : : ]
+
+# [ compile-fail xxx.cpp : : : : ]
+
+ ;
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/all.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/all.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,58 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/algorithm/query/all.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+namespace
+{
+ struct search_for
+ {
+ explicit search_for(int search)
+ : search(search)
+ {}
+
+ template<typename T>
+ bool operator()(T const& v) const
+ {
+ return v == search;
+ }
+
+ int search;
+ };
+}
+
+int
+main()
+{
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 < 4)));
+ BOOST_TEST((boost::fusion::all(t, boost::lambda::_1 > 0)));
+ }
+
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST((!boost::fusion::all(t, boost::lambda::_1 == 1)));
+ BOOST_TEST((!boost::fusion::all(t, boost::lambda::_1 < 3)));
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1> mpl_vec;
+ // We cannot use lambda here as mpl vec iterators return
+ // rvalues, and lambda needs lvalues.
+ BOOST_TEST(boost::fusion::all(mpl_vec(), search_for(1)));
+ BOOST_TEST(!boost::fusion::all(mpl_vec(), search_for(2)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/any.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/any.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,57 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+ Copyright (c) Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/algorithm/query/any.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+namespace
+{
+ struct search_for
+ {
+ explicit search_for(int search)
+ : search(search)
+ {}
+
+ template<typename T>
+ bool operator()(T const& v) const
+ {
+ return v == search;
+ }
+
+ int search;
+ };
+}
+
+int
+main()
+{
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST(boost::fusion::any(t, boost::lambda::_1 == 2));
+ }
+
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST(!boost::fusion::any(t, boost::lambda::_1 == 3));
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 3> mpl_vec;
+ // We cannot use lambda here as mpl vec iterators return
+ // rvalues, and lambda needs lvalues.
+ BOOST_TEST(boost::fusion::any(mpl_vec(), search_for(2)));
+ BOOST_TEST(!boost::fusion::any(mpl_vec(), search_for(4)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/clear.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/clear.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,44 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/clear.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, s);
+
+ {
+ std::cout << clear(t1) << std::endl;
+ BOOST_TEST((clear(t1) == make_vector()));
+ }
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec;
+ std::cout << boost::fusion::clear(mpl_vec()) << std::endl;
+ BOOST_TEST((boost::fusion::clear(mpl_vec()) == make_vector()));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/count.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/count.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,41 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/algorithm/query/count.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <string>
+
+int
+main()
+{
+ {
+ boost::fusion::vector<int, short, double> t(1, 1, 1);
+ BOOST_TEST(boost::fusion::count(t, 1) == 3);
+ }
+
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST(boost::fusion::count(t, 3) == 0);
+ }
+
+ {
+ boost::fusion::vector<int, std::string, double> t(4, "hello", 4);
+ BOOST_TEST(boost::fusion::count(t, "hello") == 1);
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 2, 2, 3, 3> mpl_vec;
+ BOOST_TEST(boost::fusion::count(mpl_vec(), 2) == 3);
+ BOOST_TEST(boost::fusion::count(mpl_vec(), 3) == 2);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/count_if.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/count_if.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,38 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/algorithm/query/count_if.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <functional>
+
+int
+main()
+{
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST(boost::fusion::count_if(t, boost::lambda::_1 == 2) == 1);
+ }
+
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST(boost::fusion::count_if(t, boost::lambda::_1 == 3) == 0);
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 3> mpl_vec;
+ // Cannot use lambda here as mpl iterators return rvalues and lambda needs lvalues
+ BOOST_TEST(boost::fusion::count_if(mpl_vec(), std::bind2nd(std::less_equal<int>(), 2)) == 2);
+ BOOST_TEST(boost::fusion::count_if(mpl_vec(), std::bind2nd(std::greater<int>(), 2)) == 1);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/erase.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/erase.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/erase.hpp>
+
+#include <boost/mpl/vector_c.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/static_assert.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::vector_c;
+ using boost::mpl::begin;
+ using boost::mpl::advance;
+ using boost::mpl::int_;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing erase
+
+ {
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, "Ruby");
+ typedef
+ result_of::advance_c<result_of::begin<vector_type>::type,2>::type
+ it;
+ it pos(advance_c<2>(boost::fusion::begin(t1)));
+
+ std::cout << erase(t1, pos) << std::endl;
+ BOOST_TEST((erase(t1, pos) == make_vector(1, 'x', std::string("Ruby"))));
+ BOOST_TEST((erase(t1, end(t1)) == make_vector(1, 'x', 3.3, std::string("Ruby"))));
+ }
+
+ {
+ typedef vector_c<int, 1, 2, 3, 4, 5> mpl_vec;
+ typedef boost::mpl::begin<mpl_vec>::type mpl_vec_begin;
+ typedef boost::mpl::advance<mpl_vec_begin, int_<3> >::type mpl_vec_at3;
+ typedef boost::mpl::next<mpl_vec_begin>::type n1;
+ typedef boost::mpl::next<n1>::type n2;
+ typedef boost::mpl::next<n2>::type n3;
+
+ BOOST_STATIC_ASSERT((boost::is_same<mpl_vec_at3, n3>::value));
+
+ std::cout << erase(mpl_vec(), mpl_vec_at3()) << std::endl;
+ BOOST_TEST((erase(mpl_vec(), mpl_vec_at3())
+ == make_vector(1, 2, 3, 5)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/erase_key.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/erase_key.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,75 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/container/generation/make_set.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/container/generation/make_map.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/container/set/convert.hpp>
+#include <boost/fusion/container/map/convert.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/static_assert.hpp>
+#include <iostream>
+#include <string>
+
+template <typename Set>
+void test_set(Set const& set)
+{
+ using namespace boost::fusion;
+ std::cout << set << std::endl;
+
+ BOOST_STATIC_ASSERT(result_of::size<Set>::value == 3);
+ BOOST_TEST((*find<int>(set) == 1));
+ BOOST_TEST((*find<double>(set) == 1.5));
+ BOOST_TEST((*find<std::string>(set) == "hello"));
+}
+
+typedef boost::mpl::int_<1> _1;
+typedef boost::mpl::int_<2> _2;
+typedef boost::mpl::int_<3> _3;
+typedef boost::mpl::int_<4> _4;
+
+template <typename Map>
+void test_map(Map const& map)
+{
+ using namespace boost::fusion;
+ std::cout << map << std::endl;
+
+ BOOST_STATIC_ASSERT(result_of::size<Map>::value == 3);
+ //TODO!!!
+ //BOOST_TEST(((*find<_1>(map)).second == 1));
+ //BOOST_TEST(((*find<_3>(map)).second == 1.5));
+ //BOOST_TEST(((*find<_4>(map)).second == std::string("hello")));
+}
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+ using boost::fusion::pair;
+ using boost::fusion::make_pair;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ test_set(erase_key<char>(make_set(1, 'x', 1.5, std::string("hello"))));
+ test_map(erase_key<_2>(make_map<_1, _2, _3, _4>(1, 'x', 1.5, "hello")));
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/filter.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/filter.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,43 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/algorithm/transformation/filter.hpp>
+#include <boost/mpl/vector.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ typedef boost::fusion::vector<char,double,char> vector_type;
+ vector_type t('a', 6.6, 'b');
+
+ {
+ std::cout << filter<char>(t) << std::endl;
+ BOOST_TEST((filter<char>(t)
+ == make_vector('a', 'b')));
+ }
+
+ {
+ typedef boost::mpl::vector<char,double,char> mpl_vec;
+ BOOST_TEST((filter<char>(mpl_vec())
+ == make_vector('\0', '\0')));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/filter_if.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/filter_if.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,77 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/algorithm/transformation/filter_if.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/not.hpp>
+
+struct X
+{
+ operator char const*() const
+ {
+ return "<X-object>";
+ }
+};
+
+struct Y
+{
+ operator char const*() const
+ {
+ return "<Y-object>";
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ using boost::mpl::_;
+ using boost::mpl::not_;
+ using boost::is_class;
+ using boost::is_same;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing filter_if
+
+ X x; Y y;
+ typedef boost::fusion::vector<Y, char, long, X, bool, double> vector_type;
+ vector_type t(y, '@', 987654, x, true, 6.6);
+
+ {
+ std::cout << filter_if<not_<is_class<_> > >(t) << std::endl;
+ BOOST_TEST((filter_if<not_<is_class<_> > >(t)
+ == make_vector('@', 987654, true, 6.6)));
+ }
+
+ {
+ std::cout << filter_if<is_class<_> >(t) << std::endl;
+ BOOST_TEST((filter_if<is_class<_> >(t)
+ == make_vector(y, x)));
+ }
+
+ {
+ typedef boost::mpl::vector<Y, char, long, X, bool> mpl_vec;
+ BOOST_TEST((filter_if<not_<is_class<_> > >(mpl_vec())
+ == make_vector(char(), long(), bool())));
+ BOOST_TEST((filter_if<is_class<_> >(mpl_vec())
+ == make_vector(y, x)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/find.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/find.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,81 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/algorithm/query/find.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/mpl/vector.hpp>
+#include <string>
+
+struct X
+{
+ operator int() const
+ {
+ return 12345;
+ }
+};
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::identity;
+
+ {
+ typedef vector<int, char, int, double> seq_type;
+ seq_type seq(12345, 'x', 678910, 3.36);
+
+ std::cout << *boost::fusion::find<char>(seq) << std::endl;
+ BOOST_TEST(*boost::fusion::find<char>(seq) == 'x');
+
+ std::cout << *boost::fusion::find<int>(seq) << std::endl;
+ BOOST_TEST(*boost::fusion::find<int>(seq) == 12345);
+
+ std::cout << *boost::fusion::find<double>(seq) << std::endl;
+ BOOST_TEST(*boost::fusion::find<double>(seq) == 3.36);
+
+ BOOST_TEST(boost::fusion::find<bool>(seq) == boost::fusion::end(seq));
+ }
+
+ {
+ typedef set<int, char, double> seq_type;
+ seq_type seq(12345, 'x', 3.36);
+ std::cout << *boost::fusion::find<char>(seq) << std::endl;
+ BOOST_TEST(*boost::fusion::find<char>(seq) == 'x');
+ BOOST_TEST(boost::fusion::find<bool>(seq) == boost::fusion::end(seq));
+ }
+
+ {
+ typedef map<
+ pair<int, char>
+ , pair<double, std::string> >
+ map_type;
+
+ map_type seq(
+ make_pair<int>('X')
+ , make_pair<double>("Men"));
+
+ //TODO!!!
+ //std::cout << *boost::fusion::find<int>(seq) << std::endl;
+ //std::cout << *boost::fusion::find<double>(seq) << std::endl;
+ //BOOST_TEST((*boost::fusion::find<int>(seq)).second == 'X');
+ //BOOST_TEST((*boost::fusion::find<double>(seq)).second == "Men");
+ //BOOST_TEST(boost::fusion::find<bool>(seq) == boost::fusion::end(seq));
+ }
+
+ {
+ typedef boost::mpl::vector<int, char, X, double> mpl_vec;
+ BOOST_TEST((*boost::fusion::find<X>(mpl_vec()) == 12345));
+ BOOST_TEST(boost::fusion::find<bool>(mpl_vec()) == boost::fusion::end(mpl_vec()));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/find_if.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/find_if.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,69 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/algorithm/query/find_if.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+struct X
+{
+ operator int() const
+ {
+ return 12345;
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ {
+ using boost::is_same;
+ using boost::mpl::_;
+
+ typedef vector<int, char, int, double> vector_type;
+ vector_type v(12345, 'x', 678910, 3.36);
+
+ std::cout << *find_if<is_same<_, char> >(v) << std::endl;
+ BOOST_TEST((*find_if<is_same<_, char> >(v) == 'x'));
+
+ std::cout << *find_if<is_same<_, int> >(v) << std::endl;
+ BOOST_TEST((*find_if<is_same<_, int> >(v) == 12345));
+
+ std::cout << *find_if<is_same<_, double> >(v) << std::endl;
+ BOOST_TEST((*find_if<is_same<_, double> >(v) == 3.36));
+ }
+
+ {
+ using boost::mpl::vector;
+ using boost::is_same;
+ using boost::mpl::_;
+
+ typedef vector<int, char, X, double> mpl_vec;
+ BOOST_TEST((*boost::fusion::find_if<is_same<_, X> >(mpl_vec()) == 12345));
+ }
+
+ {
+ using boost::mpl::vector_c;
+ using boost::mpl::less;
+ using boost::mpl::int_;
+ using boost::is_same;
+ using boost::mpl::_;
+
+ typedef vector_c<int, 1, 2, 3, 4> mpl_vec;
+ BOOST_TEST((*boost::fusion::find_if<less<_, int_<3> > >(mpl_vec()) == 1));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/fold.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,226 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+#include <boost/fusion/algorithm/iteration/accumulate.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/vector.hpp>
+
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+#include <string>
+
+using boost::mpl::if_;
+using boost::mpl::int_;
+using boost::is_same;
+
+struct add_ints_only
+{
+ template<typename T>
+ struct result;
+
+ template <typename Self,typename T, typename State>
+ struct result<Self(T,State)>
+ {
+ //TODO cschmidt: remove_reference does not support rvalue refs yet,
+ //therefore we use the internal function of fusion!
+ typedef typename boost::fusion::detail::identity<State>::type type;
+ //typedef typename boost::remove_const<
+ // typename boost::remove_reference<State>::type>::type type;
+ };
+
+ template <typename T, typename State>
+ State const&
+ operator()(T const& x, State const& state) const
+ {
+ return state;
+ }
+
+ int
+ operator()(int x, int state) const
+ {
+ return x + state;
+ }
+};
+
+struct count_ints
+{
+ template<typename T>
+ struct result;
+
+ template <typename Self,typename T, typename CountT>
+ struct result<Self(T,CountT)>
+ {
+ typedef typename boost::fusion::detail::identity<T>::type elem;
+ typedef typename boost::fusion::detail::identity<CountT>::type state;
+ //typedef typename boost::remove_const<
+ // typename boost::remove_reference<T>::type>::type elem;
+ //typedef typename boost::remove_const<
+ // typename boost::remove_reference<CountT>::type>::type state;
+
+ typedef typename
+ if_<
+ is_same<elem, int>
+ , typename boost::mpl::next<state>::type
+ , state
+ >::type
+ type;
+ };
+
+ template <typename T, typename CountT>
+ typename result<count_ints(T, CountT)>::type
+ operator()(T const&, CountT const&) const
+ {
+ typedef typename result<count_ints(T, CountT)>::type result;
+ return result();
+ }
+};
+
+struct appender
+{
+ typedef std::string result_type;
+
+ std::string operator()(char c, std::string const& str) const
+ {
+ return str + c;
+ }
+};
+
+struct lvalue_adder
+{
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename T0, typename T1>
+ struct result<Self(T0&, T1)>
+ {
+ typedef T0 type;
+ };
+
+ template<typename T0, typename T1>
+ T0 operator()(T0& lhs, T1 const& rhs) const
+ {
+ return lhs + rhs;
+ }
+};
+
+int add(int lhs, int rhs)
+{
+ return lhs + rhs;
+}
+
+int
+main()
+{
+ using namespace boost::fusion;
+ namespace fusion = boost::fusion;
+
+ {
+ typedef vector<int, char, int, double> vector_type;
+ vector_type v(12345, 'x', 678910, 3.36);
+ int result = fold(v, 0, add_ints_only());
+ std::cout << result << std::endl;
+ BOOST_TEST(result == 12345+678910);
+ }
+
+ {
+ typedef vector<int> vector_type;
+ vector_type v(12345);
+
+ int n = fusion::fold(v, int_<0>(), count_ints());
+ std::cout << n << std::endl;
+ BOOST_TEST(n == 1);
+ }
+
+ {
+ typedef vector<int, char, int, double, int> vector_type;
+ vector_type v(12345, 'x', 678910, 3.36, 8756);
+
+ int n = fusion::fold(v, int_<0>(), count_ints());
+ std::cout << n << std::endl;
+ BOOST_TEST(n == 3);
+ }
+
+ {
+ typedef boost::mpl::vector<int, char, int, double, int> mpl_vec;
+ int n = fusion::fold(mpl_vec(), int_<0>(), count_ints());
+ std::cout << n << std::endl;
+ BOOST_TEST(n == 3);
+ }
+
+ {
+ BOOST_TEST(fusion::fold(fusion::make_vector('a','b','c','d','e'), std::string(""), appender())
+ == "abcde");
+ }
+
+ {
+ vector<int, int> vec(1,2);
+ BOOST_TEST(fusion::fold(vec, 0, lvalue_adder()) == 3);
+ }
+
+ {
+ vector<int, int> vec(1,2);
+ BOOST_TEST(fusion::fold(vec, 0, add) == 3);
+ }
+
+ {
+ typedef vector<int, char, int, double> vector_type;
+ vector_type v(12345, 'x', 678910, 3.36);
+ int result = accumulate(v, 0, add_ints_only());
+ std::cout << result << std::endl;
+ BOOST_TEST(result == 12345+678910);
+ }
+
+ {
+ typedef vector<int> vector_type;
+ vector_type v(12345);
+
+ int n = fusion::accumulate(v, int_<0>(), count_ints());
+ std::cout << n << std::endl;
+ BOOST_TEST(n == 1);
+ }
+
+ {
+ typedef vector<int, char, int, double, int> vector_type;
+ vector_type v(12345, 'x', 678910, 3.36, 8756);
+
+ int n = fusion::accumulate(v, int_<0>(), count_ints());
+ std::cout << n << std::endl;
+ BOOST_TEST(n == 3);
+ }
+
+ {
+ typedef boost::mpl::vector<int, char, int, double, int> mpl_vec;
+ int n = fusion::accumulate(mpl_vec(), int_<0>(), count_ints());
+ std::cout << n << std::endl;
+ BOOST_TEST(n == 3);
+ }
+
+ {
+ BOOST_TEST(fusion::accumulate(fusion::make_vector('a','b','c','d','e'), std::string(""), appender())
+ == "abcde");
+ }
+
+ {
+ vector<int, int> vec(1,2);
+ BOOST_TEST(fusion::accumulate(vec, 0, add) == 3);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/for_each.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/for_each.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+struct print
+{
+ template <typename T>
+ void operator()(T const& v) const
+ {
+ std::cout << "[ " << v << " ] ";
+ }
+};
+
+struct increment
+{
+ template <typename T>
+ void operator()(T& v) const
+ {
+ ++v;
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::vector_c;
+ namespace fusion = boost::fusion;
+
+ {
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type v(1, 'x', 3.3, "Ruby");
+ for_each(v, print());
+ std::cout << std::endl;
+ }
+
+ {
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type v(1, 'x', 3.3, "Ruby");
+ for_each(v, increment());
+ std::cout << v << std::endl;
+ }
+
+ {
+ typedef vector_c<int, 2, 3, 4, 5, 6> mpl_vec;
+ fusion::for_each(mpl_vec(), print());
+ std::cout << std::endl;
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/insert.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/insert.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,70 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/insert.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/int.hpp>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::vector_c;
+ using boost::mpl::advance;
+ using boost::mpl::int_;
+ namespace fusion = boost::fusion;
+ namespace mpl = boost::mpl;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing insert
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, s);
+ typedef
+ result_of::advance_c<result_of::begin<vector_type>::type,2>::type
+ it;
+ it pos(advance_c<2>(boost::fusion::begin(t1)));
+
+ std::cout << insert(t1, pos, 123456) << std::endl;
+ BOOST_TEST((insert(t1, pos, 123456)
+ == make_vector(1, 'x', 123456, 3.3, s)));
+
+ std::cout << insert(t1, end(t1), 123456) << std::endl;
+ BOOST_TEST((insert(t1, end(t1), 123456)
+ == make_vector(1, 'x', 3.3, s, 123456)));
+
+ std::cout << insert(t1, begin(t1), "glad") << std::endl;
+ BOOST_TEST((insert(t1, begin(t1), "glad")
+ == make_vector(std::string("glad"), 1, 'x', 3.3, s)));
+ }
+
+ {
+ typedef vector_c<int, 1, 2, 3, 4, 5> mpl_vec;
+ typedef mpl::begin<mpl_vec>::type mpl_vec_begin;
+ typedef advance<mpl_vec_begin, int_<3> >::type mpl_vec_at3;
+
+ std::cout << fusion::insert(mpl_vec(), mpl_vec_at3(), int_<66>()) << std::endl;
+ BOOST_TEST((fusion::insert(mpl_vec(), mpl_vec_at3(), int_<66>())
+ == make_vector(1, 2, 3, 66, 4, 5)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/insert_range.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/insert_range.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,74 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/insert_range.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <boost/mpl/begin_end.hpp>
+#include <boost/mpl/advance.hpp>
+#include <boost/mpl/int.hpp>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::vector_c;
+ using boost::mpl::advance;
+ using boost::mpl::int_;
+ namespace fusion = boost::fusion;
+ namespace mpl = boost::mpl;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing insert_range
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, s);
+ typedef
+ result_of::advance_c<result_of::begin<vector_type>::type,2>::type
+ it;
+ it pos(advance_c<2>(boost::fusion::begin(t1)));
+
+ typedef vector<int, char> vector_type2;
+ vector_type2 t2(999, 'z');
+
+ std::cout << insert_range(t1, pos, t2) << std::endl;
+ BOOST_TEST((insert_range(t1, pos, t2)
+ == make_vector(1, 'x', 999, 'z', 3.3, s)));
+
+ std::cout << insert_range(t1, end(t1), t2) << std::endl;
+ BOOST_TEST((insert_range(t1, end(t1), t2)
+ == make_vector(1, 'x', 3.3, s, 999, 'z')));
+
+ std::cout << insert_range(t1, begin(t1), t2) << std::endl;
+ BOOST_TEST((insert_range(t1, begin(t1), t2)
+ == make_vector(999, 'z', 1, 'x', 3.3, s)));
+ }
+
+ {
+ typedef vector_c<int, 1, 2, 3, 4, 5> mpl_vec;
+ typedef mpl::begin<mpl_vec>::type mpl_vec_begin;
+ typedef advance<mpl_vec_begin, int_<3> >::type mpl_vec_at3;
+ typedef vector_c<int, -1, -2> mpl_vec2;
+
+ std::cout << fusion::insert_range(mpl_vec(), mpl_vec_at3(), mpl_vec2()) << std::endl;
+ BOOST_TEST((fusion::insert_range(mpl_vec(), mpl_vec_at3(), mpl_vec2())
+ == make_vector(1, 2, 3, -1, -2, 4, 5)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/join.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/join.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/algorithm/transformation/join.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/mpl/vector/vector10_c.hpp>
+
+int main()
+{
+ using namespace boost::fusion;
+ {
+ BOOST_TEST(join(make_vector(1,2), make_vector('a','b')) == make_vector(1,2,'a','b'));
+ }
+ {
+ typedef boost::mpl::vector2_c<int,1,2> vec1;
+ typedef boost::mpl::vector2_c<int,3,4> vec2;
+ BOOST_TEST(join(vec1(), vec2()) == make_vector(1,2,3,4));
+
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/none.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/none.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,58 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/algorithm/query/none.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+namespace
+{
+ struct search_for
+ {
+ explicit search_for(int search)
+ : search(search)
+ {}
+
+ template<typename T>
+ bool operator()(T const& v) const
+ {
+ return v == search;
+ }
+
+ int search;
+ };
+}
+
+int
+main()
+{
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST((boost::fusion::none(t, boost::lambda::_1 > 4)));
+ BOOST_TEST((boost::fusion::none(t, boost::lambda::_1 < 0)));
+ }
+
+ {
+ boost::fusion::vector<int, short, double> t(1, 2, 3.3);
+ BOOST_TEST((!boost::fusion::none(t, boost::lambda::_1 == 1)));
+ BOOST_TEST((!boost::fusion::none(t, boost::lambda::_1 < 3)));
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 3> mpl_vec;
+ // We cannot use lambda here as mpl vec iterators return
+ // rvalues, and lambda needs lvalues.
+ BOOST_TEST(boost::fusion::none(mpl_vec(), search_for(4)));
+ BOOST_TEST(!boost::fusion::none(mpl_vec(), search_for(3)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/pop_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/pop_back.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/pop_back.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing pop_back
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, s);
+
+ {
+ std::cout << pop_back(t1) << std::endl;
+ BOOST_TEST((pop_back(t1) == make_vector(1, 'x', 3.3)));
+ }
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec;
+ std::cout << boost::fusion::pop_back(mpl_vec()) << std::endl;
+ BOOST_TEST((boost::fusion::pop_back(mpl_vec()) == make_vector(1, 2, 3, 4)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/pop_front.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/pop_front.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,46 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/pop_front.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing pop_front
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, s);
+
+ {
+ std::cout << pop_front(t1) << std::endl;
+ BOOST_TEST((pop_front(t1) == make_vector('x', 3.3, s)));
+ }
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec;
+ std::cout << boost::fusion::pop_front(mpl_vec()) << std::endl;
+ BOOST_TEST((boost::fusion::pop_front(mpl_vec()) == make_vector(2, 3, 4, 5)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/push_back.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/push_back.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,72 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <string>
+
+struct plus_one
+{
+ template <typename T>
+ void operator()(T& v) const
+ {
+ v += 1;
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing push_back
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, s);
+
+ {
+ std::cout << push_back(t1, 123456) << std::endl;
+ BOOST_TEST((push_back(t1, 123456)
+ == make_vector(1, 'x', 3.3, s, 123456)));
+ }
+
+ {
+ std::cout << push_back(t1, "funny") << std::endl;
+ BOOST_TEST((push_back(t1, "funny")
+ == make_vector(1, 'x', 3.3, s, std::string("funny"))));
+ }
+
+ {
+ std::cout << push_back(t1, t1) << std::endl;
+ BOOST_TEST((push_back(t1, t1)
+ == make_vector(1, 'x', 3.3, s, t1)));
+ }
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 1, 2, 3, 4, 5> mpl_vec;
+ std::cout << boost::fusion::push_back(mpl_vec(), boost::mpl::int_<6>()) << std::endl;
+ BOOST_TEST((boost::fusion::push_back(mpl_vec(), boost::mpl::int_<6>())
+ == make_vector(1, 2, 3, 4, 5, 6)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/push_front.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/push_front.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,55 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/push_front.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing push_front
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t1(1, 'x', 3.3, s);
+
+ {
+ std::cout << push_front(t1, 123456) << std::endl;
+ BOOST_TEST((push_front(t1, 123456)
+ == make_vector(123456, 1, 'x', 3.3, s)));
+ }
+
+ {
+ std::cout << push_front(t1, "lively") << std::endl;
+ BOOST_TEST((push_front(t1, "lively")
+ == make_vector(std::string("lively"), 1, 'x', 3.3, s)));
+ }
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 2, 3, 4, 5, 6> mpl_vec;
+ std::cout << boost::fusion::push_front(mpl_vec(), boost::mpl::int_<1>()) << std::endl;
+ BOOST_TEST((boost::fusion::push_front(mpl_vec(), boost::mpl::int_<1>())
+ == make_vector(1, 2, 3, 4, 5, 6)));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/remove.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/remove.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,80 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/algorithm/transformation/remove.hpp>
+#include <boost/mpl/vector.hpp>
+
+struct X
+{
+ operator char const*() const
+ {
+ return "<X-object>";
+ }
+};
+
+struct Y
+{
+ operator char const*() const
+ {
+ return "<Y-object>";
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::identity;
+ using boost::mpl::vector;
+ namespace fusion = boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing remove
+
+ X x; Y y;
+ typedef fusion::vector<Y, char, long, X, bool, double> vector_type;
+ vector_type t(y, '@', 987654, x, true, 6.6);
+
+ {
+ std::cout << fusion::remove<X>(t) << std::endl;
+ BOOST_TEST((fusion::remove<X>(t)
+ == make_vector(y, '@', 987654, true, 6.6)));
+ }
+
+ {
+ std::cout << fusion::remove<Y>(t) << std::endl;
+ BOOST_TEST((fusion::remove<Y>(t)
+ == make_vector('@', 987654, x, true, 6.6)));
+ }
+
+ {
+ std::cout << fusion::remove<long>(t) << std::endl;
+ BOOST_TEST((fusion::remove<long>(t)
+ == make_vector(y, '@', x, true, 6.6)));
+ }
+
+ {
+ typedef vector<Y, char, long, X, bool> mpl_vec;
+ BOOST_TEST((fusion::remove<X>(mpl_vec())
+ == vector<Y, char, long, bool>()));
+ BOOST_TEST((fusion::remove<Y>(mpl_vec())
+ == vector<char, long, X, bool>()));
+ BOOST_TEST((fusion::remove<long>(mpl_vec())
+ == vector<Y, char, X, bool>()));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/remove_if.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/remove_if.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,78 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/algorithm/transformation/remove_if.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/vector.hpp>
+
+struct X
+{
+ operator char const*() const
+ {
+ return "<X-object>";
+ }
+};
+
+struct Y
+{
+ operator char const*() const
+ {
+ return "<Y-object>";
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::vector;
+ using boost::mpl::_;
+ using boost::mpl::not_;
+ using boost::is_class;
+ using boost::is_same;
+ namespace fusion = boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing remove_if
+
+ X x; Y y;
+ typedef fusion::vector<Y, char, long, X, bool, double> vector_type;
+ vector_type t(y, '@', 987654, x, true, 6.6);
+
+ {
+ std::cout << remove_if<not_<is_class<_> > >(t) << std::endl;
+ BOOST_TEST((remove_if<not_<is_class<_> > >(t)
+ == make_vector(y, x)));
+ }
+
+ {
+ std::cout << remove_if<is_class<_> >(t) << std::endl;
+ BOOST_TEST((remove_if<is_class<_> >(t)
+ == make_vector('@', 987654, true, 6.6)));
+ }
+
+ {
+ typedef vector<Y, char, long, X, bool> mpl_vec;
+ BOOST_TEST((remove_if<not_<is_class<_> > >(mpl_vec())
+ == vector<Y, X>()));
+ BOOST_TEST((remove_if<is_class<_> >(mpl_vec())
+ == vector<char, long, bool>()));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/replace.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/replace.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,49 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/replace.hpp>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing replace
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, long, char const*> vector_type;
+ vector_type t1(1, 'x', 3, s);
+
+ {
+ std::cout << replace(t1, 'x', 'y') << std::endl;
+ BOOST_TEST((replace(t1, 'x', 'y')
+ == make_vector(1, 'y', 3, s)));
+ }
+
+ {
+ char const* s2 = "funny";
+ std::cout << replace(t1, s, s2) << std::endl;
+ BOOST_TEST((replace(t1, s, s2)
+ == make_vector(1, 'x', 3, s2)));
+ }
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/replace_if.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/replace_if.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/algorithm/transformation/replace_if.hpp>
+#include <string>
+
+struct gt3
+{
+ template <typename T>
+ bool operator()(T x) const
+ {
+ return x > 3;
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing replace
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, short, double, long, char const*, float> vector_type;
+ vector_type t1(1, 2, 3.3, 4, s, 5.5);
+
+ {
+ std::cout << replace_if(t1, gt3(), -456) << std::endl;
+ //TODO!!!
+ //BOOST_TEST((replace_if(t1, gt3(), -456)
+ // == make_vector(1, 2, -456, -456, s, -456)));
+ }
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/reverse.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/reverse.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,49 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/algorithm/transformation/reverse.hpp>
+#include <boost/mpl/range_c.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing the reverse_view
+
+ {
+ typedef boost::mpl::range_c<int, 5, 9> mpl_list1;
+ mpl_list1 sequence;
+
+ std::cout << reverse(sequence) << std::endl;
+ BOOST_TEST((reverse(sequence) == make_vector(8, 7, 6, 5)));
+ }
+
+ {
+ char const* s = "Hi Kim";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type t(123, 'x', 3.36, s);
+
+ std::cout << reverse(t) << std::endl;
+ BOOST_TEST((reverse(t) == make_vector(s, 3.36, 'x', 123)));
+ std::cout << reverse(reverse(t)) << std::endl;
+ BOOST_TEST((reverse(reverse(t)) == t));
+ }
+
+ return boost::report_errors();
+}
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/transform.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/transform.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,143 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/algorithm/transformation/transform.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/range_c.hpp>
+#include <boost/type_traits/is_reference.hpp>
+
+struct square
+{
+ typedef int result_type;
+
+ template <typename T>
+ int operator()(T x) const
+ {
+ return x * x;
+ }
+};
+
+struct add
+{
+ typedef int result_type;
+
+ template <typename A, typename B>
+ int operator()(A a, B b) const
+ {
+ return a + b;
+ }
+};
+
+struct unary_lvalue_transform
+{
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename T>
+ struct result<Self(T&)>
+ {
+ typedef T* type;
+ };
+
+ template<typename T>
+ T* operator()(T& t) const
+ {
+ return &t;
+ }
+};
+
+int twice(int v)
+{
+ return v*2;
+}
+
+struct binary_lvalue_transform
+{
+ template<typename Sig>
+ struct result;
+
+ template<typename Self,typename T0, typename T1>
+ struct result<Self(T0&,T1&)>
+ {
+ typedef T0* type;
+ };
+
+ template<typename T0, typename T1>
+ T0* operator()(T0& t0, T1&) const
+ {
+ return &t0;
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::mpl::range_c;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing the transform
+
+ {
+ typedef range_c<int, 5, 9> seq_type;
+ seq_type sequence;
+ std::cout << transform(sequence, square()) << std::endl;
+ BOOST_TEST((transform(sequence, square()) == make_vector(25, 36, 49, 64)));
+ }
+
+ {
+ typedef range_c<int, 5, 9> mpl_list1;
+ std::cout << transform(mpl_list1(), square()) << std::endl;
+ BOOST_TEST((transform(mpl_list1(), square()) == make_vector(25, 36, 49, 64)));
+ }
+
+ {
+ vector<int, int, int> tup(1, 2, 3);
+ std::cout << transform(tup, square()) << std::endl;
+ BOOST_TEST((transform(tup, square()) == make_vector(1, 4, 9)));
+ }
+
+ {
+ vector<int, int, int> tup1(1, 2, 3);
+ vector<int, int, int> tup2(4, 5, 6);
+ std::cout << transform(tup1, tup2, add()) << std::endl;
+ BOOST_TEST((transform(tup1, tup2, add()) == make_vector(5, 7, 9)));
+ }
+
+ {
+ // Unary transform that requires lvalues, just check compilation
+ vector<int, int, int> tup1(1, 2, 3);
+ BOOST_TEST(at_c<0>(transform(tup1, unary_lvalue_transform())) == &at_c<0>(tup1));
+ BOOST_TEST(*begin(transform(tup1, unary_lvalue_transform())) == &at_c<0>(tup1));
+ }
+
+ {
+ vector<int, int, int> tup1(1, 2, 3);
+ vector<int, int, int> tup2(4, 5, 6);
+ BOOST_TEST(at_c<0>(transform(tup1, tup2, binary_lvalue_transform())) == &at_c<0>(tup1));
+ BOOST_TEST(*begin(transform(tup1, tup2, binary_lvalue_transform())) == &at_c<0>(tup1));
+ }
+
+ {
+ vector<int, int, int> tup1(1, 2, 3);
+ BOOST_TEST(transform(tup1, twice) == make_vector(2,4,6));
+ }
+
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/mpl/vector.hpp>
+
+int main()
+{
+ using namespace boost::fusion;
+ {
+ BOOST_TEST(zip(make_vector(1,2), make_vector('a','b')) == make_vector(make_vector(1,'a'), make_vector(2,'b')));
+ BOOST_TEST(
+ zip(
+ make_vector(1,2),
+ make_vector('a','b'),
+ make_vector(-1,-2))
+ == make_vector(
+ make_vector(1,'a',-1),
+ make_vector(2,'b',-2))); // Zip more than 2 sequences
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip2.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip2.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/mpl/vector.hpp>
+
+int main()
+{
+ using namespace boost::fusion;
+ {
+ const vector2<int,int> shorter(1,2);
+ const vector3<char,char,char> longer('a', 'b', 'c');
+ const vector2<vector2<int,char>, vector2<int,char> > result(vector2<int,char>(1,'a'), vector2<int,char>(2,'b'));
+ BOOST_TEST(zip(shorter, longer) == result);
+ }
+ {
+ const vector3<int,int,int> longer(1,2,3);
+ const vector2<char,char> shorter('a', 'b');
+ const vector2<vector2<int,char>, vector2<int,char> > result(vector2<int,char>(1,'a'), vector2<int,char>(2,'b'));
+ BOOST_TEST(zip(longer, shorter) == result);
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip_ignore.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/algorithm/zip_ignore.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,28 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/algorithm/transformation/zip.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/fusion/iterator.hpp>
+#include <boost/fusion/sequence/intrinsic.hpp>
+
+int main()
+{
+ using namespace boost::fusion;
+ {
+ vector<int, int> iv(1,2);
+ vector<char, char> cv('a', 'b');
+ BOOST_TEST(at_c<0>(at_c<0>(zip(iv, unused, cv))) == 1);
+ BOOST_TEST(at_c<2>(at_c<0>(zip(iv, unused, cv))) == 'a');
+
+ BOOST_TEST(at_c<0>(at_c<1>(zip(iv, unused, cv))) == 2);
+ BOOST_TEST(at_c<2>(at_c<1>(zip(iv, unused, cv))) == 'b');
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,97 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/adapter/fused.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/assert.hpp>
+
+namespace fusion = boost::fusion;
+using boost::noncopyable;
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ typedef int result_type;
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y) const
+ {
+ return 1+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y)
+ {
+ return 2+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y) const
+ {
+ return 3+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y)
+ {
+ return 4+x-y;
+ }
+};
+
+int main()
+{
+ test_func<noncopyable> f;
+
+ typedef fusion::fused< test_func<> > ff;
+ ff fused_func;
+
+ typedef fusion::fused< test_func<noncopyable>& > ffr;
+ ffr fused_func_ref(f);
+
+ typedef fusion::fused< test_func<> const > ffc;
+ ffc fused_func_c;
+
+ typedef fusion::fused< test_func<> > const ffc2;
+ ffc2 fused_func_c2;
+
+ typedef fusion::fused< test_func<noncopyable> const& > ffcr;
+ ffcr fused_func_c_ref(f);
+
+ typedef fusion::vector<int,char> vec;
+ vec lv_vec(1,'\004');
+
+ BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ff(vec)>::type, int>));
+ BOOST_TEST(fused_func(lv_vec) == 1);
+ BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ffr(vec)>::type, int>));
+ BOOST_TEST(fused_func_c(lv_vec) == 0);
+ BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ffc(vec)>::type, int>));
+ BOOST_TEST(fused_func_c2(lv_vec) == 0);
+ BOOST_TEST(fused_func_ref(lv_vec) == 1);
+ BOOST_MPL_ASSERT((boost::is_same<boost::result_of<ffcr(vec)>::type, int>));
+ BOOST_TEST(fused_func_c_ref(lv_vec) == 0);
+
+ BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fused_func_c(fusion::make_vector(2,'\003')) == 0);
+ BOOST_TEST(fused_func_c2(fusion::make_vector(2,'\003')) == 0);
+ BOOST_TEST(fused_func_ref(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fused_func_c_ref(fusion::make_vector(2,'\003')) == 0);
+
+ return boost::report_errors();
+}
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused_function_object.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused_function_object.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,83 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/adapter/fused_function_object.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+namespace fusion = boost::fusion;
+using boost::noncopyable;
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ template<typename T>
+ struct result;
+
+ template<class Self, typename T0, typename T1>
+ struct result< Self(T0, T1) >
+ {
+ typedef int type;
+ };
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y) const
+ {
+ return 1+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y)
+ {
+ return 2+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y) const
+ {
+ return 3+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y)
+ {
+ return 4+x-y;
+ }
+};
+
+int main()
+{
+ test_func<noncopyable> f;
+ fusion::fused_function_object< test_func<> > fused_func;
+ fusion::fused_function_object< test_func<noncopyable>& > fused_func_ref(f);
+ fusion::fused_function_object< test_func<> const > fused_func_c;
+ fusion::fused_function_object< test_func<> > const fused_func_c2;
+ fusion::fused_function_object< test_func<noncopyable> const& > fused_func_c_ref(f);
+
+ fusion::vector<int,char> lv_vec(1,'\004');
+ BOOST_TEST(fused_func(lv_vec) == 1);
+ BOOST_TEST(fused_func_c(lv_vec) == 0);
+ BOOST_TEST(fused_func_c2(lv_vec) == 0);
+ BOOST_TEST(fused_func_ref(lv_vec) == 1);
+ BOOST_TEST(fused_func_c_ref(lv_vec) == 0);
+
+ BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fused_func_c(fusion::make_vector(2,'\003')) == 0);
+ BOOST_TEST(fused_func_c2(fusion::make_vector(2,'\003')) == 0);
+ BOOST_TEST(fused_func_ref(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fused_func_c_ref(fusion::make_vector(2,'\003')) == 0);
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused_procedure.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/fused_procedure.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,82 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/adapter/fused_procedure.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+namespace fusion = boost::fusion;
+using boost::noncopyable;
+
+int effect;
+
+#define CHECK_EFFECT(t,e) \
+ { \
+ effect = 1234567; t; \
+ BOOST_TEST(effect == e); \
+ }
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y) const
+ {
+ return effect = 1+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y)
+ {
+ return effect = 2+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y) const
+ {
+ return effect = 3+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y)
+ {
+ return effect = 4+x-y;
+ }
+};
+
+int main()
+{
+ test_func<noncopyable> f;
+ fusion::fused_procedure< test_func<> > fused_proc;
+ fusion::fused_procedure< test_func<noncopyable>& > fused_proc_ref(f);
+ fusion::fused_procedure< test_func<> const > fused_proc_c;
+ fusion::fused_procedure< test_func<> > const fused_proc_c2;
+ fusion::fused_procedure< test_func<noncopyable> const& > fused_proc_c_ref(f);
+
+ fusion::vector<int,char> lv_vec(1,'\004');
+ CHECK_EFFECT(fused_proc(lv_vec), 1);
+ CHECK_EFFECT(fused_proc_c(lv_vec), 0);
+ CHECK_EFFECT(fused_proc_c2(lv_vec), 0);
+ CHECK_EFFECT(fused_proc_ref(lv_vec), 1);
+ CHECK_EFFECT(fused_proc_c_ref(lv_vec), 0);
+
+ CHECK_EFFECT(fused_proc(fusion::make_vector(2,'\003')), 1);
+ CHECK_EFFECT(fused_proc_c(fusion::make_vector(2,'\003')), 0);
+ CHECK_EFFECT(fused_proc_c2(fusion::make_vector(2,'\003')), 0);
+ CHECK_EFFECT(fused_proc_ref(fusion::make_vector(2,'\003')), 1);
+ CHECK_EFFECT(fused_proc_c_ref(fusion::make_vector(2,'\003')), 0);
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,394 @@
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/invocation/invoke.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <memory>
+#include <boost/noncopyable.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <boost/mpl/int.hpp>
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/view/single_view.hpp>
+#include <boost/fusion/view/iterator_range.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/join.hpp>
+
+namespace mpl = boost::mpl;
+namespace fusion = boost::fusion;
+
+template <typename T>
+inline T const& const_(T const& t)
+{
+ return t;
+}
+
+struct object {};
+struct object_nc : boost::noncopyable {};
+
+struct fobj
+{
+ // Handle nullary separately to exercise result_of support
+ template <typename Sig>
+ struct result;
+
+ template <class Self, typename T0>
+ struct result< Self(T0) >
+ {
+ typedef int type;
+ };
+
+ template <class Self, typename T0, typename T1>
+ struct result< Self(T0, T1) >
+ {
+ typedef int type;
+ };
+
+ template <class Self, typename T0, typename T1, typename T2>
+ struct result< Self(T0, T1, T2) >
+ {
+ typedef int type;
+ };
+
+ int operator()(int i) { return 2 + i; }
+ int operator()(int i) const { return 3 + i; }
+
+ int operator()(int i, object &) { return 4 + i; }
+ int operator()(int i, object &) const { return 5 + i; }
+ int operator()(int i, object const&) { return 6 + i; }
+ int operator()(int i, object const&) const { return 7 + i; }
+
+ int operator()(int i, object &, object_nc &) { return 10 + i; }
+ int operator()(int i, object &, object_nc &) const { return 11 + i; }
+};
+
+struct nullary_fobj
+{
+ typedef int result_type;
+
+ int operator()() { return 0; }
+ int operator()() const { return 1; }
+};
+
+struct fobj_nc
+ : boost::noncopyable
+{
+ // Handle nullary separately to exercise result_of support
+ template <typename Sig>
+ struct result;
+
+ template <class Self, typename T0>
+ struct result< Self(T0)>
+ {
+ typedef int type;
+ };
+
+ int operator()(int i) { return 14 + i; }
+ int operator()(int i) const { return 15 + i; }
+};
+
+struct nullary_fobj_nc
+ : boost::noncopyable
+{
+ typedef int result_type;
+
+ int operator()() { return 12; }
+ int operator()() const { return 13; }
+};
+
+int nullary() { return 16; }
+int unary(int i) { return 17 + i; }
+int binary1(int i, object &) { return 18 + i; }
+int binary2(int i, object const&) { return 19 + i; }
+
+typedef int (* func_ptr)(int);
+typedef int (* const c_func_ptr)(int);
+typedef int (* volatile v_func_ptr)(int);
+typedef int (* const volatile cv_func_ptr)(int);
+
+ func_ptr func_ptr1 = &unary;
+ c_func_ptr func_ptr2 = &unary;
+ v_func_ptr func_ptr3 = &unary;
+cv_func_ptr func_ptr4 = &unary;
+
+class members
+{
+ public:
+ int data;
+
+ members()
+ : data(20)
+ { }
+
+ int nullary() { return data + 1; }
+ int nullary_c() const { return data + 2; }
+ int unary(int i) { return data + 3 + i; }
+ int unary_c(int i) const { return data + 4 + i; }
+ int binary(int i, object) { return data + 5 + i; }
+ int binary_c(int i, object) const { return data + 6 + i; }
+};
+
+struct derived
+ : members
+{
+};
+
+typedef int element1_type;
+typedef object element2_type;
+typedef object_nc & element3_type;
+
+int element1 = 100;
+object element2 = object();
+object_nc element3;
+
+members that;
+
+std::auto_ptr<members> spt_that(new members);
+std::auto_ptr<members const> spt_that_c(new members);
+
+fusion::single_view<members > sv_obj_ctx( that);
+fusion::single_view<members &> sv_ref_ctx( that);
+fusion::single_view<members *> sv_ptr_ctx(& that);
+fusion::single_view<members const > sv_obj_c_ctx( that);
+fusion::single_view<members const&> sv_ref_c_ctx( that);
+fusion::single_view<members const *> sv_ptr_c_ctx(& that);
+fusion::single_view<std::auto_ptr<members> const&> sv_spt_ctx(spt_that);
+fusion::single_view<std::auto_ptr<members const> const&> sv_spt_c_ctx(spt_that_c);
+
+derived derived_that;
+
+std::auto_ptr<derived> spt_derived_that(new derived);
+std::auto_ptr<derived const> spt_derived_that_c(new derived);
+
+fusion::single_view<derived > sv_obj_d_ctx( derived_that);
+fusion::single_view<derived &> sv_ref_d_ctx( derived_that);
+fusion::single_view<derived *> sv_ptr_d_ctx(& derived_that);
+fusion::single_view<derived const > sv_obj_c_d_ctx( derived_that);
+fusion::single_view<derived const&> sv_ref_c_d_ctx( derived_that);
+fusion::single_view<derived const *> sv_ptr_c_d_ctx(& derived_that);
+fusion::single_view<std::auto_ptr<derived> const&> sv_spt_d_ctx(spt_derived_that);
+fusion::single_view< std::auto_ptr<derived const> const&> sv_spt_c_d_ctx(spt_derived_that_c);
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<0>)
+{
+ // Function Objects
+
+ nullary_fobj f;
+
+ BOOST_TEST(f () == fusion::invoke(f , seq ));
+ BOOST_TEST(f () == fusion::invoke(f , const_(seq)));
+
+ // Note: The function object is taken by value, so we request the copy
+ // to be const with an explicit template argument. We can also request
+ // the function object to be pased by reference...
+ BOOST_TEST(const_(f)() == fusion::invoke<nullary_fobj const >(const_(f), seq ));
+ BOOST_TEST(const_(f)() == fusion::invoke<nullary_fobj const&>(const_(f), const_(seq)));
+
+ nullary_fobj_nc nc_f;
+ // ...and we further ensure there is no copying in this case, using a
+ // noncopyable function object.
+ BOOST_TEST(nc_f () == fusion::invoke<nullary_fobj_nc &>(nc_f , seq ));
+ BOOST_TEST(nc_f () == fusion::invoke<nullary_fobj_nc &>(nc_f , const_(seq)));
+ BOOST_TEST(const_(nc_f)() == fusion::invoke<nullary_fobj_nc const&>(const_(nc_f), seq ));
+ BOOST_TEST(const_(nc_f)() == fusion::invoke<nullary_fobj_nc const&>(const_(nc_f), const_(seq)));
+
+ // Builtin Functions
+
+ // Call through ref/ptr to function
+ BOOST_TEST(nullary() == fusion::invoke<int (&)()>(nullary, seq));
+ BOOST_TEST(nullary() == fusion::invoke(& nullary, seq));
+
+ // Call through ptr to member function
+ // Note: The non-const function members::nullary can't be invoked with
+ // fusion::join(sv_obj_ctx,seq)), which is const and so is its first element
+ BOOST_TEST(that.nullary() == fusion::invoke(& members::nullary, fusion::join(sv_ref_ctx,seq)));
+ BOOST_TEST(that.nullary() == fusion::invoke(& members::nullary, fusion::join(sv_ptr_ctx,seq)));
+ BOOST_TEST(that.nullary() == fusion::invoke(& members::nullary, fusion::join(sv_spt_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_obj_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ref_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ptr_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_spt_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_obj_c_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ref_c_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_ptr_c_ctx,seq)));
+ BOOST_TEST(that.nullary_c() == fusion::invoke(& members::nullary_c, fusion::join(sv_spt_c_ctx,seq)));
+
+ // Pointer to data member
+ //TODO cschmidt!!!
+ /*BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_ctx,seq)));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ref_c_ctx,seq)));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_ctx,seq)));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_ctx,seq)));
+
+ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_obj_d_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ref_d_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_ptr_d_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == (fusion::invoke(& members::data, fusion::join(sv_spt_d_ctx,seq)) = that.data));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_obj_c_d_ctx,seq)));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ref_c_d_ctx,seq)));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_ptr_c_d_ctx,seq)));
+ BOOST_TEST(that.data == fusion::invoke(& members::data, fusion::join(sv_spt_c_d_ctx,seq)));*/
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<1>)
+{
+ fobj f;
+ BOOST_TEST(f(element1) == fusion::invoke(f , seq ));
+ BOOST_TEST(f(element1) == fusion::invoke(f , const_(seq)));
+ BOOST_TEST(const_(f)(element1) == fusion::invoke<fobj const >(const_(f), seq ));
+ BOOST_TEST(const_(f)(element1) == fusion::invoke<fobj const&>(const_(f), const_(seq)));
+
+ fobj_nc nc_f;
+ BOOST_TEST(nc_f(element1) == fusion::invoke<fobj_nc &>(nc_f, seq ));
+ BOOST_TEST(nc_f(element1) == fusion::invoke<fobj_nc &>(nc_f, const_(seq)));
+ BOOST_TEST(const_(nc_f)(element1) == fusion::invoke<fobj_nc const&>(const_(nc_f), seq ));
+ BOOST_TEST(const_(nc_f)(element1) == fusion::invoke<fobj_nc const&>(const_(nc_f), const_(seq)));
+
+ BOOST_TEST(unary(element1) == fusion::invoke<int (&)(int)>(unary, seq));
+ BOOST_TEST(func_ptr1(element1) == fusion::invoke(func_ptr1, seq));
+ BOOST_TEST(func_ptr2(element1) == fusion::invoke(func_ptr2, seq));
+ BOOST_TEST(func_ptr3(element1) == fusion::invoke(func_ptr3, seq));
+ BOOST_TEST(func_ptr4(element1) == fusion::invoke(func_ptr4, seq));
+
+ BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ref_ctx,seq)));
+ BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ptr_ctx,seq)));
+ BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_spt_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_c_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_c_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_c_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_c_ctx,seq)));
+
+ BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ref_d_ctx,seq)));
+ BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_ptr_d_ctx,seq)));
+ BOOST_TEST(that.unary(element1) == fusion::invoke(& members::unary, fusion::join(sv_spt_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_obj_c_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ref_c_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_ptr_c_d_ctx,seq)));
+ BOOST_TEST(that.unary_c(element1) == fusion::invoke(& members::unary_c, fusion::join(sv_spt_c_d_ctx,seq)));
+
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<2>)
+{
+ fobj f;
+ BOOST_TEST(f (element1, element2) == fusion::invoke(f , seq));
+ BOOST_TEST(f (element1, const_(element2)) == fusion::invoke(f , const_(seq)));
+ BOOST_TEST(const_(f)(element1, element2) == fusion::invoke<fobj const>(const_(f), seq));
+ BOOST_TEST(const_(f)(element1, const_(element2)) == fusion::invoke<fobj const>(const_(f), const_(seq)));
+
+ BOOST_TEST(binary1(element1, element2) == fusion::invoke(binary1, seq));
+ BOOST_TEST(binary2(element1, element2) == fusion::invoke(binary2, seq));
+
+ BOOST_TEST(that.binary(element1,element2) == fusion::invoke(& members::binary, fusion::join(sv_ref_ctx,seq)));
+ BOOST_TEST(that.binary(element1,element2) == fusion::invoke(& members::binary, fusion::join(sv_ptr_ctx,seq)));
+ BOOST_TEST(that.binary(element1,element2) == fusion::invoke(& members::binary, fusion::join(sv_spt_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_obj_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ref_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ptr_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_spt_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_obj_c_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ref_c_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_ptr_c_ctx,seq)));
+ BOOST_TEST(that.binary_c(element1,element2) == fusion::invoke(& members::binary_c, fusion::join(sv_spt_c_ctx,seq)));
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<3>)
+{
+ fobj f;
+
+ BOOST_TEST(f(element1, element2, element3) == fusion::invoke(f, seq));
+ BOOST_TEST(const_(f)(element1, element2, element3) == fusion::invoke<fobj const>(const_(f), seq));
+}
+
+template <class Sequence>
+void test_sequence(Sequence & seq)
+{
+ test_sequence_n(seq, mpl::int_<fusion::result_of::size<Sequence>::value>());
+}
+
+
+void result_type_tests()
+{
+ using boost::is_same;
+
+ BOOST_TEST(( is_same<
+ fusion::result_of::invoke<int (*)(), fusion::vector0<> >::type, int
+ >::value ));
+// disabled until boost::result_of supports it
+// BOOST_TEST(( is_same<
+// fusion::result_of::invoke<int (*)(...), fusion::vector1<int> >::type, int
+// >::value ));
+ BOOST_TEST(( is_same<
+ fusion::result_of::invoke<int (members::*)(), fusion::vector1<members*> >::type, int
+ >::value ));
+// disabled until boost::result_of supports it
+// BOOST_TEST(( is_same<
+// fusion::result_of::invoke<int (members::*)(...), fusion::vector2<members*,int> >::type, int
+// >::value ));
+}
+
+int main()
+{
+ result_type_tests();
+
+ typedef fusion::vector<> vector0;
+ typedef fusion::vector<element1_type> vector1;
+ typedef fusion::vector<element1_type, element2_type> vector2;
+ typedef fusion::vector<element1_type, element2_type, element3_type> vector3;
+
+ vector0 v0;
+ vector1 v1(element1);
+ vector2 v2(element1, element2);
+ vector3 v3(element1, element2, element3);
+
+ test_sequence(v0);
+ test_sequence(v1);
+ test_sequence(v2);
+ test_sequence(v3);
+
+ typedef fusion::list<> list0;
+ typedef fusion::list<element1_type> list1;
+ typedef fusion::list<element1_type, element2_type> list2;
+ typedef fusion::list<element1_type, element2_type, element3_type> list3;
+
+ list0 l0;
+ list1 l1(element1);
+ list2 l2(element1, element2);
+ list3 l3(element1, element2, element3);
+
+ test_sequence(l0);
+ test_sequence(l1);
+ test_sequence(l2);
+ test_sequence(l3);
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_function_object.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_function_object.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,234 @@
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/invocation/invoke_function_object.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <memory>
+#include <boost/noncopyable.hpp>
+
+#include <boost/mpl/int.hpp>
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/view/single_view.hpp>
+#include <boost/fusion/view/iterator_range.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/join.hpp>
+
+namespace mpl = boost::mpl;
+namespace fusion = boost::fusion;
+
+template <typename T>
+inline T const& const_(T const& t)
+{
+ return t;
+}
+
+struct object {};
+struct object_nc : boost::noncopyable {};
+
+struct fobj
+{
+ // Handle nullary separately to exercise result_of support
+ template <typename Sig>
+ struct result;
+
+ template <class Self, typename T0>
+ struct result< Self(T0) >
+ {
+ typedef int type;
+ };
+
+ template <class Self, typename T0, typename T1>
+ struct result< Self(T0, T1) >
+ {
+ typedef int type;
+ };
+
+ template <class Self, typename T0, typename T1, typename T2>
+ struct result< Self(T0, T1, T2) >
+ {
+ typedef int type;
+ };
+
+ int operator()() { return 0; }
+ int operator()() const { return 1; }
+
+ int operator()(int i) { return 2 + i; }
+ int operator()(int i) const { return 3 + i; }
+
+ int operator()(int i, object &) { return 4 + i; }
+ int operator()(int i, object &) const { return 5 + i; }
+ int operator()(int i, object const&) { return 6 + i; }
+ int operator()(int i, object const&) const { return 7 + i; }
+
+ int operator()(int i, object &, object_nc &) { return 10 + i; }
+ int operator()(int i, object &, object_nc &) const { return 11 + i; }
+};
+
+struct nullary_fobj
+{
+ typedef int result_type;
+
+ int operator()() { return 0; }
+ int operator()() const { return 1; }
+};
+
+struct fobj_nc
+ : boost::noncopyable
+{
+ // Handle nullary separately to exercise result_of support
+ template <typename T>
+ struct result;
+
+ template <class Self, typename T0>
+ struct result< Self(T0) >
+ {
+ typedef int type;
+ };
+
+ int operator()(int i) { return 14 + i; }
+ int operator()(int i) const { return 15 + i; }
+};
+
+struct nullary_fobj_nc
+ : boost::noncopyable
+{
+ typedef int result_type;
+
+ int operator()() { return 12; }
+ int operator()() const { return 13; }
+};
+
+
+typedef int element1_type;
+typedef object element2_type;
+typedef object_nc & element3_type;
+
+int element1 = 100;
+object element2 = object();
+object_nc element3;
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<0>)
+{
+ // Function Objects
+
+ nullary_fobj f;
+ BOOST_TEST(f () == fusion::invoke_function_object(f , seq ));
+ BOOST_TEST(f () == fusion::invoke_function_object(f , const_(seq)));
+
+ // Note: The function object is taken by value, so we request the copy
+ // to be const with an explicit template argument. We can also request
+ // the function object to be pased by reference...
+ BOOST_TEST(const_(f)() == fusion::invoke_function_object<nullary_fobj const >(const_(f), seq ));
+ BOOST_TEST(const_(f)() == fusion::invoke_function_object<nullary_fobj const&>(const_(f), const_(seq)));
+
+ nullary_fobj_nc nc_f;
+ // ...and we further ensure there is no copying in this case, using a
+ // noncopyable function object.
+ BOOST_TEST(nc_f () == fusion::invoke_function_object<nullary_fobj_nc &>(nc_f , seq ));
+ BOOST_TEST(nc_f () == fusion::invoke_function_object<nullary_fobj_nc &>(nc_f , const_(seq)));
+ BOOST_TEST(const_(nc_f)() == fusion::invoke_function_object<nullary_fobj_nc const&>(const_(nc_f), seq ));
+ BOOST_TEST(const_(nc_f)() == fusion::invoke_function_object<nullary_fobj_nc const&>(const_(nc_f), const_(seq)));
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<1>)
+{
+ fobj f;
+ BOOST_TEST(f(element1) == fusion::invoke_function_object(f , seq ));
+ BOOST_TEST(f(element1) == fusion::invoke_function_object(f , const_(seq)));
+ BOOST_TEST(const_(f)(element1) == fusion::invoke_function_object<fobj const >(const_(f), seq ));
+ BOOST_TEST(const_(f)(element1) == fusion::invoke_function_object<fobj const&>(const_(f), const_(seq)));
+
+ fobj_nc nc_f;
+ BOOST_TEST(nc_f(element1) == fusion::invoke_function_object<fobj_nc &>(nc_f, seq ));
+ BOOST_TEST(nc_f(element1) == fusion::invoke_function_object<fobj_nc &>(nc_f, const_(seq)));
+ BOOST_TEST(const_(nc_f)(element1) == fusion::invoke_function_object<fobj_nc const&>(const_(nc_f), seq ));
+ BOOST_TEST(const_(nc_f)(element1) == fusion::invoke_function_object<fobj_nc const&>(const_(nc_f), const_(seq)));
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<2>)
+{
+ fobj f;
+ BOOST_TEST(f (element1, element2) == fusion::invoke_function_object(f , seq));
+ BOOST_TEST(f (element1, const_(element2)) == fusion::invoke_function_object(f , const_(seq)));
+ BOOST_TEST(const_(f)(element1, element2) == fusion::invoke_function_object<fobj const>(const_(f), seq));
+ BOOST_TEST(const_(f)(element1, const_(element2)) == fusion::invoke_function_object<fobj const>(const_(f), const_(seq)));
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<3>)
+{
+ fobj f;
+
+ BOOST_TEST(f(element1, element2, element3) == fusion::invoke_function_object(f, seq));
+ BOOST_TEST(const_(f)(element1, element2, element3) == fusion::invoke_function_object<fobj const>(const_(f), seq));
+}
+
+template <class Sequence>
+void test_sequence(Sequence & seq)
+{
+ test_sequence_n(seq, mpl::int_<fusion::result_of::size<Sequence>::value>());
+}
+
+void result_type_tests()
+{
+ using boost::is_same;
+
+ BOOST_TEST(( is_same< fusion::result_of::invoke_function_object< nullary_fobj, fusion::vector<> >::type, int >::value ));
+ BOOST_TEST(( is_same< fusion::result_of::invoke_function_object< fobj, fusion::vector<element1_type> >::type, int >::value ));
+ BOOST_TEST(( is_same< fusion::result_of::invoke_function_object< fobj, fusion::vector<element1_type,element2_type> >::type, int >::value ));
+}
+
+
+int main()
+{
+ result_type_tests();
+
+ typedef fusion::vector<> vector0;
+ typedef fusion::vector<element1_type> vector1;
+ typedef fusion::vector<element1_type, element2_type> vector2;
+ typedef fusion::vector<element1_type, element2_type, element3_type> vector3;
+
+ vector0 v0;
+ vector1 v1(element1);
+ vector2 v2(element1, element2);
+ vector3 v3(element1, element2, element3);
+
+ test_sequence(v0);
+ test_sequence(v1);
+ test_sequence(v2);
+ test_sequence(v3);
+
+ typedef fusion::list<> list0;
+ typedef fusion::list<element1_type> list1;
+ typedef fusion::list<element1_type, element2_type> list2;
+ typedef fusion::list<element1_type, element2_type, element3_type> list3;
+
+ list0 l0;
+ list1 l1(element1);
+ list2 l2(element1, element2);
+ list3 l3(element1, element2, element3);
+
+ test_sequence(l0);
+ test_sequence(l1);
+ test_sequence(l2);
+ test_sequence(l3);
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_procedure.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/invoke_procedure.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,284 @@
+/*=============================================================================
+ Copyright (c) 2005-2006 Joao Abecasis
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/invocation/invoke_procedure.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <memory>
+#include <boost/noncopyable.hpp>
+
+#include <boost/mpl/int.hpp>
+
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/view/single_view.hpp>
+#include <boost/fusion/view/iterator_range.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/algorithm/transformation/join.hpp>
+
+namespace mpl = boost::mpl;
+namespace fusion = boost::fusion;
+
+template <typename T>
+inline T const& const_(T const& t)
+{
+ return t;
+}
+
+struct object {};
+struct object_nc : boost::noncopyable {};
+
+typedef int element1_type;
+typedef object element2_type;
+typedef object_nc & element3_type;
+
+int element1 = 100;
+object element2 = object();
+object_nc element3;
+
+class members
+{
+ public:
+ int data;
+
+ members()
+ : data(20)
+ { }
+
+ int nullary() { return element1 = data + 1; }
+ int nullary_c() const { return element1 = data + 2; }
+ int unary(int & i) { return i = data + 3; }
+ int unary_c(int & i) const { return i = data + 4; }
+ int binary(int & i, object) { return i = data + 5; }
+ int binary_c(int & i, object) const { return i = data + 6; }
+};
+
+members that;
+std::auto_ptr<members> spt_that(new members);
+std::auto_ptr<members const> spt_that_c(new members);
+
+fusion::single_view<members > sv_obj_ctx( that);
+fusion::single_view<members &> sv_ref_ctx( that);
+fusion::single_view<members *> sv_ptr_ctx(& that);
+fusion::single_view<members const > sv_obj_c_ctx( that);
+fusion::single_view<members const&> sv_ref_c_ctx( that);
+fusion::single_view<members const *> sv_ptr_c_ctx(& that);
+fusion::single_view<std::auto_ptr<members> const&> sv_spt_ctx(spt_that);
+fusion::single_view< std::auto_ptr<members const> const&> sv_spt_c_ctx(spt_that_c);
+
+struct fobj
+{
+ int operator()() { return element1 = 0; }
+ int operator()() const { return element1 = 1; }
+
+ int operator()(int & i) { return i = 2 ; }
+ int operator()(int & i) const { return i = 3; }
+
+ int operator()(int & i, object &) { return i = 4; }
+ int operator()(int & i, object &) const { return i = 5; }
+ int operator()(int & i, object const&) { return i = 6; }
+ int operator()(int & i, object const&) const { return i = 7; }
+
+ int operator()(int & i, object &, object_nc &) { return i = 10; }
+ int operator()(int & i, object &, object_nc &) const { return i = 11; }
+};
+
+struct fobj_nc
+ : boost::noncopyable
+{
+ int operator()() { return element1 = 12; }
+ int operator()() const { return element1 = 13; }
+
+ int operator()(int & i) { return i = 14; }
+ int operator()(int & i) const { return i = 15; }
+};
+
+int nullary() { return element1 = 16; }
+int unary(int & i) { return i = 17; }
+int binary1(int & i, object &) { return i = 18; }
+int binary2(int & i, object const&) { return i = 19; }
+
+typedef int (* func_ptr)(int &);
+typedef int (* const c_func_ptr)(int &);
+typedef int (* volatile v_func_ptr)(int &);
+typedef int (* const volatile cv_func_ptr)(int &);
+
+ func_ptr func_ptr1 = &unary;
+ c_func_ptr func_ptr2 = &unary;
+ v_func_ptr func_ptr3 = &unary;
+cv_func_ptr func_ptr4 = &unary;
+
+
+
+#define COMPARE_EFFECT(e,t) \
+ { \
+ element1 = 1234567; e; \
+ int expected = element1; \
+ element1 = 1234567; t; \
+ BOOST_TEST(expected == element1 ); \
+ }
+
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<0>)
+{
+ // Function Objects
+
+ fobj f;
+
+ COMPARE_EFFECT(f (), fusion::invoke_procedure(f , seq ));
+ COMPARE_EFFECT(f (), fusion::invoke_procedure(f , const_(seq)));
+
+ // Note: The function object is taken by value, so we request the copy
+ // to be const with an explicit template argument. We can also request
+ // the function object to be passed by reference...
+ COMPARE_EFFECT(const_(f)(), fusion::invoke_procedure<fobj const >(const_(f), seq ));
+ COMPARE_EFFECT(const_(f)(), fusion::invoke_procedure<fobj const&>(const_(f), const_(seq)));
+
+ fobj_nc nc_f;
+ // ...and we further ensure there is no copying in this case, using a
+ // noncopyable function object.
+ COMPARE_EFFECT(nc_f (), fusion::invoke_procedure<fobj_nc &>(nc_f , seq ));
+ COMPARE_EFFECT(nc_f (), fusion::invoke_procedure<fobj_nc &>(nc_f , const_(seq)));
+ COMPARE_EFFECT(const_(nc_f)(), fusion::invoke_procedure<fobj_nc const&>(const_(nc_f), seq ));
+ COMPARE_EFFECT(const_(nc_f)(), fusion::invoke_procedure<fobj_nc const&>(const_(nc_f), const_(seq)));
+
+ // Builtin Functions
+
+ // Call through ref/ptr to function
+ COMPARE_EFFECT(nullary(), fusion::invoke_procedure<int (&)()>(nullary, seq));
+ COMPARE_EFFECT(nullary(), fusion::invoke_procedure(& nullary, seq));
+
+ // Call through ptr to member function
+ // Note: The non-const function members::nullary can't be invoked with
+ // fusion::join(sv_obj_ctx,seq)), which is const and so is its first element
+ COMPARE_EFFECT(that.nullary(), fusion::invoke_procedure(& members::nullary, fusion::join(sv_ref_ctx,seq)));
+ COMPARE_EFFECT(that.nullary(), fusion::invoke_procedure(& members::nullary, fusion::join(sv_ptr_ctx,seq)));
+ COMPARE_EFFECT(that.nullary(), fusion::invoke_procedure(& members::nullary, fusion::join(sv_spt_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_obj_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ref_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ptr_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_spt_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_obj_c_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ref_c_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_ptr_c_ctx,seq)));
+ COMPARE_EFFECT(that.nullary_c(), fusion::invoke_procedure(& members::nullary_c, fusion::join(sv_spt_c_ctx,seq)));
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<1>)
+{
+ fobj f;
+ COMPARE_EFFECT(f(element1), fusion::invoke_procedure(f , seq ));
+ COMPARE_EFFECT(f(element1), fusion::invoke_procedure(f , const_(seq)));
+ COMPARE_EFFECT(const_(f)(element1), fusion::invoke_procedure<fobj const >(const_(f), seq ));
+ COMPARE_EFFECT(const_(f)(element1), fusion::invoke_procedure<fobj const&>(const_(f), const_(seq)));
+
+ fobj_nc nc_f;
+ COMPARE_EFFECT(nc_f(element1), fusion::invoke_procedure<fobj_nc &>(nc_f, seq ));
+ COMPARE_EFFECT(nc_f(element1), fusion::invoke_procedure<fobj_nc &>(nc_f, const_(seq)));
+ COMPARE_EFFECT(const_(nc_f)(element1), fusion::invoke_procedure<fobj_nc const&>(const_(nc_f), seq ));
+ COMPARE_EFFECT(const_(nc_f)(element1), fusion::invoke_procedure<fobj_nc const&>(const_(nc_f), const_(seq)));
+
+ COMPARE_EFFECT(unary(element1), fusion::invoke_procedure<int (&)(int &)>(unary, seq));
+ COMPARE_EFFECT(func_ptr1(element1), fusion::invoke_procedure(func_ptr1, seq));
+ COMPARE_EFFECT(func_ptr2(element1), fusion::invoke_procedure(func_ptr2, seq));
+ COMPARE_EFFECT(func_ptr3(element1), fusion::invoke_procedure(func_ptr3, seq));
+ COMPARE_EFFECT(func_ptr4(element1), fusion::invoke_procedure(func_ptr4, seq));
+
+ COMPARE_EFFECT(that.unary(element1), fusion::invoke_procedure(& members::unary, fusion::join(sv_ref_ctx,seq)));
+ COMPARE_EFFECT(that.unary(element1), fusion::invoke_procedure(& members::unary, fusion::join(sv_ptr_ctx,seq)));
+ COMPARE_EFFECT(that.unary(element1), fusion::invoke_procedure(& members::unary, fusion::join(sv_spt_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_obj_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ref_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ptr_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_spt_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_obj_c_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ref_c_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_ptr_c_ctx,seq)));
+ COMPARE_EFFECT(that.unary_c(element1), fusion::invoke_procedure(& members::unary_c, fusion::join(sv_spt_c_ctx,seq)));
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<2>)
+{
+ fobj f;
+ COMPARE_EFFECT(f (element1, element2), fusion::invoke_procedure(f , seq));
+ COMPARE_EFFECT(f (element1, const_(element2)), fusion::invoke_procedure(f , const_(seq)));
+ COMPARE_EFFECT(const_(f)(element1, element2), fusion::invoke_procedure<fobj const>(const_(f), seq));
+ COMPARE_EFFECT(const_(f)(element1, const_(element2)), fusion::invoke_procedure<fobj const>(const_(f), const_(seq)));
+
+ COMPARE_EFFECT(binary1(element1, element2), fusion::invoke_procedure(binary1, seq));
+ COMPARE_EFFECT(binary2(element1, element2), fusion::invoke_procedure(binary2, seq));
+
+ COMPARE_EFFECT(that.binary(element1,element2), fusion::invoke_procedure(& members::binary, fusion::join(sv_ref_ctx,seq)));
+ COMPARE_EFFECT(that.binary(element1,element2), fusion::invoke_procedure(& members::binary, fusion::join(sv_ptr_ctx,seq)));
+ COMPARE_EFFECT(that.binary(element1,element2), fusion::invoke_procedure(& members::binary, fusion::join(sv_spt_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_obj_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ref_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ptr_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_spt_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_obj_c_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ref_c_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_ptr_c_ctx,seq)));
+ COMPARE_EFFECT(that.binary_c(element1,element2), fusion::invoke_procedure(& members::binary_c, fusion::join(sv_spt_c_ctx,seq)));
+}
+
+template <class Sequence>
+void test_sequence_n(Sequence & seq, mpl::int_<3>)
+{
+ fobj f;
+
+ COMPARE_EFFECT(f(element1, element2, element3), fusion::invoke_procedure(f, seq));
+ COMPARE_EFFECT(const_(f)(element1, element2, element3), fusion::invoke_procedure<fobj const>(const_(f), seq));
+}
+
+template <class Sequence>
+void test_sequence(Sequence & seq)
+{
+ test_sequence_n(seq, mpl::int_<fusion::result_of::size<Sequence>::value>());
+}
+
+int main()
+{
+ typedef fusion::vector<> vector0;
+ typedef fusion::vector<element1_type &> vector1;
+ typedef fusion::vector<element1_type &, element2_type> vector2;
+ typedef fusion::vector<element1_type &, element2_type, element3_type> vector3;
+
+ vector0 v0;
+ vector1 v1(element1);
+ vector2 v2(element1, element2);
+ vector3 v3(element1, element2, element3);
+
+ test_sequence(v0);
+ test_sequence(v1);
+ test_sequence(v2);
+ test_sequence(v3);
+
+ typedef fusion::list<> list0;
+ typedef fusion::list<element1_type &> list1;
+ typedef fusion::list<element1_type &, element2_type> list2;
+ typedef fusion::list<element1_type &, element2_type, element3_type> list3;
+
+ list0 l0;
+ list1 l1(element1);
+ list2 l2(element1, element2);
+ list3 l3(element1, element2, element3);
+
+ test_sequence(l0);
+ test_sequence(l1);
+ test_sequence(l2);
+ test_sequence(l3);
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,85 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/generation/make_fused.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+namespace fusion = boost::fusion;
+using boost::noncopyable;
+using boost::cref;
+using boost::ref;
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ typedef int result_type;
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y) const
+ {
+ return 1+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y)
+ {
+ return 2+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y) const
+ {
+ return 3+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y)
+ {
+ return 4+x-y;
+ }
+};
+
+template <typename T>
+inline T const& const_(T const& t)
+{
+ return t;
+}
+
+int main()
+{
+ fusion::vector<int,char> lv_vec(1,'\004');
+ test_func<> f;
+ test_func<noncopyable> f_nc;
+
+ fusion::result_of::make_fused< test_func<> >::type fused_func
+ = fusion::make_fused(f);
+
+ BOOST_TEST(fused_func(lv_vec) == 1);
+ BOOST_TEST(const_(fused_func)(lv_vec) == 0);
+ BOOST_TEST(fusion::make_fused(const_(f))(lv_vec) == 1);
+ BOOST_TEST(fusion::make_fused(ref(f_nc))(lv_vec) == 1);
+ BOOST_TEST(fusion::make_fused(cref(f_nc))(lv_vec) == 0);
+
+ BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(const_(fused_func)(fusion::make_vector(2,'\003')) == 0);
+ BOOST_TEST(fusion::make_fused(const_(f))(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fusion::make_fused(ref(f_nc))(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fusion::make_fused(cref(f_nc))(fusion::make_vector(2,'\003')) == 0);
+
+ return boost::report_errors();
+}
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused_function_object.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused_function_object.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,95 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/generation/make_fused_function_object.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+namespace fusion = boost::fusion;
+using boost::noncopyable;
+using boost::cref;
+using boost::ref;
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ template<typename T>
+ struct result
+ {
+ };
+
+
+ template<class Self, typename T0, typename T1>
+ struct result< Self(T0, T1) >
+ {
+ typedef int type;
+ };
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y) const
+ {
+ return 1+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y)
+ {
+ return 2+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y) const
+ {
+ return 3+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y)
+ {
+ return 4+x-y;
+ }
+};
+
+template <typename T>
+inline T const& const_(T const& t)
+{
+ return t;
+}
+
+int main()
+{
+ fusion::vector<int,char> lv_vec(1,'\004');
+ test_func<> f;
+ test_func<noncopyable> f_nc;
+
+ fusion::result_of::make_fused_function_object< test_func<> >::type fused_func
+ = fusion::make_fused_function_object(f);
+
+ BOOST_TEST(fused_func(lv_vec) == 1);
+ BOOST_TEST(const_(fused_func)(lv_vec) == 0);
+ BOOST_TEST(fusion::make_fused_function_object(const_(f))(lv_vec) == 1);
+ BOOST_TEST(fusion::make_fused_function_object(ref(f_nc))(lv_vec) == 1);
+ BOOST_TEST(fusion::make_fused_function_object(cref(f_nc))(lv_vec) == 0);
+
+ BOOST_TEST(fused_func(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(const_(fused_func)(fusion::make_vector(2,'\003')) == 0);
+ BOOST_TEST(fusion::make_fused_function_object(const_(f))(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fusion::make_fused_function_object(ref(f_nc))(fusion::make_vector(2,'\003')) == 1);
+ BOOST_TEST(fusion::make_fused_function_object(cref(f_nc))(fusion::make_vector(2,'\003')) == 0);
+
+ return boost::report_errors();
+}
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused_procedure.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_fused_procedure.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,91 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/generation/make_fused_procedure.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector.hpp>
+
+namespace fusion = boost::fusion;
+using boost::noncopyable;
+using boost::cref;
+using boost::ref;
+
+int effect;
+
+#define CHECK_EFFECT(t,e) \
+ { \
+ effect = 1234567; t; \
+ BOOST_TEST(effect == e); \
+ }
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y) const
+ {
+ return effect = 1+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 const& x, T1 const& y)
+ {
+ return effect = 2+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y) const
+ {
+ return effect = 3+x-y;
+ }
+
+ template <typename T0, typename T1>
+ int operator()(T0 & x, T1 & y)
+ {
+ return effect = 4+x-y;
+ }
+};
+
+template <typename T>
+inline T const& const_(T const& t)
+{
+ return t;
+}
+
+int main()
+{
+ fusion::vector<int,char> lv_vec(1,'\004');
+ test_func<> f;
+ test_func<noncopyable> f_nc;
+
+ fusion::result_of::make_fused_procedure< test_func<> >::type fused_func
+ = fusion::make_fused_procedure(f);
+
+ CHECK_EFFECT(fused_func(lv_vec), 1);
+ CHECK_EFFECT(const_(fused_func)(lv_vec), 0);
+ CHECK_EFFECT(fusion::make_fused_procedure(const_(f))(lv_vec), 1);
+ CHECK_EFFECT(fusion::make_fused_procedure(ref(f_nc))(lv_vec), 1);
+ CHECK_EFFECT(fusion::make_fused_procedure(cref(f_nc))(lv_vec), 0);
+
+ CHECK_EFFECT(fused_func(fusion::make_vector(2,'\003')), 1);
+ CHECK_EFFECT(const_(fused_func)(fusion::make_vector(2,'\003')), 0);
+ CHECK_EFFECT(fusion::make_fused_procedure(const_(f))(fusion::make_vector(2,'\003')), 1);
+ CHECK_EFFECT(fusion::make_fused_procedure(ref(f_nc))(fusion::make_vector(2,'\003')), 1);
+ CHECK_EFFECT(fusion::make_fused_procedure(cref(f_nc))(fusion::make_vector(2,'\003')), 0);
+
+ return boost::report_errors();
+}
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_unfused.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/make_unfused.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,126 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/generation/make_unfused.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/identity.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+
+#include <boost/ref.hpp>
+
+namespace fusion = boost::fusion;
+namespace mpl = boost::mpl;
+
+using boost::noncopyable;
+typedef mpl::true_ no_nullary_call;
+
+using boost::ref;
+using boost::cref;
+
+template <class Base = boost::blank, class RemoveNullary = mpl::false_>
+struct test_func
+ : Base
+{
+ template <typename Sig>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ : mpl::if_< mpl::and_< fusion::result_of::empty<Seq>, RemoveNullary >,
+ boost::blank, mpl::identity<long> >::type
+ { };
+
+ template <typename Seq>
+ long operator()(Seq const& seq) const
+ {
+ long state = 0;
+ return fusion::fold(seq, state, fold_op());
+ }
+
+ template < typename Seq >
+ long operator()(Seq const& seq)
+ {
+ long state = 100;
+ return fusion::fold(seq, state, fold_op());
+ }
+
+ private:
+
+ struct fold_op
+ {
+ typedef long result_type;
+
+ template <typename T>
+ long operator()(T & elem, long value) const
+ {
+ elem += sizeof(T);
+ return value + elem;
+ }
+ };
+};
+
+template <typename T>
+inline T const& const_(T const& t)
+{
+ return t;
+}
+
+int main()
+{
+ test_func<> f;
+ test_func<noncopyable> f_nc;
+
+ fusion::result_of::make_unfused< test_func<> >::type unfused_func =
+ fusion::make_unfused(f);
+
+ fusion::result_of::make_unfused< boost::reference_wrapper<
+ test_func<noncopyable> > >::type unfused_func_ref =
+ fusion::make_unfused(ref(f_nc));
+
+ fusion::result_of::make_unfused< boost::reference_wrapper<
+ test_func<noncopyable> const> >::type unfused_func_c_ref =
+ fusion::make_unfused(cref(f_nc));
+
+ BOOST_TEST(unfused_func() == 100);
+ BOOST_TEST(const_(unfused_func)() == 0);
+ BOOST_TEST(unfused_func_ref() == 100);
+ BOOST_TEST(unfused_func_c_ref() == 0);
+
+ long lv1 = 2; int lv2 = 3l; char lv3 = '\007';
+ long expected;
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func(lv1,lv2,lv3) == 100 + expected);
+ BOOST_TEST(lv1 == 2+1*sizeof(lv1) && lv2 == 3+1*sizeof(lv2) && lv3 == 7+1*sizeof(lv3));
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(const_(unfused_func)(lv1,lv2,lv3) == 0 + expected);
+ BOOST_TEST(lv1 == 2+2*sizeof(lv1) && lv2 == 3+2*sizeof(lv2) && lv3 == 7+2*sizeof(lv3));
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func_ref(lv1,lv2,lv3) == 100 + expected);
+ BOOST_TEST(lv1 == 2+3*sizeof(lv1) && lv2 == 3+3*sizeof(lv2) && lv3 == 7+3*sizeof(lv3));
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func_c_ref(lv1,lv2,lv3) == 0 + expected);
+ BOOST_TEST(lv1 == 2+4*sizeof(lv1) && lv2 == 3+4*sizeof(lv2) && lv3 == 7+4*sizeof(lv3));
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/unfused.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/unfused.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,119 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/adapter/unfused.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/noncopyable.hpp>
+#include <boost/blank.hpp>
+
+#include <boost/mpl/identity.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+
+namespace fusion = boost::fusion;
+namespace mpl = boost::mpl;
+
+using boost::noncopyable;
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ template <typename Sig>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ : mpl::identity<long>
+ { };
+
+ template <typename Seq>
+ long operator()(Seq const& seq) const
+ {
+ long state = 0;
+ return fusion::fold(seq, state, fold_op());
+ }
+
+ template <typename Seq>
+ long operator()(Seq const& seq)
+ {
+ long state = 100;
+ return fusion::fold(seq, state, fold_op());
+ }
+
+ private:
+
+ struct fold_op
+ {
+ typedef long result_type;
+
+ template <typename T>
+ long operator()(T & elem, long value) const
+ {
+ elem += sizeof(T);
+ return value + elem;
+ }
+ };
+};
+
+void result_type_tests()
+{
+ using boost::is_same;
+
+ typedef fusion::unfused< test_func<> > t;
+ BOOST_TEST(( is_same< boost::result_of< t () >::type, long >::value ));
+ BOOST_TEST(( is_same< boost::result_of< t (int) >::type, long >::value ));
+}
+
+int main()
+{
+ result_type_tests();
+
+ test_func<noncopyable> f;
+ fusion::unfused< test_func<> > unfused_func;
+ fusion::unfused< test_func<noncopyable>& > unfused_func_ref(f);
+ fusion::unfused< test_func<> const > unfused_func_c;
+ fusion::unfused< test_func<> > const unfused_func_c2;
+ fusion::unfused< test_func<noncopyable> const& > unfused_func_c_ref(f);
+
+ BOOST_TEST(unfused_func() == 100);
+ BOOST_TEST(unfused_func_ref() == 100);
+ BOOST_TEST(unfused_func_c() == 0);
+ BOOST_TEST(unfused_func_c2() == 0);
+ BOOST_TEST(unfused_func_c_ref() == 0);
+
+ long lv1 = 2; int lv2 = 3l; char lv3 = '\007';
+ long expected;
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func(lv1,lv2,lv3) == 100 + expected);
+ BOOST_TEST(lv1 == 2+1*sizeof(lv1) && lv2 == 3+1*sizeof(lv2) && lv3 == 7+1*sizeof(lv3));
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func_ref(lv1,lv2,lv3) == 100 + expected);
+ BOOST_TEST(lv1 == 2+2*sizeof(lv1) && lv2 == 3+2*sizeof(lv2) && lv3 == 7+2*sizeof(lv3));
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func_c(lv1,lv2,lv3) == 0 + expected);
+ BOOST_TEST(lv1 == 2+3*sizeof(lv1) && lv2 == 3+3*sizeof(lv2) && lv3 == 7+3*sizeof(lv3));
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func_c2(lv1,lv2,lv3) == 0 + expected);
+ BOOST_TEST(lv1 == 2+4*sizeof(lv1) && lv2 == 3+4*sizeof(lv2) && lv3 == 7+4*sizeof(lv3));
+
+ expected = lv1+sizeof(lv1) + lv2+sizeof(lv2) + lv3+sizeof(lv3);
+ BOOST_TEST(unfused_func_c_ref(lv1,lv2,lv3) == 0 + expected);
+ BOOST_TEST(lv1 == 2+5*sizeof(lv1) && lv2 == 3+5*sizeof(lv2) && lv3 == 7+5*sizeof(lv3));
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/functional/unfused_typed.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/functional/unfused_typed.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,166 @@
+/*=============================================================================
+ Copyright (c) 2006-2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/functional/adapter/unfused_typed.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/blank.hpp>
+#include <boost/noncopyable.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/mpl/identity.hpp>
+
+#include <boost/utility/result_of.hpp>
+
+#include <boost/fusion/algorithm/iteration/fold.hpp>
+
+namespace fusion = boost::fusion;
+namespace mpl = boost::mpl;
+using mpl::placeholders::_;
+
+using boost::noncopyable;
+
+typedef fusion::vector<> types0;
+typedef fusion::vector<long &> types1;
+typedef fusion::vector<long &,int,char> types3;
+
+template <class Base = boost::blank>
+struct test_func
+ : Base
+{
+ template<typename T>
+ struct result;
+
+ template <class Self, class Seq>
+ struct result< Self(Seq) >
+ : mpl::identity<long>
+ { };
+
+ template <typename Seq>
+ long operator()(Seq const& seq) const
+ {
+ long state = 0;
+ return fusion::fold(seq, state, fold_op());
+ }
+
+ template < typename Seq >
+ long operator()(Seq const& seq)
+ {
+ long state = 100;
+ return fusion::fold(seq, state, fold_op());
+ }
+
+ private:
+
+ struct fold_op
+ {
+ typedef long result_type;
+
+ template <typename T>
+ long operator()(T const& elem, long value) const
+ {
+ return value + sizeof(T) * elem;
+ }
+
+ template <typename T>
+ long operator()(T & elem, long value) const
+ {
+ elem += sizeof(T);
+ return value;
+ }
+ };
+};
+
+void result_type_tests()
+{
+ using boost::is_same;
+
+ typedef fusion::unfused_typed< test_func<>, types0 > t0;
+ BOOST_TEST(( is_same< boost::result_of< t0 () >::type, long >::value ));
+ typedef fusion::unfused_typed< test_func<>, types1 > t1;
+ BOOST_TEST(( is_same< boost::result_of< t1 (int) >::type, long >::value ));
+}
+
+#if defined(BOOST_MSVC) && BOOST_MSVC < 1400
+# define BOOST_TEST_NO_VC71(cond) (void)((cond)?0:1)
+#else
+# define BOOST_TEST_NO_VC71(cond) BOOST_TEST(cond)
+#endif
+
+void nullary_tests()
+{
+ test_func<noncopyable> f;
+ fusion::unfused_typed< test_func<>, types0 > unfused_func;
+ fusion::unfused_typed< test_func<noncopyable>&, types0 > unfused_func_ref(f);
+ fusion::unfused_typed< test_func<> const, types0 > unfused_func_c;
+ fusion::unfused_typed< test_func<>, types0 > const unfused_func_c2;
+ fusion::unfused_typed< test_func<noncopyable> const&, types0 > unfused_func_c_ref(f);
+
+ BOOST_TEST(unfused_func() == 100);
+ BOOST_TEST(unfused_func_ref() == 100);
+ BOOST_TEST(unfused_func_c() == 0);
+ BOOST_TEST(unfused_func_c2() == 0);
+ BOOST_TEST(unfused_func_c_ref() == 0);
+}
+
+void unary_tests()
+{
+ test_func<noncopyable> f;
+ fusion::unfused_typed< test_func<>, types1 > unfused_func;
+ fusion::unfused_typed< test_func<noncopyable>&, types1 > unfused_func_ref(f);
+ fusion::unfused_typed< test_func<> const, types1 > unfused_func_c;
+ fusion::unfused_typed< test_func<>, types1 > const unfused_func_c2;
+ fusion::unfused_typed< test_func<noncopyable> const&, types1 > unfused_func_c_ref(f);
+
+ long lvalue = 1;
+ BOOST_TEST_NO_VC71(unfused_func(lvalue) == 100);
+ BOOST_TEST(lvalue == 1 + 1*sizeof(lvalue));
+ BOOST_TEST(unfused_func_ref(lvalue) == 100);
+ BOOST_TEST(lvalue == 1 + 2*sizeof(lvalue));
+ BOOST_TEST(unfused_func_c(lvalue) == 0);
+ BOOST_TEST(lvalue == 1 + 3*sizeof(lvalue));
+ BOOST_TEST(unfused_func_c2(lvalue) == 0);
+ BOOST_TEST(lvalue == 1 + 4*sizeof(lvalue));
+ BOOST_TEST(unfused_func_c_ref(lvalue) == 0);
+ BOOST_TEST(lvalue == 1 + 5*sizeof(lvalue));
+}
+
+void ternary_tests()
+{
+ test_func<noncopyable> f;
+ fusion::unfused_typed< test_func<>, types3 > unfused_func;
+ fusion::unfused_typed< test_func<noncopyable>&, types3 > unfused_func_ref(f);
+ fusion::unfused_typed< test_func<> const, types3 > unfused_func_c;
+ fusion::unfused_typed< test_func<>, types3 > const unfused_func_c2;
+ fusion::unfused_typed< test_func<noncopyable> const&, types3 > unfused_func_c_ref(f);
+
+ long lvalue = 1;
+ static const long expected = 2*sizeof(int) + 7*sizeof(char);
+ BOOST_TEST_NO_VC71(unfused_func(lvalue,2,'\007') == 100 + expected);
+ BOOST_TEST(lvalue == 1 + 1*sizeof(lvalue));
+ BOOST_TEST(unfused_func_ref(lvalue,2,'\007') == 100 + expected);
+ BOOST_TEST(lvalue == 1 + 2*sizeof(lvalue));
+ BOOST_TEST(unfused_func_c(lvalue,2,'\007') == 0 + expected);
+ BOOST_TEST(lvalue == 1 + 3*sizeof(lvalue));
+ BOOST_TEST(unfused_func_c2(lvalue,2,'\007') == 0 + expected);
+ BOOST_TEST(lvalue == 1 + 4*sizeof(lvalue));
+ BOOST_TEST(unfused_func_c_ref(lvalue,2,'\007') == 0 + expected);
+ BOOST_TEST(lvalue == 1 + 5*sizeof(lvalue));
+}
+
+int main()
+{
+ result_type_tests();
+ nullary_tests();
+ unary_tests();
+ ternary_tests();
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/adapt_assoc_struct.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/adapt_assoc_struct.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,137 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2007 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/algorithm/transformation/erase_key.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/support/is_view.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ struct x_member;
+ struct y_member;
+ struct z_member;
+
+ struct point
+ {
+ int x;
+ int y;
+ };
+}
+
+BOOST_FUSION_ADAPT_ASSOC_STRUCT(
+ ns::point,
+ (int, x, ns::x_member)
+ (int, y, ns::y_member)
+)
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>));
+ ns::point p = {123, 456};
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<ns::point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<ns::point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ fusion::vector<int, float> v1(4, 2);
+ ns::point v2 = {5, 3};
+ fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from ns::point to vector
+ ns::point p = {5, 3};
+ fusion::vector<int, short> v(sequence_assign(p));
+ v = p;
+ }
+
+ {
+ // conversion from ns::point to list
+ ns::point p = {5, 3};
+ fusion::list<int, short> l(sequence_assign(p));
+ l = p;
+ }
+
+ {
+ // assoc stuff
+ BOOST_MPL_ASSERT((fusion::result_of::has_key<ns::point, ns::x_member>));
+ BOOST_MPL_ASSERT((fusion::result_of::has_key<ns::point, ns::y_member>));
+ BOOST_MPL_ASSERT((mpl::not_<fusion::result_of::has_key<ns::point, ns::z_member> >));
+
+ BOOST_MPL_ASSERT(( boost::is_same<fusion::result_of::value_at_key<ns::point, ns::x_member>::type, int> ));
+ BOOST_MPL_ASSERT(( boost::is_same<fusion::result_of::value_at_key<ns::point, ns::y_member>::type, int> ));
+
+ ns::point p = {5, 3};
+
+ BOOST_TEST(at_key<ns::x_member>(p) == 5);
+ BOOST_TEST(at_key<ns::y_member>(p) == 3);
+
+ erase_key<ns::x_member>(p);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/adapt_struct.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/adapt_struct.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,122 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/struct/adapt_struct.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/support/is_view.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/static_assert.hpp>
+
+#include <iostream>
+#include <string>
+
+namespace ns
+{
+ struct point
+ {
+ int x;
+ int y;
+ };
+}
+
+BOOST_FUSION_ADAPT_STRUCT(
+ ns::point,
+ (int, x)
+ (int, y)
+)
+
+struct s { int m; };
+BOOST_FUSION_ADAPT_STRUCT(s, (int, m))
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ BOOST_MPL_ASSERT_NOT((traits::is_view<ns::point>));
+ ns::point p = {123, 456};
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, 456));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = 9;
+ BOOST_TEST(p == make_vector(6, 9));
+
+ BOOST_STATIC_ASSERT(result_of::size<ns::point>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<ns::point>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == 9);
+ }
+
+ {
+ fusion::vector<int, float> v1(4, 2);
+ ns::point v2 = {5, 3};
+ fusion::vector<long, double> v3(5, 4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from ns::point to vector
+ ns::point p = {5, 3};
+ fusion::vector<int, short> v(sequence_assign(p));
+ v = p;
+ }
+
+ {
+ // conversion from ns::point to list
+ ns::point p = {5, 3};
+ fusion::list<int, short> l(sequence_assign(p));
+ l = p;
+ }
+
+ { // begin/end
+ using namespace boost::fusion;
+ using boost::is_same;
+
+ typedef result_of::begin<s>::type b;
+ typedef result_of::end<s>::type e;
+ // this fails
+ BOOST_MPL_ASSERT((is_same<result_of::next<b>::type, e>));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/array.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/array.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,41 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/fusion/adapted/array.hpp>
+#include <boost/array.hpp>
+
+#include <boost/fusion/sequence/intrinsic.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/fusion/iterator.hpp>
+
+#include <boost/mpl/assert.hpp>
+
+int main()
+{
+ using namespace boost::fusion;
+ typedef boost::array<int,3> array_type;
+
+ BOOST_MPL_ASSERT((traits::is_sequence<array_type>));
+ BOOST_MPL_ASSERT_NOT((traits::is_view<array_type>));
+
+ array_type arr = {{1,2,3}};
+
+ BOOST_TEST(*begin(arr) == 1);
+ BOOST_TEST(*next(begin(arr)) == 2);
+ BOOST_TEST(*advance_c<2>(begin(arr)) == 3);
+ BOOST_TEST(prior(next(begin(arr))) == begin(arr));
+ BOOST_TEST(*prior(end(arr)) == 3);
+ BOOST_TEST(at_c<2>(arr) == 3);
+ BOOST_TEST(size(arr) == 3);
+ BOOST_TEST(distance(begin(arr), end(arr)) == 3);
+
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_list.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_list.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,53 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+#include <boost/fusion/container/list/convert.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ vector<> empty;
+ std::cout << as_list(make_vector(1, 1.23, "harru")) << std::endl;
+ std::cout << as_list(push_back(empty, 999)) << std::endl;
+
+ BOOST_TEST(as_list(make_vector(1, 1.23, "harru")) == make_vector(1, 1.23, std::string("harru")));
+ BOOST_TEST(as_list(push_back(empty, 999)) == push_back(empty, 999));
+ }
+
+ {
+ std::cout << as_list(mpl::vector_c<int, 1, 2, 3, 4, 5>()) << std::endl;
+ BOOST_TEST((as_list(mpl::vector_c<int, 1, 2, 3, 4, 5>())
+ == mpl::vector_c<int, 1, 2, 3, 4, 5>()));
+ }
+
+ {
+ // test conversion
+ list<int, std::string> l(sequence_assign(make_vector(123, "harru")));
+ BOOST_TEST(l == make_vector(123, "harru"));
+ l = (make_vector(235, "hola")); // test assign
+ BOOST_TEST(l == make_vector(235, "hola"));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_map.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_map.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+#include <boost/fusion/container/map/convert.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/support/pair.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ vector<> empty;
+ std::cout << as_map(make_list(make_pair<int>('X'), make_pair<double>("Men"))) << std::endl;
+ std::cout << as_map(push_back(empty, make_pair<int>(999))) << std::endl;
+ }
+
+ {
+ typedef pair<int, char> p1;
+ typedef pair<double, std::string> p2;
+ result_of::as_map<list<p1, p2> >::type map(make_pair<int>('X'), make_pair<double>("Men"));
+ std::cout << at_key<int>(map) << std::endl;
+ std::cout << at_key<double>(map) << std::endl;
+ BOOST_TEST(at_key<int>(map) == 'X');
+ BOOST_TEST(at_key<double>(map) == "Men");
+ }
+
+ {
+ // test conversion
+ typedef map<
+ pair<int, char>
+ , pair<double, std::string> >
+ map_type;
+
+ map_type m(sequence_assign(make_vector(make_pair<int>('X'), make_pair<double>("Men"))));
+ BOOST_TEST(as_vector(m) == make_vector(make_pair<int>('X'), make_pair<double>("Men")));
+ m = (make_vector(make_pair<int>('X'), make_pair<double>("Men"))); // test assign
+ BOOST_TEST(as_vector(m) == make_vector(make_pair<int>('X'), make_pair<double>("Men")));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_set.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+#include <boost/fusion/container/set/convert.hpp>
+#include <boost/fusion/container/list/convert.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ vector<> empty;
+ std::cout << as_set(make_list(1, 1.23, "harru")) << std::endl;
+ std::cout << as_set(push_back(empty, 999)) << std::endl;
+
+ BOOST_TEST(as_list(as_set(make_list(1, 1.23, "harru")))
+ == make_list(1, 1.23, std::string("harru")));
+ BOOST_TEST(as_list(as_set(push_back(empty, 999)))
+ == push_back(empty, 999));
+ }
+
+ {
+ result_of::as_set<list<int, double, std::string> >::type set(1, 1.23, "harru");
+ std::cout << at_key<int>(set) << std::endl;
+ BOOST_TEST(at_key<int>(set) == 1);
+ }
+
+ {
+ std::cout << as_set(mpl::vector_c<int, 1, 2, 3, 4, 5>()) << std::endl;
+ BOOST_TEST((as_list(as_set(mpl::vector_c<int, 1, 2, 3, 4, 5>()))
+ == mpl::vector_c<int, 1, 2, 3, 4, 5>()));
+ }
+
+ {
+ // test conversion
+ set<int, std::string> s(sequence_assign(make_vector(123, "harru")));
+ BOOST_TEST(as_vector(s) == make_vector(123, "harru"));
+ s = (make_vector(235, "hola")); // test assign
+ BOOST_TEST(as_vector(s) == make_vector(235, "hola"));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_vector.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/as_vector.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,54 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ vector<> empty;
+ std::cout << as_vector(make_list(1, 1.23, "harru")) << std::endl;
+ std::cout << as_vector(push_back(empty, 999)) << std::endl;
+
+ BOOST_TEST(as_vector(make_list(1, 1.23, "harru")) == make_list(1, 1.23, std::string("harru")));
+ BOOST_TEST(as_vector(push_back(empty, 999)) == push_back(empty, 999));
+ }
+
+ {
+ std::cout << as_vector(mpl::vector_c<int, 1, 2, 3, 4, 5>()) << std::endl;
+ BOOST_TEST((as_vector(mpl::vector_c<int, 1, 2, 3, 4, 5>())
+ == mpl::vector_c<int, 1, 2, 3, 4, 5>()));
+ }
+
+ {
+ // test conversion
+ vector<int, std::string> v(sequence_assign(make_list(123, "harru")));
+ BOOST_TEST(v == make_list(123, "harru"));
+ v = (make_list(235, "hola")); // test assign
+ BOOST_TEST(v == make_list(235, "hola"));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/boost_tuple.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/boost_tuple.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,90 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/boost_tuple.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/support/is_view.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/mpl/assert.hpp>
+#include <iostream>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ typedef boost::tuple<int, std::string> tuple_type;
+ BOOST_MPL_ASSERT_NOT((traits::is_view<tuple_type>));
+ tuple_type t(123, "Hola!!!");
+
+ std::cout << at_c<0>(t) << std::endl;
+ std::cout << at_c<1>(t) << std::endl;
+ std::cout << t << std::endl;
+ BOOST_TEST(t == make_vector(123, "Hola!!!"));
+
+ at_c<0>(t) = 6;
+ at_c<1>(t) = "mama mia";
+ BOOST_TEST(t == make_vector(6, "mama mia"));
+
+ BOOST_STATIC_ASSERT(result_of::size<tuple_type>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<tuple_type>::value);
+
+ BOOST_TEST(front(t) == 6);
+ }
+
+ {
+ fusion::vector<int, float> v1(4, 3.3f);
+ boost::tuple<short, float> v2(5, 3.3f);
+ fusion::vector<long, double> v3(5, 4.4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from boost tuple to vector
+ fusion::vector<int, std::string> v(sequence_assign(tuples::make_tuple(123, "Hola!!!")));
+ v = tuples::make_tuple(123, "Hola!!!");
+ }
+
+ {
+ // conversion from boost tuple to list
+ fusion::list<int, std::string> l(sequence_assign(tuples::make_tuple(123, "Hola!!!")));
+ l = tuples::make_tuple(123, "Hola!!!");
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/comparison.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/comparison.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,57 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/comparison.hpp>
+
+void
+equality_test()
+{
+ using namespace boost::fusion;
+
+ FUSION_SEQUENCE<int, char> v1(5, 'a');
+ FUSION_SEQUENCE<int, char> v2(5, 'a');
+ BOOST_TEST(v1 == v2);
+
+ FUSION_SEQUENCE<int, char> v3(5, 'b');
+ FUSION_SEQUENCE<int, char> t4(2, 'a');
+ BOOST_TEST(v1 != v3);
+ BOOST_TEST(v1 != t4);
+ BOOST_TEST(!(v1 != v2));
+
+ FUSION_SEQUENCE<int, char, bool> v5(5, 'a', true);
+ BOOST_TEST(v1 != v5);
+ BOOST_TEST(!(v1 == v5));
+ BOOST_TEST(v5 != v1);
+ BOOST_TEST(!(v5 == v1));
+}
+
+void
+ordering_test()
+{
+ using namespace boost::fusion;
+
+ FUSION_SEQUENCE<int, float> v1(4, 3.3f);
+ FUSION_SEQUENCE<short, float> v2(5, 3.3f);
+ FUSION_SEQUENCE<long, double> v3(5, 4.4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+
+#if defined(FUSION_TEST_FAIL)
+ FUSION_SEQUENCE<int, char, bool> v5(5, 'a', true);
+ v1 >= v5;
+#endif
+}
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/cons.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/cons.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,87 @@
+/*=============================================================================
+ Copyright (c) 2005 Joel de Guzman
+ Copyright (c) 2005 Eric Niebler
+
+ 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)
+==============================================================================*/
+#include <string>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+#include <boost/fusion/container/generation/make_cons.hpp>
+#include <boost/fusion/container/generation/cons_tie.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/lambda/lambda.hpp>
+#include <boost/fusion/algorithm/iteration/for_each.hpp>
+#include <boost/fusion/algorithm/transformation/filter_if.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/mpl/lambda.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using boost::is_same;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing cons
+
+ {
+ std::string hello("hello");
+ cons<int, cons<std::string> > ns =
+ make_cons(1, make_cons(hello));
+
+ BOOST_TEST((*begin(ns) == 1));
+ BOOST_TEST((*boost::fusion::next(begin(ns)) == hello));
+
+ *begin(ns) += 1;
+ *boost::fusion::next(begin(ns)) += ' ';
+
+ BOOST_TEST((*begin(ns) == 2));
+ BOOST_TEST((*boost::fusion::next(begin(ns)) == hello + ' '));
+
+ for_each(ns, boost::lambda::_1 += ' ');
+
+ BOOST_TEST((*begin(ns) == 2 + ' '));
+ BOOST_TEST((*boost::fusion::next(begin(ns)) == hello + ' ' + ' '));
+ }
+
+ {
+ BOOST_TEST(
+ make_cons("hello") == make_vector(std::string("hello"))
+ );
+
+ BOOST_TEST(
+ make_cons(123, make_cons("hello")) ==
+ make_vector(123, std::string("hello"))
+ );
+ }
+
+ {
+ vector<int, float> t(1, 1.1f);
+ cons<int, cons<float> > nf =
+ make_cons(1, make_cons(1.1f));
+
+ BOOST_TEST((t == nf));
+ BOOST_TEST((vector<int>(1) == filter_if<is_same<boost::mpl::_, int> >(nf)));
+
+ std::cout << nf << std::endl;
+ std::cout << filter_if<is_same<boost::mpl::_, int> >(nf) << std::endl;
+ }
+
+ {
+ int i = 3;
+ cons<int&> tie(cons_tie(i));
+ BOOST_TEST((*begin(tie) == 3));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/construction.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/construction.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,119 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/container/list/cons.hpp>
+
+#if !defined(FUSION_AT)
+#define FUSION_AT at_c
+#endif
+
+namespace test_detail
+{
+ // something to prevent warnings for unused variables
+ template<class T> void dummy(const T&) {}
+
+ // no public default constructor
+ class foo
+ {
+ public:
+
+ explicit foo(int v) : val(v) {}
+
+ bool operator==(const foo& other) const
+ {
+ return val == other.val;
+ }
+
+ private:
+
+ foo() {}
+ int val;
+ };
+
+ // another class without a public default constructor
+ class no_def_constructor
+ {
+ no_def_constructor() {}
+
+ public:
+
+ no_def_constructor(std::string) {}
+ };
+}
+
+inline void
+test()
+{
+ using namespace boost::fusion;
+ using namespace test_detail;
+
+ nil empty;
+
+ FUSION_SEQUENCE<> empty0;
+
+#ifndef TR1_TUPLE_TEST
+ FUSION_SEQUENCE<> empty1(sequence_assign(empty));
+#endif
+
+ FUSION_SEQUENCE<int> t1;
+ BOOST_TEST(FUSION_AT<0>(t1) == int());
+
+ FUSION_SEQUENCE<float> t2(5.5f);
+ BOOST_TEST(FUSION_AT<0>(t2) > 5.4f && FUSION_AT<0>(t2) < 5.6f);
+
+ FUSION_SEQUENCE<foo> t3(foo(12));
+ BOOST_TEST(FUSION_AT<0>(t3) == foo(12));
+
+ FUSION_SEQUENCE<double> t4(sequence_assign(t2));
+ BOOST_TEST(FUSION_AT<0>(t4) > 5.4 && FUSION_AT<0>(t4) < 5.6);
+
+ FUSION_SEQUENCE<int, float> t5;
+ BOOST_TEST(FUSION_AT<0>(t5) == int());
+ BOOST_TEST(FUSION_AT<1>(t5) == float());
+
+ FUSION_SEQUENCE<int, float> t6(12, 5.5f);
+ BOOST_TEST(FUSION_AT<0>(t6) == 12);
+ BOOST_TEST(FUSION_AT<1>(t6) > 5.4f && FUSION_AT<1>(t6) < 5.6f);
+
+ FUSION_SEQUENCE<int, float> t7(t6);
+ BOOST_TEST(FUSION_AT<0>(t7) == 12);
+ BOOST_TEST(FUSION_AT<1>(t7) > 5.4f && FUSION_AT<1>(t7) < 5.6f);
+
+ FUSION_SEQUENCE<long, double> t8(sequence_assign(t6));
+ BOOST_TEST(FUSION_AT<0>(t8) == 12);
+ BOOST_TEST(FUSION_AT<1>(t8) > 5.4f && FUSION_AT<1>(t8) < 5.6f);
+
+ dummy
+ (
+ FUSION_SEQUENCE<no_def_constructor, no_def_constructor, no_def_constructor>(
+ std::string("Jaba"), // ok, since the default
+ std::string("Daba"), // constructor is not used
+ std::string("Doo")
+ )
+ );
+
+ dummy(FUSION_SEQUENCE<int, double>());
+ dummy(FUSION_SEQUENCE<int, double>(1,3.14));
+
+#if defined(FUSION_TEST_FAIL)
+ dummy(FUSION_SEQUENCE<double&>()); // should fail, no defaults for references
+ dummy(FUSION_SEQUENCE<const double&>()); // likewise
+#endif
+
+ {
+ double dd = 5;
+ dummy(FUSION_SEQUENCE<double&>(dd)); // ok
+ dummy(FUSION_SEQUENCE<const double&>(dd+3.14)); // ok, but dangerous
+ }
+
+#if defined(FUSION_TEST_FAIL)
+ dummy(FUSION_SEQUENCE<double&>(dd+3.14)); // should fail,
+ // temporary to non-const reference
+#endif
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/copy.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/copy.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,98 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/mpl.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/mpl/insert_range.hpp>
+#include <boost/mpl/vector.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/equal.hpp>
+#include <boost/static_assert.hpp>
+
+#if !defined(FUSION_AT)
+#define FUSION_AT at_c
+#endif
+
+#if !defined(FUSION_MAKE)
+#define FUSION_MAKE BOOST_PP_CAT(make_, FUSION_SEQUENCE)
+#endif
+
+#if !defined(FUSION_TIE)
+#define FUSION_TIE BOOST_PP_CAT(FUSION_SEQUENCE, _tie)
+#endif
+
+namespace test_detail
+{
+ // classes with different kinds of conversions
+ class AA {};
+ class BB : public AA {};
+ struct CC { CC() {} CC(const BB&) {} };
+ struct DD { operator CC() const { return CC(); }; };
+}
+
+boost::fusion::FUSION_SEQUENCE<double, double, double, double>
+foo(int i)
+{
+ return sequence_assign(boost::fusion::FUSION_MAKE(i, i+1, i+2, i+3));
+}
+
+void test_mpl()
+{
+ using namespace boost::fusion;
+
+ typedef FUSION_SEQUENCE<int, char> seq;
+
+ typedef
+ boost::mpl::insert_range<
+ boost::mpl::vector<>
+ , boost::mpl::end< boost::mpl::vector<> >::type
+ , seq
+ >::type
+ sequence;
+
+ typedef boost::mpl::equal<sequence, boost::mpl::vector<int, char> > equal;
+ BOOST_STATIC_ASSERT(equal::value);
+}
+
+void
+test()
+{
+ using namespace boost::fusion;
+ using namespace test_detail;
+
+ FUSION_SEQUENCE<int, char> t1(4, 'a');
+ FUSION_SEQUENCE<int, char> t2(5, 'b');
+ t2 = t1;
+ BOOST_TEST(FUSION_AT<0>(t1) == FUSION_AT<0>(t2));
+ BOOST_TEST(FUSION_AT<1>(t1) == FUSION_AT<1>(t2));
+
+ FUSION_SEQUENCE<long, std::string> t3(2, "a");
+ t3 = t1;
+ BOOST_TEST((double)FUSION_AT<0>(t1) == FUSION_AT<0>(t3));
+ BOOST_TEST(FUSION_AT<1>(t1) == FUSION_AT<1>(t3)[0]);
+
+ // testing copy and assignment with implicit conversions
+ // between elements testing tie
+
+ FUSION_SEQUENCE<char, BB*, BB, DD> t;
+ FUSION_SEQUENCE<int, AA*, CC, CC> a(sequence_assign(t));
+ a = t;
+
+ int i; char c; double d;
+ FUSION_TIE(i, c, d) = FUSION_MAKE(1, 'a', 5.5);
+
+ BOOST_TEST(i==1);
+ BOOST_TEST(c=='a');
+ BOOST_TEST(d>5.4 && d<5.6);
+
+ // returning a tuple with conversion
+ foo(2);
+
+ test_mpl();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/deduce_sequence.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/deduce_sequence.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,94 @@
+/*=============================================================================
+ Copyright (c) 2007 Tobias Schwinger
+
+ Use modification and distribution are subject to 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).
+==============================================================================*/
+
+#include <boost/fusion/support/deduce_sequence.hpp>
+#include <boost/fusion/mpl.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/config.hpp>
+#include <boost/mpl/equal.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/ref.hpp>
+
+using boost::reference_wrapper;
+using boost::fusion::traits::deduce;
+using boost::fusion::traits::deduce_sequence;
+
+namespace fusion = boost::fusion;
+
+template <class Args>
+struct test_seq_ctor
+{
+ typename deduce_sequence<Args>::type fsq_args;
+
+ test_seq_ctor(Args const& args)
+ : fsq_args(sequence_assign(args))
+ {}
+};
+
+#define TEST_SAME_TYPE(a,b) BOOST_STATIC_ASSERT(( boost::is_same< a, b >::value ))
+#define TEST_SAME_ELEMENTS(a,b) BOOST_STATIC_ASSERT(( boost::mpl::equal< a, b >::type::value ))
+
+typedef fusion::vector<int, int const, int &, int const&> args1;
+#ifdef BOOST_NO_RVALUE_REFERENCES
+typedef fusion::vector<int, int, int &, int> storable1;
+#else
+typedef fusion::vector<int, int, int &, int const&> storable1;
+#endif
+template struct test_seq_ctor<args1>;
+
+typedef fusion::vector< reference_wrapper<int>&, reference_wrapper<int const>&,
+ reference_wrapper<int> const&, reference_wrapper<int const> const& > args2;
+typedef fusion::vector<int &, int const&, int &, int const&> storable2;
+template struct test_seq_ctor<args2>;
+
+
+typedef fusion::vector<int *, int const *, int const * const, int const * &, int const * const&> args3;
+#ifdef BOOST_NO_RVALUE_REFERENCES
+typedef fusion::vector<int *, int const *, int const *, int const * &, int const * > storable3;
+#else
+typedef fusion::vector<int *, int const *, int const *, int const * &, int const * const&> storable3;
+#endif
+template struct test_seq_ctor<args3>;
+
+typedef fusion::vector<int(&)[2], int const(&)[2]> args4;
+typedef args4 storable4;
+template struct test_seq_ctor<args4>;
+
+int main()
+{
+ TEST_SAME_TYPE(deduce<int &>::type, int &);
+ TEST_SAME_TYPE(deduce<int volatile &>::type, int volatile &);
+
+ //TODO rvalue tests
+ TEST_SAME_TYPE(deduce<int>::type, int);
+#ifdef BOOST_NO_RVALUE_REFERENCES
+ TEST_SAME_TYPE(deduce<int const&>::type, int);
+ TEST_SAME_TYPE(deduce<int const volatile&>::type, int);
+#else
+ TEST_SAME_TYPE(deduce<int const&>::type, int const&);
+ TEST_SAME_TYPE(deduce<int const volatile&>::type, int const volatile&);
+#endif
+
+ TEST_SAME_TYPE(deduce< reference_wrapper<int>& >::type, int &);
+ TEST_SAME_TYPE(deduce< reference_wrapper<int const>& >::type, int const&);
+ TEST_SAME_TYPE(deduce< reference_wrapper<int> const& >::type, int &);
+ TEST_SAME_TYPE(deduce< reference_wrapper<int const> const& >::type, int const&);
+
+ TEST_SAME_TYPE(deduce< int(&)[2] >::type, int(&)[2]);
+ TEST_SAME_TYPE(deduce< int const (&)[2] >::type, int const (&)[2]);
+ TEST_SAME_TYPE(deduce< int volatile (&)[2] >::type, int volatile (&)[2]);
+ TEST_SAME_TYPE(deduce< int const volatile (&)[2] >::type, int const volatile (&)[2]);
+
+ TEST_SAME_ELEMENTS(deduce_sequence<args1>::type,storable1);
+ TEST_SAME_ELEMENTS(deduce_sequence<args2>::type,storable2);
+ TEST_SAME_ELEMENTS(deduce_sequence<args3>::type,storable3);
+ TEST_SAME_ELEMENTS(deduce_sequence<args4>::type,storable4);
+
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/filter_view.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/filter_view.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,107 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/view/filter_view/filter_view.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/mpl/arg.hpp>
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/vector_c.hpp>
+#include <boost/mpl/less.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/assert.hpp>
+
+struct X
+{
+ operator char const*() const
+ {
+ return "<X-object>";
+ }
+};
+
+struct Y
+{
+ operator char const*() const
+ {
+ return "<Y-object>";
+ }
+};
+
+struct reject_all
+{
+ template<typename T>
+ struct apply : boost::mpl::false_
+ {};
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ using boost::mpl::int_;
+ using boost::mpl::_;
+ using boost::mpl::not_;
+ using boost::mpl::less;
+ using boost::mpl::vector_c;
+ using boost::is_class;
+ using boost::is_same;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ typedef vector<Y, char, long, X, bool, double> vector_type;
+
+ X x; Y y;
+ vector_type v(y, '@', 987654, x, true, 6.6);
+ typedef filter_view<vector_type const, not_<is_class<_> > > filter_view_type;
+ filter_view_type view(v);
+ std::cout << view << std::endl;
+ BOOST_TEST((view == make_vector('@', 987654, true, 6.6)));
+ BOOST_STATIC_ASSERT(result_of::size<filter_view_type>::value == 4);
+ }
+
+ {
+ // $$$ JDG $$$ For some obscure reason, EDG based compilers
+ // (e.g. comeau 4.3.3, intel) have problems with this.
+ // vc7.1 and g++ are ok. The errors from comeau are useless.
+
+#ifndef __EDG_VERSION__
+ typedef vector_c<int, 5, 1, 2, 3, 6, 0, -1> vector_type;
+ typedef filter_view<vector_type const, less<_, int_<3> > > filter_view_type;
+ vector_type v;
+ filter_view_type view(v);
+ std::cout << view << std::endl;
+ BOOST_TEST((view == make_vector(1, 2, 0, -1)));
+ BOOST_STATIC_ASSERT(result_of::size<filter_view_type>::value == 4);
+#endif
+ }
+
+ {
+ // Previous filtering out all values caused problems as begin<seq> was not equal to end<seq>
+ // Picked up by Andreas Pokorny
+ typedef vector<int> vec;
+ typedef filter_view<vec, reject_all> filter_view_type;
+
+ BOOST_MPL_ASSERT((result_of::equal_to<result_of::begin<filter_view_type>::type, result_of::end<filter_view_type>::type>));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/io.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/io.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,116 @@
+/*=============================================================================
+ Copyright (C) 1999-2003 Jaakko Jarvi
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/io/in.hpp>
+
+#include <fstream>
+#include <iterator>
+#include <algorithm>
+#include <string>
+
+#if defined BOOST_NO_STRINGSTREAM
+# include <strstream>
+#else
+# include <sstream>
+#endif
+
+using boost::fusion::vector;
+using boost::fusion::make_vector;
+using boost::fusion::tuple_close;
+using boost::fusion::tuple_open;
+using boost::fusion::tuple_delimiter;
+
+#if defined BOOST_NO_STRINGSTREAM
+ using std::ostrstream;
+ using std::istrstream;
+ typedef ostrstream useThisOStringStream;
+ typedef istrstream useThisIStringStream;
+#else
+ using std::ostringstream;
+ using std::istringstream;
+ typedef ostringstream useThisOStringStream;
+ typedef istringstream useThisIStringStream;
+#endif
+
+using std::endl;
+using std::ofstream;
+using std::ifstream;
+using std::string;
+
+int
+main()
+{
+ using boost::fusion::tuple_close;
+ using boost::fusion::tuple_open;
+ using boost::fusion::tuple_delimiter;
+
+ useThisOStringStream os1;
+
+ // Set format [a, b, c] for os1
+ os1 << tuple_open('[');
+ os1 << tuple_close(']');
+ os1 << tuple_delimiter(',');
+ os1 << make_vector(1, 2, 3);
+
+ BOOST_TEST (os1.str() == std::string("[1,2,3]") );
+
+ {
+ useThisOStringStream os2;
+ // Set format (a:b:c) for os2;
+ os2 << tuple_open('(');
+ os2 << tuple_close(')');
+ os2 << tuple_delimiter(':');
+
+ os2 << make_vector("TUPU", "HUPU", "LUPU", 4.5);
+ BOOST_TEST (os2.str() == std::string("(TUPU:HUPU:LUPU:4.5)") );
+ }
+
+ // The format is still [a, b, c] for os1
+ os1 << make_vector(1, 2, 3);
+ BOOST_TEST (os1.str() == std::string("[1,2,3][1,2,3]") );
+
+ std::ofstream tmp("temp.tmp");
+
+ tmp << make_vector("One", "Two", 3);
+ tmp << tuple_delimiter(':');
+ tmp << make_vector(1000, 2000, 3000) << endl;
+
+ tmp.close();
+
+ // When reading tuples from a stream, manipulators must be set correctly:
+ ifstream tmp3("temp.tmp");
+ vector<string, string, int> j;
+
+ tmp3 >> j;
+ BOOST_TEST (tmp3.good() );
+
+ tmp3 >> tuple_delimiter(':');
+ vector<int, int, int> i;
+ tmp3 >> i;
+ BOOST_TEST (tmp3.good() );
+
+ tmp3.close();
+
+ // reading vector<int, int, int> in format (a b c);
+ useThisIStringStream is("(100 200 300)");
+
+ vector<int, int, int> ti;
+ BOOST_TEST(bool((is >> ti) != 0));
+ BOOST_TEST(ti == make_vector(100, 200, 300));
+
+ // Note that strings are problematic:
+ // writing a tuple on a stream and reading it back doesn't work in
+ // general. If this is wanted, some kind of a parseable string class
+ // should be used.
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/iterator.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/iterator.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,202 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <string>
+#include <boost/static_assert.hpp>
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/equal_to.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/value_of.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/end.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+
+void test()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+
+ { // Testing deref, next, prior, begin, end
+
+ char const* s = "Hello";
+ typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type;
+ seq_type v(1, 'x', 3.3, s);
+ result_of::begin<seq_type>::type i(begin(v));
+
+ BOOST_TEST(*i == 1);
+ BOOST_TEST(*next(i) == 'x');
+ BOOST_TEST(*next(next(i)) == 3.3);
+ BOOST_TEST(*next(next(next(i))) == s);
+ next(next(next(next(i)))); // end
+
+#if !defined(FUSION_NO_PRIOR)
+ BOOST_TEST(*prior(next(next(next(i)))) == 3.3);
+ BOOST_TEST(*prior(prior(next(next(next(i))))) == 'x');
+ BOOST_TEST(*prior(prior(prior(next(next(next(i)))))) == 1);
+#endif
+ BOOST_TEST(*begin(v) == 1);
+#if !defined(FUSION_NO_PRIOR)
+ BOOST_TEST(*prior(end(v)) == s);
+#endif
+
+ *i = 3;
+ BOOST_TEST(*i == 3);
+ BOOST_TEST(&*i == &deref(begin(v)));
+
+ // prove that it is mutable
+ *i = 987;
+ BOOST_TEST(*i == 987);
+ }
+
+ { // Testing const sequence and const iterator
+
+ char const* s = "Hello";
+ typedef FUSION_SEQUENCE<int, char, double, char const*> const seq_type;
+ seq_type t(1, 'x', 3.3, s);
+ result_of::begin<seq_type>::type i(begin(t));
+
+ BOOST_TEST(*i == 1);
+ BOOST_TEST(*next(i) == 'x');
+ BOOST_TEST(*begin(t) == 1);
+#if !defined(FUSION_NO_PRIOR)
+ BOOST_TEST(*prior(end(t)) == s);
+#endif
+
+#ifdef FUSION_TEST_FAIL
+ *i = 3; // must not compile
+#endif
+ }
+
+ { // Testing iterator equality
+
+ typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type;
+ typedef FUSION_SEQUENCE<int, char, double, char const*> const cseq_type;
+ typedef result_of::begin<seq_type>::type vi1;
+ typedef result_of::begin<cseq_type>::type vi2;
+ BOOST_STATIC_ASSERT((result_of::equal_to<vi1 const, vi1>::value));
+ BOOST_STATIC_ASSERT((result_of::equal_to<vi1, vi1 const>::value));
+ BOOST_STATIC_ASSERT((result_of::equal_to<vi1, vi2>::value));
+ BOOST_STATIC_ASSERT((result_of::equal_to<vi1 const, vi2>::value));
+ BOOST_STATIC_ASSERT((result_of::equal_to<vi1, vi2 const>::value));
+ BOOST_STATIC_ASSERT((result_of::equal_to<vi1 const, vi2 const>::value));
+ }
+
+ {
+ typedef FUSION_SEQUENCE<int, int> seq_type;
+ typedef result_of::begin<seq_type>::type begin_type;
+ typedef result_of::end<seq_type>::type end_type;
+ typedef result_of::next<begin_type>::type i1;
+ typedef result_of::next<i1>::type i2;
+
+ BOOST_STATIC_ASSERT((is_same<end_type, i2>::value));
+ }
+
+ { // testing deref, next, prior, begin, end
+
+ char const* s = "Hello";
+ typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type;
+ seq_type t(1, 'x', 3.3, s);
+ result_of::begin<seq_type>::type i(begin(t));
+
+ BOOST_TEST(*i == 1);
+ BOOST_TEST(*next(i) == 'x');
+ BOOST_TEST(*next(next(i)) == 3.3);
+ BOOST_TEST(*next(next(next(i))) == s);
+
+ next(next(next(next(i)))); // end
+
+#ifdef FUSION_TEST_FAIL
+ next(next(next(next(next(i))))); // past the end: must not compile
+#endif
+
+#if !defined(FUSION_NO_PRIOR)
+ BOOST_TEST(*prior(next(next(next(i)))) == 3.3);
+ BOOST_TEST(*prior(prior(next(next(next(i))))) == 'x');
+ BOOST_TEST(*prior(prior(prior(next(next(next(i)))))) == 1);
+#endif
+ BOOST_TEST(*begin(t) == 1);
+#if !defined(FUSION_NO_PRIOR)
+ BOOST_TEST(*prior(end(t)) == s);
+#endif
+
+ *i = 3;
+ BOOST_TEST(*i == 3);
+ BOOST_TEST(*i == *begin(t));
+ }
+
+ { // Testing distance
+
+ typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type;
+ seq_type t(1, 'x', 3.3, "Hello");
+
+ BOOST_STATIC_ASSERT((result_of::distance<
+ result_of::begin<seq_type>::type
+ , result_of::end<seq_type>::type >::value == 4));
+
+ BOOST_TEST(distance(begin(t), end(t)).value == 4);
+ }
+
+ { // Testing tuple iterator result_of::value_of, result_of::deref, result_of::value_at
+
+ typedef FUSION_SEQUENCE<int, char&> seq_type;
+ typedef result_of::begin<seq_type>::type i0;
+ typedef result_of::next<i0>::type i1;
+ typedef result_of::next<result_of::begin<const seq_type>::type>::type i2;
+
+//value_at<>/at<>/... are valid for lists and cons!
+//#ifndef FUSION_NO_RANDOM_ACCESS_SEQUENCE
+ BOOST_STATIC_ASSERT((
+ is_same<result_of::value_at_c<seq_type, 0>::type, int>::value));
+
+ BOOST_STATIC_ASSERT((
+ is_same<result_of::value_at_c<seq_type, 1>::type, char&>::value));
+//#endif
+
+ BOOST_STATIC_ASSERT((
+ is_same<traits::category_of<i0>::type, FUSION_TRAVERSAL_TAG>::value));
+
+ BOOST_STATIC_ASSERT((is_same<result_of::deref<i0>::type, int&>::value));
+ BOOST_STATIC_ASSERT((is_same<result_of::deref<i1>::type, char&>::value));
+
+ BOOST_STATIC_ASSERT((is_same<result_of::value_of<i0>::type, int>::value));
+ BOOST_STATIC_ASSERT((is_same<result_of::value_of<i1>::type, char&>::value));
+ }
+
+//#ifndef FUSION_NO_RANDOM_ACCESS_SEQUENCE
+ { // Testing advance
+
+ typedef FUSION_SEQUENCE<int, char, double, char const*> seq_type;
+ seq_type t(1, 'x', 3.3, "Hello");
+
+ BOOST_TEST(*advance_c<0>(begin(t)) == at_c<0>(t));
+ BOOST_TEST(*advance_c<1>(begin(t)) == at_c<1>(t));
+ BOOST_TEST(*advance_c<2>(begin(t)) == at_c<2>(t));
+ BOOST_TEST(*advance_c<3>(begin(t)) == at_c<3>(t));
+
+#if !defined(FUSION_NO_PRIOR)
+ BOOST_TEST(*advance_c<-1>(end(t)) == at_c<3>(t));
+ BOOST_TEST(*advance_c<-2>(end(t)) == at_c<2>(t));
+ BOOST_TEST(*advance_c<-3>(end(t)) == at_c<1>(t));
+ BOOST_TEST(*advance_c<-4>(end(t)) == at_c<0>(t));
+#endif
+
+ BOOST_TEST(&*advance_c<0>(begin(t)) == &at_c<0>(t));
+ BOOST_TEST(&*advance_c<1>(begin(t)) == &at_c<1>(t));
+ BOOST_TEST(&*advance_c<2>(begin(t)) == &at_c<2>(t));
+ BOOST_TEST(&*advance_c<3>(begin(t)) == &at_c<3>(t));
+ }
+//#endif
+}
+
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/iterator_range.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/iterator_range.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,83 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/view/iterator_range/iterator_range.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+
+#include <boost/mpl/vector_c.hpp>
+#include <boost/mpl/begin.hpp>
+#include <boost/mpl/next.hpp>
+#include <boost/static_assert.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ char const* s = "Ruby";
+ typedef vector<int, char, double, char const*> vector_type;
+ vector_type vec(1, 'x', 3.3, s);
+
+ {
+ typedef result_of::next<result_of::begin<vector_type>::type>::type i1t;
+ typedef result_of::prior<result_of::end<vector_type>::type>::type i3t;
+
+ i1t i1(next(begin(vec)));
+ i3t i3(prior(end(vec)));
+
+ typedef iterator_range<i1t, i3t> slice_t;
+ slice_t slice(i1, i3);
+ std::cout << slice << std::endl;
+ BOOST_TEST((slice == make_vector('x', 3.3)));
+ BOOST_STATIC_ASSERT(result_of::size<slice_t>::value == 2);
+ }
+
+ {
+ typedef result_of::begin<vector_type>::type i1t;
+ typedef result_of::begin<vector_type>::type i3t;
+
+ i1t i1(begin(vec));
+ i3t i3(begin(vec));
+
+ typedef iterator_range<i1t, i3t> slice_t;
+ slice_t slice(i1, i3);
+ std::cout << slice << std::endl;
+ BOOST_TEST(slice == make_vector());
+ BOOST_STATIC_ASSERT(result_of::size<slice_t>::value == 0);
+ }
+ }
+
+ {
+ typedef boost::mpl::vector_c<int, 2, 3, 4, 5, 6> mpl_vec;
+ typedef boost::mpl::begin<mpl_vec>::type it0;
+ typedef boost::mpl::next<it0>::type it1;
+ typedef boost::mpl::next<it1>::type it2;
+ typedef boost::mpl::next<it2>::type it3;
+
+ it1 f;
+ it3 l;
+
+ typedef iterator_range<it1, it3> slice_t;
+ slice_t slice(f, l);
+ std::cout << slice << std::endl;
+ BOOST_TEST((slice == make_vector(3, 4)));
+ BOOST_STATIC_ASSERT(result_of::size<slice_t>::value == 2);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/joint_view.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/joint_view.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,145 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/view/joint_view/joint_view.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+struct X
+{
+ operator char const*() const
+ {
+ return "<X-object>";
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing joint_view
+
+ {
+ vector<int> t1(3);
+ vector<X> t2;
+ typedef joint_view<vector<int>, vector<X> > view_type;
+ view_type view(t1, t2);
+
+ std::cout << view << std::endl;
+ BOOST_TEST((view == make_vector(3, X())));
+ }
+
+ {
+ vector<int, char> t1(3, 'x');
+ vector<X> t2;
+ typedef joint_view<vector<int, char>, vector<X> > view_type;
+ view_type view(t1, t2);
+ std::cout << view << std::endl;
+ BOOST_TEST((view == make_vector(3, 'x', X())));
+
+ *begin(view) = 4;
+ BOOST_TEST(at_c<0>(t1) == 4);
+ }
+
+ {
+ vector<int, char> t1(3, 'x');
+ vector<X, int> t2;
+ typedef joint_view<vector<int, char>, vector<X, int> > view_type;
+ view_type view(t1, t2);
+ std::cout << view << std::endl;
+ BOOST_TEST((view == make_vector(3, 'x', X(), 0)));
+ }
+
+ {
+ typedef vector<int> t1_type;
+ t1_type t1(777);
+ typedef vector<int, char, double> t2_type;
+ t2_type t2(1, 'x', 3.3);
+
+ {
+ typedef joint_view<t1_type, t2_type> view_type;
+ view_type view(t1, t2);
+ std::cout << view << std::endl;
+ BOOST_TEST((view == make_vector(777, 1, 'x', 3.3)));
+ }
+
+ {
+ typedef joint_view<t2_type, t1_type> view_type;
+ view_type view(t2, t1);
+ std::cout << view << std::endl;
+ BOOST_TEST((view == make_vector(1, 'x', 3.3, 777)));
+ }
+
+ {
+ typedef joint_view<t2_type, t1_type> jv_type;
+ typedef joint_view<jv_type, jv_type> jv2_type;
+
+ jv_type jv(t2, t1);
+ jv2_type jv2(jv, jv);
+
+ std::cout << jv << std::endl;
+ std::cout << jv2 << std::endl;
+
+ BOOST_TEST(jv2
+ == make_vector(1, 'x', 3.3, 777, 1, 'x', 3.3, 777));
+ }
+
+ {
+ typedef joint_view<t2_type, t1_type> jt_type;
+ typedef joint_view<t1_type, t2_type> jv2_type;
+ typedef joint_view<jt_type, jv2_type> jv3_type;
+
+ jt_type jt(t2, t1);
+ jv2_type jv2(t1, t2);
+ jv3_type jv3(jt, jv2);
+
+ std::cout << jt << std::endl;
+ std::cout << jv2 << std::endl;
+ std::cout << jv3 << std::endl;
+
+ BOOST_TEST(jv3
+ == make_vector(1, 'x', 3.3, 777, 777, 1, 'x', 3.3));
+ }
+
+ {
+ typedef joint_view<vector<>, t1_type> jt_type;
+ vector<> empty;
+ jt_type jt(empty, t1);
+ std::cout << jt << std::endl;
+ BOOST_TEST(jt == make_vector(777));
+ }
+
+ {
+ typedef joint_view<t1_type, vector<> > jt_type;
+ vector<> empty;
+ jt_type jt(t1, empty);
+ std::cout << jt << std::endl;
+ BOOST_TEST(jt == make_vector(777));
+ }
+
+ {
+ typedef joint_view<vector<>, vector<> > jt_type;
+ vector<> empty;
+ jt_type jt(empty, empty);
+ std::cout << jt << std::endl;
+ BOOST_TEST(jt == make_vector());
+ }
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_comparison.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_comparison.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+
+#define FUSION_SEQUENCE list
+#include "comparison.hpp"
+
+int
+main()
+{
+ equality_test();
+ ordering_test();
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_construction.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_construction.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+
+#define FUSION_SEQUENCE list
+#include "construction.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_copy.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_copy.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+#include <boost/fusion/container/generation/list_tie.hpp>
+
+#define FUSION_SEQUENCE list
+#include "copy.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_iterator.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_iterator.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+
+#define FUSION_SEQUENCE list
+#define FUSION_NO_RANDOM_ACCESS_SEQUENCE
+#define FUSION_TRAVERSAL_TAG bidirectional_traversal_tag
+#include "./iterator.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_make.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_make.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+
+#define FUSION_SEQUENCE list
+#include "make.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_misc.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_misc.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/list/convert.hpp>
+
+#define FUSION_SEQUENCE list
+#include "misc.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_mutate.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_mutate.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+
+#define FUSION_SEQUENCE list
+#include "mutate.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_tie.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/list_tie.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/list_tie.hpp>
+#include <boost/fusion/container/generation/ignore.hpp>
+#include <boost/fusion/container/generation/make_list.hpp>
+
+#define FUSION_SEQUENCE list
+#include "tie.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/make.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/make.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <string>
+
+#if !defined(FUSION_AT)
+#define FUSION_AT at_c
+#endif
+
+#if !defined(FUSION_MAKE)
+#define FUSION_MAKE BOOST_PP_CAT(make_, FUSION_SEQUENCE)
+#endif
+
+namespace test_detail
+{
+ // something to prevent warnings for unused variables
+ template<class T> void dummy(const T&) {}
+
+ class A {};
+ class B {};
+}
+
+void make_tuple_test() {}
+
+void
+test()
+{
+ using namespace boost::fusion;
+ using namespace test_detail;
+
+ {
+ FUSION_SEQUENCE<int, char> t1 = FUSION_MAKE(5, 'a');
+ BOOST_TEST(FUSION_AT<0>(t1) == 5);
+ BOOST_TEST(FUSION_AT<1>(t1) == 'a');
+
+ FUSION_SEQUENCE<int, std::string> t2;
+ t2 = FUSION_MAKE((short int)2, std::string("Hi"));
+ BOOST_TEST(FUSION_AT<0>(t2) == 2);
+ BOOST_TEST(FUSION_AT<1>(t2) == "Hi");
+ }
+
+ { // This test was previously disallowed for non-PTS compilers.
+ A a = A(); B b;
+ const A ca = a;
+ FUSION_MAKE(boost::cref(a), b);
+ FUSION_MAKE(boost::ref(a), b);
+ FUSION_MAKE(boost::ref(a), boost::cref(b));
+ FUSION_MAKE(boost::ref(ca));
+ }
+
+ { // the result of make_xxx is assignable:
+ BOOST_TEST(FUSION_MAKE(2, 4, 6) ==
+ (FUSION_MAKE(1, 2, 3) = FUSION_MAKE(2, 4, 6)));
+ }
+
+ { // This test was previously disallowed for non-PTS compilers.
+ FUSION_MAKE("Donald", "Daisy"); // should work;
+ // std::make_pair("Doesn't","Work"); // fails
+ }
+
+ {
+ // You can store a reference to a function in a sequence
+ FUSION_SEQUENCE<void(&)()> adf(make_tuple_test);
+ dummy(adf); // avoid warning for unused variable
+ }
+
+#if defined(FUSION_TEST_FAIL)
+ {
+ // But make_xxx doesn't work
+ // with function references, since it creates a const
+ // qualified function type
+
+ FUSION_MAKE(make_tuple_test);
+ }
+#endif
+
+ {
+ // With function pointers, make_xxx works just fine
+ FUSION_MAKE(&make_tuple_test);
+ }
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/map.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/map.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,72 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/map/map.hpp>
+#include <boost/fusion/container/generation/make_map.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/mpl/assert.hpp>
+#include <iostream>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+ using boost::fusion::pair;
+ using boost::fusion::make_pair;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ typedef map<
+ pair<int, char>
+ , pair<double, std::string> >
+ map_type;
+
+ BOOST_MPL_ASSERT((traits::is_associative<map_type>));
+
+ map_type m(
+ make_pair<int>('X')
+ , make_pair<double>("Men"));
+
+ std::cout << at_key<int>(m) << std::endl;
+ std::cout << at_key<double>(m) << std::endl;
+
+ BOOST_TEST(at_key<int>(m) == 'X');
+ BOOST_TEST(at_key<double>(m) == "Men");
+
+ BOOST_STATIC_ASSERT((
+ boost::is_same<result_of::value_at_key<map_type, int>::type, char>::value));
+ BOOST_STATIC_ASSERT((
+ boost::is_same<result_of::value_at_key<map_type, double>::type, std::string>::value));
+
+ std::cout << m << std::endl;
+
+ BOOST_STATIC_ASSERT((result_of::has_key<map_type, int>::value));
+ BOOST_STATIC_ASSERT((result_of::has_key<map_type, double>::value));
+ BOOST_STATIC_ASSERT((!result_of::has_key<map_type, std::string>::value));
+ }
+
+ {
+ std::cout << make_map<char, int>('X', 123) << std::endl;
+ BOOST_TEST(at_key<char>(make_map<char, int>('X', 123)) == 'X');
+ BOOST_TEST(at_key<int>(make_map<char, int>('X', 123)) == 123);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/map_tie.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/map_tie.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/fusion/container/generation/map_tie.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+
+struct key_zero;
+struct key_one;
+
+int main()
+{
+ using namespace boost::fusion;
+ {
+ int number = 101;
+ char letter = 'a';
+ BOOST_TEST(at_key<key_zero>(map_tie<key_zero, key_one>(number, letter)) == 101);
+ BOOST_TEST(at_key<key_one>(map_tie<key_zero, key_one>(number, letter)) == 'a');
+
+ BOOST_TEST(&at_key<key_zero>(map_tie<key_zero, key_one>(number, letter)) == &number);
+ BOOST_TEST(&at_key<key_one>(map_tie<key_zero, key_one>(number, letter)) == &letter);
+
+ at_key<key_zero>(map_tie<key_zero, key_one>(number, letter)) = 202;
+ at_key<key_one>(map_tie<key_zero, key_one>(number, letter)) = 'b';
+
+ BOOST_TEST(number == 202);
+ BOOST_TEST(letter == 'b');
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/misc.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/misc.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,193 @@
+/*=============================================================================
+ Copyright (C) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/fusion/sequence/intrinsic.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/mpl.hpp>
+
+#include <boost/mpl/push_back.hpp>
+#include <boost/mpl/push_front.hpp>
+#include <boost/mpl/size.hpp>
+#include <boost/mpl/equal.hpp>
+#include <boost/mpl/deref.hpp>
+#include <boost/mpl/back.hpp>
+#include <boost/mpl/empty.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/find.hpp>
+#include <boost/mpl/equal.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/integral_c.hpp>
+
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+#include <string>
+
+#if !defined(FUSION_AT)
+#define FUSION_AT at_c
+#endif
+
+#if !defined(FUSION_SIZE)
+#define FUSION_SIZE result_of::size
+#endif
+
+template <typename S1, typename S2>
+struct is_same
+{
+};
+
+struct test_intrinsics1
+{
+ // test at, begin, end, next, prior, advance, size, deref, etc.
+
+ typedef boost::fusion::FUSION_SEQUENCE<int, float, bool, char> sequence;
+ typedef boost::mpl::begin<sequence>::type first;
+ typedef boost::mpl::next<first>::type second;
+ typedef boost::mpl::next<second>::type third;
+ typedef boost::mpl::next<third>::type fourth;
+ typedef boost::mpl::end<sequence>::type last;
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<first>::type, int>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<second>::type, float>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<third>::type, bool>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<fourth>::type, char>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::at_c<sequence, 2>::type, bool>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::front<sequence>::type, int>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<
+ boost::mpl::advance_c<second, 2>::type>::type, char>::value));
+
+ BOOST_STATIC_ASSERT((boost::mpl::size<sequence>::value == 4));
+ BOOST_STATIC_ASSERT(!(boost::mpl::empty<sequence>::value));
+ BOOST_STATIC_ASSERT((boost::mpl::distance<second, fourth>::value == 2));
+
+ typedef boost::mpl::prior<last>::type fourth_;
+ typedef boost::mpl::prior<fourth_>::type third_;
+ typedef boost::mpl::prior<third_>::type second_;
+ typedef boost::mpl::prior<second_>::type first_;
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<first_>::type, int>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<second_>::type, float>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<third_>::type, bool>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::deref<fourth_>::type, char>::value));
+
+ BOOST_STATIC_ASSERT((boost::is_same<
+ boost::mpl::back<sequence>::type, char>::value));
+
+};
+
+struct test_intrinsics2
+{
+ typedef boost::fusion::FUSION_SEQUENCE<> seq0;
+
+ typedef boost::fusion::FUSION_SEQUENCE<int> target1;
+ typedef boost::mpl::push_back<seq0, int>::type seq1;
+ BOOST_STATIC_ASSERT((boost::mpl::equal<seq1, target1>::value));
+
+ typedef boost::fusion::FUSION_SEQUENCE<int, double> target2;
+ typedef boost::mpl::push_back<seq1, double>::type seq2;
+ BOOST_STATIC_ASSERT((boost::mpl::equal<seq2, target2>::value));
+
+ typedef boost::fusion::FUSION_SEQUENCE<int> target3;
+ typedef boost::mpl::push_front<seq0, int>::type seq3;
+ BOOST_STATIC_ASSERT((boost::mpl::equal<seq3, target3>::value));
+
+ typedef boost::fusion::FUSION_SEQUENCE<double, int> target4;
+ typedef boost::mpl::push_front<seq3, double>::type seq4;
+ BOOST_STATIC_ASSERT((boost::mpl::equal<seq4, target4>::value));
+};
+
+void
+test()
+{
+ using namespace boost::fusion;
+
+ { // testing const sequences
+
+ const FUSION_SEQUENCE<int, float> t1(5, 3.3f);
+ BOOST_TEST(FUSION_AT<0>(t1) == 5);
+ BOOST_TEST(FUSION_AT<1>(t1) == 3.3f);
+ }
+
+ { // testing at<N> works with MPL integral constants
+ const FUSION_SEQUENCE<int, char> t1(101, 'z');
+ BOOST_TEST(boost::fusion::at<boost::mpl::int_<0> >(t1) == 101);
+ BOOST_TEST(boost::fusion::at<boost::mpl::int_<1> >(t1) == 'z');
+ // explicitly try something other than mpl::int_
+ BOOST_TEST((boost::fusion::at<boost::mpl::integral_c<long, 0> >(t1) == 101));
+ BOOST_TEST((boost::fusion::at<boost::mpl::integral_c<long, 1> >(t1) == 'z'));
+ }
+
+ { // testing size & empty
+
+ typedef FUSION_SEQUENCE<int, float, double> t1;
+ typedef FUSION_SEQUENCE<> t2;
+
+ BOOST_STATIC_ASSERT(FUSION_SIZE<t1>::value == 3);
+ BOOST_STATIC_ASSERT(FUSION_SIZE<t2>::value == 0);
+ BOOST_STATIC_ASSERT(!result_of::empty<t1>::value);
+ BOOST_STATIC_ASSERT(result_of::empty<t2>::value);
+ }
+
+ { // testing front & back
+
+ typedef FUSION_SEQUENCE<int, float, std::string> tup;
+ tup t(1, 2.2f, "Kimpo");
+
+ BOOST_TEST(front(t) == 1);
+ BOOST_TEST(back(t) == "Kimpo");
+ }
+
+ { // testing is_sequence
+
+ typedef FUSION_SEQUENCE<int, float, double> t1;
+ typedef FUSION_SEQUENCE<> t2;
+ typedef FUSION_SEQUENCE<char> t3;
+
+ BOOST_STATIC_ASSERT(traits::is_sequence<t1>::value);
+ BOOST_STATIC_ASSERT(traits::is_sequence<t2>::value);
+ BOOST_STATIC_ASSERT(traits::is_sequence<t3>::value);
+ BOOST_STATIC_ASSERT(!traits::is_sequence<int>::value);
+ BOOST_STATIC_ASSERT(!traits::is_sequence<char>::value);
+ }
+
+ { // testing mpl compatibility
+
+ // test begin, end, next, prior, advance, size, deref, etc.
+ //~ typedef FUSION_SEQUENCE<int, float, bool, char> tuple_type;
+ //~ test_intrinsics1<tuple_type> test1;
+ //~ (void)test1; // prevent unused variable warning
+
+ // test an algorithm
+ typedef FUSION_SEQUENCE<int, float, double> t1;
+ typedef boost::mpl::find<t1, float>::type iter;
+ typedef boost::mpl::deref<iter>::type type;
+ BOOST_STATIC_ASSERT((boost::is_same<type, float>::value));
+
+ }
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/mutate.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/mutate.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,52 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+
+#if !defined(FUSION_AT)
+#define FUSION_AT at_c
+#endif
+
+namespace test_detail
+{
+ // no public default constructor
+ class foo
+ {
+ public:
+
+ explicit foo(int v) : val(v) {}
+
+ bool operator==(const foo& other) const
+ {
+ return val == other.val;
+ }
+
+ private:
+
+ foo() {}
+ int val;
+ };
+}
+
+void
+test()
+{
+ using namespace boost::fusion;
+ using namespace test_detail;
+
+ FUSION_SEQUENCE<int, float, bool, foo> t1(5, 12.2f, true, foo(4));
+ FUSION_AT<0>(t1) = 6;
+ FUSION_AT<1>(t1) = 2.2f;
+ FUSION_AT<2>(t1) = false;
+ FUSION_AT<3>(t1) = foo(5);
+
+ BOOST_TEST(FUSION_AT<0>(t1) == 6);
+ BOOST_TEST(FUSION_AT<1>(t1) > 2.1f && FUSION_AT<1>(t1) < 2.3f);
+ BOOST_TEST(FUSION_AT<2>(t1) == false);
+ BOOST_TEST(FUSION_AT<3>(t1) == foo(5));
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/reverse_view.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/reverse_view.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,64 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/view/reverse_view/reverse_view.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+#include <boost/mpl/range_c.hpp>
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing the reverse_view
+
+ {
+ typedef boost::mpl::range_c<int, 5, 9> mpl_list1;
+ mpl_list1 l;
+ reverse_view<mpl_list1> rev(l);
+
+ std::cout << rev << std::endl;
+ //BOOST_TEST((rev == make_vector(8, 7, 6, 5)));
+ }
+
+ /*{
+ char const* s = "Hi Kim";
+ typedef vector<int, char, long, char const*> vector_type;
+ vector_type t(123, 'x', 123456789, s);
+ typedef reverse_view<vector_type> view_type;
+ view_type rev(t);
+
+ std::cout << rev << std::endl;
+ BOOST_TEST((rev == make_vector(s, 123456789, 'x', 123)));
+
+ typedef result_of::begin<view_type>::type first_type;
+ first_type first_it(begin(rev));
+ typedef result_of::next<first_type>::type second_type;
+ second_type second_it(next(first_it));
+ BOOST_TEST((*second_it == 123456789));
+ BOOST_TEST((*prior(second_it) == s));
+ BOOST_TEST((*advance_c<2>(first_it) == 'x'));
+ BOOST_TEST((distance(first_it, second_it) == 1));
+ }*/
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/set.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/set.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,67 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/set/set.hpp>
+#include <boost/fusion/container/generation/make_set.hpp>
+#include <boost/fusion/sequence/intrinsic/at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at_key.hpp>
+#include <boost/fusion/sequence/intrinsic/has_key.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/support/pair.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/mpl/assert.hpp>
+#include <iostream>
+#include <string>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+ using boost::fusion::pair;
+ using boost::fusion::make_pair;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ typedef set<int, std::string> set_type;
+
+ BOOST_MPL_ASSERT((traits::is_associative<set_type>));
+
+ set_type m(123, "Hola");
+
+ std::cout << at_key<int>(m) << std::endl;
+ std::cout << at_key<std::string>(m) << std::endl;
+
+ BOOST_TEST(at_key<int>(m) == 123);
+ BOOST_TEST(at_key<std::string>(m) == "Hola");
+
+ BOOST_STATIC_ASSERT((
+ boost::is_same<result_of::value_at_key<set_type, int>::type, int>::value));
+ BOOST_STATIC_ASSERT((
+ boost::is_same<result_of::value_at_key<set_type, std::string>::type, std::string>::value));
+
+ std::cout << m << std::endl;
+
+ BOOST_STATIC_ASSERT((result_of::has_key<set_type, int>::value));
+ BOOST_STATIC_ASSERT((result_of::has_key<set_type, std::string>::value));
+ BOOST_STATIC_ASSERT((!result_of::has_key<set_type, double>::value));
+ }
+
+ {
+ std::cout << make_set('X', 123) << std::endl;
+ BOOST_TEST(at_key<char>(make_set('X', 123)) == 'X');
+ BOOST_TEST(at_key<int>(make_set('X', 123)) == 123);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/single_view.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/single_view.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,57 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/view/single_view/single_view.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+struct X {};
+
+template <typename OS>
+OS& operator<<(OS& os, X const&)
+{
+ os << "<X-object>";
+ return os;
+}
+
+void foo() {}
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ single_view<int> view1(3);
+ std::cout << view1 << std::endl;
+
+#ifdef FUSION_TEST_FAIL
+ // single_view is immutable
+ *begin(view1) += 4;
+#endif
+ std::cout << view1 << std::endl;
+ BOOST_TEST(*begin(view1) == 3);
+ BOOST_TEST(view1.val == 3);
+
+ single_view<X> view2;
+ std::cout << view2 << std::endl;
+ }
+
+ {
+ std::cout << make_single_view(1) << std::endl;
+ std::cout << make_single_view("Hello, World") << std::endl;
+ std::cout << make_single_view(&foo) << std::endl;
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/std_pair.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/std_pair.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,94 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/adapted/std_pair.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/empty.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/list/list.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/sequence/comparison/not_equal_to.hpp>
+#include <boost/fusion/sequence/comparison/less.hpp>
+#include <boost/fusion/sequence/comparison/less_equal.hpp>
+#include <boost/fusion/sequence/comparison/greater.hpp>
+#include <boost/fusion/sequence/comparison/greater_equal.hpp>
+#include <boost/fusion/support/is_view.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/static_assert.hpp>
+
+#include <iostream>
+#include <string>
+#include <utility>
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using namespace std;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+ {
+ typedef std::pair<int, std::string> pair_type;
+ BOOST_MPL_ASSERT_NOT((traits::is_view<pair_type>));
+ pair_type p(123, "Hola!!!");
+
+ std::cout << at_c<0>(p) << std::endl;
+ std::cout << at_c<1>(p) << std::endl;
+ std::cout << p << std::endl;
+ BOOST_TEST(p == make_vector(123, "Hola!!!"));
+
+ at_c<0>(p) = 6;
+ at_c<1>(p) = "mama mia";
+ BOOST_TEST(p == make_vector(6, "mama mia"));
+
+ BOOST_STATIC_ASSERT(result_of::size<pair_type>::value == 2);
+ BOOST_STATIC_ASSERT(!result_of::empty<pair_type>::value);
+
+ BOOST_TEST(front(p) == 6);
+ BOOST_TEST(back(p) == "mama mia");
+ }
+
+ {
+ fusion::vector<int, float> v1(4, 3.3f);
+ std::pair<short, float> v2(5, 3.3f);
+ fusion::vector<long, double> v3(5, 4.4);
+ BOOST_TEST(v1 < v2);
+ BOOST_TEST(v1 <= v2);
+ BOOST_TEST(v2 > v1);
+ BOOST_TEST(v2 >= v1);
+ BOOST_TEST(v2 < v3);
+ BOOST_TEST(v2 <= v3);
+ BOOST_TEST(v3 > v2);
+ BOOST_TEST(v3 >= v2);
+ }
+
+ {
+ // conversion from pair to vector
+ fusion::vector<int, std::string> v(sequence_assign(std::make_pair(123, "Hola!!!")));
+ v = std::make_pair(123, "Hola!!!");
+ }
+
+ {
+ // conversion from pair to list
+ fusion::list<int, std::string> l(sequence_assign(std::make_pair(123, "Hola!!!")));
+ l = std::make_pair(123, "Hola!!!");
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/swap.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/swap.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,35 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/sequence/intrinsic/swap.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/mpl/assert.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+
+#include <vector>
+
+int main()
+{
+ namespace fusion = boost::fusion;
+ {
+ typedef fusion::vector<std::vector<int>, char> test_vector;
+ BOOST_MPL_ASSERT((boost::is_same<void, fusion::result_of::swap<test_vector, test_vector>::type>));
+
+ test_vector v1(std::vector<int>(1, 101), 'a'), v2(std::vector<int>(1, 202), 'b');
+
+ fusion::swap(v1, v2);
+
+ BOOST_TEST(v1 == fusion::make_vector(std::vector<int>(1, 202), 'b'));
+ BOOST_TEST(v2 == fusion::make_vector(std::vector<int>(1, 101), 'a'));
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tie.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tie.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,82 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+
+#if !defined(FUSION_MAKE)
+#define FUSION_MAKE BOOST_PP_CAT(make_, FUSION_SEQUENCE)
+#endif
+
+#if !defined(FUSION_TIE)
+#define FUSION_TIE BOOST_PP_CAT(FUSION_SEQUENCE, _tie)
+#endif
+
+namespace test_detail
+{
+ // something to prevent warnings for unused variables
+ template<class T> void dummy(const T&) {}
+
+ // no public default constructor
+ class foo
+ {
+ public:
+
+ explicit foo(int v) : val(v) {}
+
+ bool operator==(const foo& other) const
+ {
+ return val == other.val;
+ }
+
+ private:
+
+ foo() {}
+ int val;
+ };
+}
+
+void
+test()
+{
+ using namespace boost::fusion;
+ using namespace test_detail;
+
+ int a;
+ char b;
+ foo c(5);
+
+ FUSION_TIE(a, b, c) = FUSION_MAKE(2, 'a', foo(3));
+ BOOST_TEST(a == 2);
+ BOOST_TEST(b == 'a');
+ BOOST_TEST(c == foo(3));
+
+ FUSION_TIE(a, ignore, c) = FUSION_MAKE((short int)5, false, foo(5));
+ BOOST_TEST(a == 5);
+ BOOST_TEST(b == 'a');
+ BOOST_TEST(c == foo(5));
+
+ int i, j;
+ FUSION_TIE(i, j) = FUSION_MAKE(1, 2);
+ BOOST_TEST(i == 1 && j == 2);
+
+ FUSION_SEQUENCE<int, int, float> ta;
+
+#if defined(FUSION_TEST_FAIL)
+ ta = std::FUSION_MAKE(1, 2); // should fail, tuple is of length 3, not 2
+#endif
+
+ dummy(ta);
+
+ // ties cannot be rebound
+ int d = 3;
+ FUSION_SEQUENCE<int&> ti(a);
+ BOOST_TEST(&deref(begin(ti)) == &a);
+ ti = FUSION_SEQUENCE<int&>(d);
+ BOOST_TEST(&deref(begin(ti)) == &a);
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tr1_tuple_auto_conv.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,63 @@
+/*=============================================================================
+ Copyright (c) 2008 Joel de Guzman
+
+ 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)
+==============================================================================*/
+
+#include <boost/tr1/memory.hpp>
+#include <boost/tr1/tuple.hpp>
+#include <boost/any.hpp>
+#include <iostream>
+
+//TODO cschmidt: In C++0x this won't work any more?!
+
+namespace Core
+{
+ class AutoConverter
+ {
+ std::tr1::shared_ptr<boost::any> t_;
+
+ public:
+ AutoConverter(std::tr1::shared_ptr<boost::any> const& t)
+ : t_(t)
+ {}
+
+ template <typename C>
+ operator C ()
+ {
+ try
+ {
+ boost::any & a = (*t_);
+
+ return boost::any_cast<C>(a);
+ }
+ catch(boost::bad_any_cast & e)
+ {
+ std::cerr << "Internal conversion bug: "
+ << "Failed to convert data holder to "
+ << typeid(C).name() << "\n"
+ << e.what()
+ << std::endl;
+
+ C c = C();
+ return c;
+ }
+ }
+ };
+
+ inline AutoConverter Demo()
+ {
+ std::tr1::shared_ptr<boost::any> p_result
+ (new boost::any(std::tr1::make_tuple(1, 2, 3, 4)));
+ return p_result;
+ }
+} // namespace Core
+
+
+int main(int argc, char* argv[])
+{
+ //std::tr1::tuple<int, int, int, int> test = Core::Demo();
+ return 0;
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/transform_view.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/transform_view.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,101 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/view/transform_view/transform_view.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/distance.hpp>
+
+#include <boost/mpl/range_c.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+struct square
+{
+ typedef int result_type;
+
+ template <typename T>
+ int operator()(T x) const
+ {
+ return x * x;
+ }
+};
+
+struct add
+{
+ typedef int result_type;
+
+ template <typename A, typename B>
+ int operator()(A a, B b) const
+ {
+ return a + b;
+ }
+};
+
+int
+main()
+{
+ using namespace boost::fusion;
+
+ std::cout << tuple_open('[');
+ std::cout << tuple_close(']');
+ std::cout << tuple_delimiter(", ");
+
+/// Testing the transform_view
+
+ {
+ typedef boost::mpl::range_c<int, 5, 9> seq_type;
+ seq_type sequence;
+ square sq;
+ typedef transform_view<seq_type, square> xform_type;
+ xform_type xform(sequence, sq);
+
+ std::cout << xform << std::endl;
+ BOOST_TEST((xform == make_vector(25, 36, 49, 64)));
+
+ typedef boost::fusion::result_of::begin<xform_type>::type first_type;
+ first_type first_it(boost::fusion::begin(xform));
+
+ typedef boost::fusion::result_of::next<first_type>::type next_type;
+ next_type next_it(boost::fusion::next(first_it));
+ BOOST_TEST((*next_it == 36));
+ BOOST_TEST((*boost::fusion::prior(next_it) == 25));
+ BOOST_TEST((boost::fusion::distance(first_it, next_it) == 1));
+
+ BOOST_TEST((*boost::fusion::advance_c<3>(boost::fusion::begin(xform)) == 64));
+ BOOST_TEST((boost::fusion::at_c<2>(xform) == 49));
+ BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_c<xform_type, 0>::type, int>));
+ }
+
+ {
+ typedef boost::mpl::range_c<int, 5, 9> sequence1_type;
+ typedef boost::mpl::range_c<int, 10, 14> sequence2_type;
+ sequence1_type sequence1;
+ sequence2_type sequence2;
+ add f;
+ typedef transform_view<sequence1_type, sequence2_type, add> xform_type;
+ xform_type xform(sequence1, sequence2, f);
+
+ std::cout << xform << std::endl;
+ BOOST_TEST((xform == make_vector(15, 17, 19, 21)));
+ BOOST_TEST((boost::fusion::at_c<2>(xform) == 19));
+ BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_c<xform_type, 0>::type, int>));
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_comparison.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_comparison.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple/tuple.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+
+#define FUSION_SEQUENCE tuple
+#include "comparison.hpp"
+
+int
+main()
+{
+ equality_test();
+ ordering_test();
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_construction.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_construction.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple/tuple.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+
+#define TR1_TUPLE_TEST
+#define FUSION_SEQUENCE tuple
+#define FUSION_AT get
+#include "construction.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_copy.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_copy.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple.hpp>
+
+#define FUSION_SEQUENCE tuple
+#define FUSION_AT get
+#define FUSION_MAKE make_tuple
+#define FUSION_TIE tie
+#include "copy.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_element.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_element.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple.hpp>
+
+#define FUSION_SEQUENCE tuple
+#define FUSION_AT get
+#define FUSION_VALUE_AT(S, N) tuple_element<N, S>
+#include "value_at.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_make.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_make.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple.hpp>
+
+#define FUSION_SEQUENCE tuple
+#define FUSION_AT get
+#define FUSION_MAKE make_tuple
+#include "make.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_misc.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_misc.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,23 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+
+#define FUSION_SEQUENCE tuple
+#define FUSION_AT get
+#define FUSION_SIZE tuple_size
+#include "misc.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_mutate.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_mutate.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple.hpp>
+
+#define FUSION_SEQUENCE tuple
+#define FUSION_AT get
+#include "mutate.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_tie.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/tuple_tie.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/tuple.hpp>
+
+#define FUSION_SEQUENCE tuple
+#define FUSION_AT get
+#define FUSION_MAKE make_tuple
+#define FUSION_TIE tie
+#include "tie.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/value_at.hpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/value_at.hpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,88 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/static_assert.hpp>
+
+#include <iostream>
+
+#if !defined(FUSION_AT)
+#define FUSION_AT at_c
+#endif
+
+#if !defined(FUSION_VALUE_AT)
+#define FUSION_VALUE_AT(S, N) result_of::value_at_c<S, N>
+#endif
+
+namespace test_detail
+{
+ // something to prevent warnings for unused variables
+ template<class T> void dummy(const T&) {}
+
+ class A {};
+}
+
+void
+test()
+{
+ using namespace boost::fusion;
+ using namespace test_detail;
+
+ double d = 2.7;
+ A a;
+ FUSION_SEQUENCE<int, double&, const A&, int> t(1, d, a, 2);
+ const FUSION_SEQUENCE<int, double&, const A, int> ct(sequence_assign(t));
+
+ int i = FUSION_AT<0>(t);
+ int i2 = FUSION_AT<3>(t);
+
+ BOOST_TEST(i == 1 && i2 == 2);
+
+ int j = FUSION_AT<0>(ct);
+ BOOST_TEST(j == 1);
+
+ FUSION_AT<0>(t) = 5;
+ BOOST_TEST(FUSION_AT<0>(t) == 5);
+
+#if defined(FUSION_TEST_FAIL)
+ FUSION_AT<0>(ct) = 5; // can't assign to const
+#endif
+
+ double e = FUSION_AT<1>(t);
+ BOOST_TEST(e > 2.69 && e < 2.71);
+
+ FUSION_AT<1>(t) = 3.14+i;
+ BOOST_TEST(FUSION_AT<1>(t) > 4.13 && FUSION_AT<1>(t) < 4.15);
+
+#if defined(FUSION_TEST_FAIL)
+ FUSION_AT<4>(t) = A(); // can't assign to const
+ dummy(FUSION_AT<5>(ct)); // illegal index
+#endif
+
+ ++FUSION_AT<0>(t);
+ BOOST_TEST(FUSION_AT<0>(t) == 6);
+
+ typedef FUSION_SEQUENCE<int, float> seq_type;
+
+ BOOST_STATIC_ASSERT(!(
+ boost::is_const<FUSION_VALUE_AT(seq_type, 0)::type>::value));
+
+ // constness should not affect
+ BOOST_STATIC_ASSERT(!(
+ boost::is_const<FUSION_VALUE_AT(const seq_type, 0)::type>::value));
+
+ BOOST_STATIC_ASSERT(!(
+ boost::is_const<FUSION_VALUE_AT(seq_type, 1)::type>::value));
+
+ // constness should not affect
+ BOOST_STATIC_ASSERT(!(
+ boost::is_const<FUSION_VALUE_AT(const seq_type, 1)::type>::value));
+
+ dummy(i); dummy(i2); dummy(j); dummy(e); // avoid warns for unused variables
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_comparison.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_comparison.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "comparison.hpp"
+
+int
+main()
+{
+ equality_test();
+ ordering_test();
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_construction.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_construction.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,18 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "construction.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_copy.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_copy.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/container/generation/vector_tie.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "copy.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_iterator.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_iterator.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define FUSION_SEQUENCE vector
+#define FUSION_TRAVERSAL_TAG random_access_traversal_tag
+#include "./iterator.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+
+
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_make.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_make.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,20 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "make.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_misc.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_misc.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,21 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/vector/convert.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "misc.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_mutate.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_mutate.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "mutate.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_n.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_n.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,240 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector/vector10.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/value_at.hpp>
+#include <boost/fusion/sequence/io/out.hpp>
+
+#include <boost/fusion/container/vector/vector20.hpp>
+#include <boost/fusion/container/vector/vector30.hpp>
+#include <boost/fusion/container/vector/vector40.hpp>
+#include <boost/fusion/container/vector/vector50.hpp>
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_empty.hpp>
+#include <boost/static_assert.hpp>
+#include <iostream>
+
+#include <boost/fusion/algorithm/transformation/push_back.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+
+int
+main()
+{
+ using namespace boost::fusion;
+ using namespace boost;
+ using std::cout;
+ using std::endl;
+
+ {
+ vector0<> vec;
+ (void) vec;
+ cout << "(): " << sizeof(vec) << endl;
+ cout << (boost::is_empty<vector0<> >::value ? "is empty" : "is not empty") << endl;
+ }
+
+ {
+ typedef vector1<int> type;
+ type vec;
+ BOOST_STATIC_ASSERT(result_of::size<type>::value == 1);
+
+ BOOST_TEST(at_c<0>(vec) == 0);
+ BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 0>::type>::value));
+
+ // prove that it is mutable
+ at_c<0>(vec) = 987;
+ BOOST_TEST(at_c<0>(vec) == 987);
+ }
+
+ {
+ typedef vector1<int> type;
+ type vec(123);
+ BOOST_TEST(at_c<0>(vec) == 123);
+ cout << "(int): " << sizeof(vec) << endl;
+ }
+
+ { // testing const vector
+ vector1<short> const vec(999);
+ BOOST_TEST(at_c<0>(vec) == 999);
+
+#ifdef FUSION_TEST_COMPILE_FAIL
+ at_c<0>(vec) = 321;
+#endif
+ }
+
+ {
+ vector1<int> t1(123L); // try conversion from long to int
+ vector1<double> t2(sequence_assign(t1)); // try copy
+ (void)t2;
+ }
+
+ {
+ typedef vector2<int, char> type;
+ type vec;
+ BOOST_STATIC_ASSERT(result_of::size<type>::value == 2);
+
+ BOOST_TEST(at_c<0>(vec) == 0);
+ BOOST_TEST(at_c<1>(vec) == char());
+
+ BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 0>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<char, result_of::value_at_c<type, 1>::type>::value));
+ }
+
+ {
+ typedef vector2<int, char> type;
+ type vec(123, 'x');
+ BOOST_TEST(at_c<0>(vec) == 123);
+ BOOST_TEST(at_c<1>(vec) == 'x');
+ cout << "(int, char): " << sizeof(vec) << endl;
+ }
+
+ {
+ vector2<int, int> t1(123, 456);
+ vector2<double, float> t2(sequence_assign(t1));
+ (void)t2;
+ }
+
+ {
+ typedef vector3<int, char, double> type;
+ type vec;
+ BOOST_STATIC_ASSERT(result_of::size<type>::value == 3);
+
+ BOOST_TEST(at_c<0>(vec) == 0);
+ BOOST_TEST(at_c<1>(vec) == char());
+ BOOST_TEST(at_c<2>(vec) == double());
+
+ BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 0>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<char, result_of::value_at_c<type, 1>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<double, result_of::value_at_c<type, 2>::type>::value));
+ }
+
+ {
+ typedef vector3<int, char, double> type;
+ type vec(123, 'x', 123.456);
+ BOOST_TEST(at_c<0>(vec) == 123);
+ BOOST_TEST(at_c<1>(vec) == 'x');
+ BOOST_TEST(at_c<2>(vec) >= 123.455 && at_c<2>(vec) <= 123.457);
+ cout << "(int, char, double): " << sizeof(vec) << endl;
+ }
+
+ {
+ typedef vector4<int, char, double, bool> type;
+ type vec(123, 'x', 123.456, true);
+ cout << "(int, char, double, bool): " << sizeof(vec) << endl;
+ }
+
+ {
+ typedef vector4<int, char, bool, double> type;
+ type vec(123, 'x', true, 123.456);
+ cout << "(int, char, bool, double): " << sizeof(vec) << endl;
+ }
+
+ {
+ typedef vector7<bool, char, short, int, long, float, double> type;
+ type vec(false, 'x', 3, 4, 5, 6.0, 7.0);
+
+ BOOST_TEST(at_c<0>(vec) == false);
+ BOOST_TEST(at_c<1>(vec) == 'x');
+ BOOST_TEST(at_c<2>(vec) == 3);
+ BOOST_TEST(at_c<3>(vec) == 4);
+ BOOST_TEST(at_c<4>(vec) == 5);
+ BOOST_TEST(at_c<5>(vec) >= 5.9 && at_c<5>(vec) <= 6.1);
+ BOOST_TEST(at_c<6>(vec) >= 6.9 && at_c<6>(vec) <= 7.1);
+
+ BOOST_STATIC_ASSERT((is_same<bool, result_of::value_at_c<type, 0>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<char, result_of::value_at_c<type, 1>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<short, result_of::value_at_c<type, 2>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<int, result_of::value_at_c<type, 3>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<long, result_of::value_at_c<type, 4>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<float, result_of::value_at_c<type, 5>::type>::value));
+ BOOST_STATIC_ASSERT((is_same<double, result_of::value_at_c<type, 6>::type>::value));
+ cout << "(bool, char, short, int, long, float, double): " << sizeof(vec) << endl;
+ }
+
+ {
+ typedef vector10<int, int, int, int, int, int, int, int, int, int> type;
+ type vec; // compile check only
+ cout << "vector10 of int: " << sizeof(vec) << endl;
+ }
+
+ {
+ typedef vector20<
+ int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int> type;
+
+ type vec; // compile check only
+ cout << "vector20 of int: " << sizeof(vec) << endl;
+ }
+
+ //TODO: Due to limitations in Boost.MPL vector only up to
+ //BOOST_MPL_LIMIT_VECTOR_SIZE
+ /*{
+ typedef vector30<
+ int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int> type;
+
+ type vec; // compile check only
+ cout << "vector30 of int: " << sizeof(vec) << endl;
+ }
+
+ {
+ typedef vector40<
+ int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int> type;
+
+ type vec; // compile check only
+ cout << "vector40 of int: " << sizeof(vec) << endl;
+ }
+
+ {
+ typedef vector50<
+ int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int
+ , int, int, int, int, int, int, int, int, int, int> type;
+
+ type vec; // compile check only
+ cout << "vector50 of int: " << sizeof(vec) << endl;
+ }*/
+
+ {
+ // testing copy and assign from a view
+ vector0<> empty;
+ fusion::vector2<int, long> v(sequence_assign(fusion::push_back(fusion::push_back(empty, 123), 456)));
+ cout << v << endl;
+ BOOST_TEST(at_c<0>(v) == 123);
+ BOOST_TEST(at_c<1>(v) == 456);
+ v = fusion::push_back(fusion::push_back(empty, 123), 456); // test assign
+ cout << v << endl;
+ BOOST_TEST(at_c<0>(v) == 123);
+ BOOST_TEST(at_c<1>(v) == 456);
+ }
+
+ {
+ // testing copy and assign from a vector_c
+ mpl::vector_c<int, 123, 456> vec_c;
+ fusion::vector2<int, long> v(sequence_assign(vec_c));
+ cout << v << endl;
+ BOOST_TEST(at_c<0>(v) == 123);
+ BOOST_TEST(at_c<1>(v) == 456);
+ v = mpl::vector_c<int, 123, 456>(); // test assign
+ cout << v << endl;
+ BOOST_TEST(at_c<0>(v) == 123);
+ BOOST_TEST(at_c<1>(v) == 456);
+ }
+
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_tie.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_tie.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,22 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+#include <boost/fusion/container/generation/vector_tie.hpp>
+#include <boost/fusion/container/generation/ignore.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "tie.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_value_at.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/vector_value_at.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,19 @@
+/*=============================================================================
+ Copyright (c) 1999-2003 Jaakko Jarvi
+ Copyright (c) 2001-2006 Joel de Guzman
+
+ 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)
+==============================================================================*/
+#include <boost/fusion/container/vector/vector.hpp>
+
+#define FUSION_SEQUENCE vector
+#include "value_at.hpp"
+
+int
+main()
+{
+ test();
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,87 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/mpl/vector_c.hpp>
+
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+
+int main()
+{
+ using namespace boost::fusion;
+ {
+ typedef vector2<int,int> int_vector;
+ typedef vector2<char,char> char_vector;
+ typedef vector<int_vector&, char_vector&> seqs_type;
+ typedef zip_view<seqs_type> view;
+
+ BOOST_MPL_ASSERT((boost::mpl::equal_to<boost::fusion::result_of::size<view>::type, boost::fusion::result_of::size<int_vector>::type>));
+ BOOST_STATIC_ASSERT((boost::fusion::result_of::size<view>::value == 2));
+
+ int_vector iv(1,2);
+ char_vector cv('a', 'b');
+ seqs_type seqs(iv, cv);
+ view v(seqs);
+
+ BOOST_TEST(at_c<0>(v) == make_vector(1, 'a'));
+ BOOST_TEST(at_c<1>(v) == make_vector(2, 'b'));
+ BOOST_TEST(front(v) == make_vector(1, 'a'));
+ BOOST_TEST(back(v) == make_vector(2, 'b'));
+ BOOST_TEST(*next(begin(v)) == make_vector(2, 'b'));
+ BOOST_TEST(*prior(end(v)) == make_vector(2, 'b'));
+ BOOST_TEST(advance_c<2>(begin(v)) == end(v));
+ BOOST_TEST(advance_c<-2>(end(v)) == begin(v));
+ BOOST_TEST(distance(begin(v), end(v)) == 2);
+
+ BOOST_STATIC_ASSERT((boost::fusion::result_of::distance<boost::fusion::result_of::begin<view>::type, boost::fusion::result_of::end<view>::type>::value == 2));
+
+ BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_c<view,0>::type, vector<int,char> >));
+ BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of<boost::fusion::result_of::begin<view>::type>::type, vector<int,char> >));
+ }
+ {
+ using namespace boost;
+ typedef mpl::vector2<int,bool> v1_type;
+ typedef mpl::vector2<char,long> v2_type;
+ typedef fusion::vector<v1_type&, v2_type&> seqs_type;
+ typedef fusion::zip_view<seqs_type> view;
+
+ v1_type v1;
+ v2_type v2;
+ seqs_type seqs(v1,v2);
+ view v(seqs);
+ BOOST_TEST((fusion::at_c<0>(v) == mpl::vector2<int,char>()));
+ BOOST_TEST((fusion::at_c<1>(v) == mpl::vector2<bool,long>()));
+ BOOST_TEST((fusion::front(v) == mpl::vector2<int,char>()));
+ BOOST_TEST((fusion::back(v) == mpl::vector2<bool,long>()));
+ BOOST_TEST((*fusion::next(fusion::begin(v)) == mpl::vector2<bool,long>()));
+ BOOST_TEST((*fusion::prior(fusion::end(v)) == mpl::vector2<bool,long>()));
+ BOOST_TEST(fusion::advance_c<2>(fusion::begin(v)) == fusion::end(v));
+ BOOST_TEST(fusion::advance_c<-2>(fusion::end(v)) == fusion::begin(v));
+ BOOST_TEST(fusion::distance(fusion::begin(v), fusion::end(v)) == 2);
+ }
+ return boost::report_errors();
+}
+

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view2.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view2.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,61 @@
+/*=============================================================================
+ Copyright (c) 2001-2006 Joel de Guzman
+ Copyright (c) 2006 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/support/category_of.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/container/list.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/sequence/intrinsic/at.hpp>
+#include <boost/fusion/sequence/intrinsic/front.hpp>
+#include <boost/fusion/sequence/intrinsic/back.hpp>
+#include <boost/fusion/iterator/next.hpp>
+#include <boost/fusion/iterator/prior.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/sequence/comparison/equal_to.hpp>
+#include <boost/fusion/container/generation/make_vector.hpp>
+#include <boost/fusion/adapted/mpl.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/equal_to.hpp>
+
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
+
+int main()
+{
+ {
+ using namespace boost::fusion;
+ typedef vector2<int,int> int_vector;
+ typedef vector2<char,char> char_vector;
+ typedef list<char,char> char_list;
+ typedef vector<int_vector&, char_vector&, char_list&> seqs_type;
+ typedef zip_view<seqs_type> view;
+
+ BOOST_MPL_ASSERT((boost::mpl::equal_to<boost::fusion::result_of::size<view>::type, boost::fusion::result_of::size<int_vector>::type>));
+ BOOST_STATIC_ASSERT((boost::fusion::result_of::size<view>::value == 2));
+
+ int_vector iv(1,2);
+ char_vector cv('a', 'b');
+ char_list cl('y','z');
+ seqs_type seqs(iv, cv, cl);
+ view v(seqs);
+
+ BOOST_TEST(front(v) == make_vector(1, 'a', 'y'));
+ BOOST_TEST(*next(begin(v)) == make_vector(2, 'b', 'z'));
+ BOOST_TEST(advance_c<2>(begin(v)) == end(v));
+ BOOST_TEST(distance(begin(v), end(v)) == 2);
+ BOOST_STATIC_ASSERT((boost::fusion::result_of::distance<boost::fusion::result_of::begin<view>::type, boost::fusion::result_of::end<view>::type>::value == 2));
+
+ BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_of<boost::fusion::result_of::begin<view>::type>::type, vector<int,char,char> >));
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view_ignore.cpp
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/test/sequence/zip_view_ignore.cpp 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,58 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2007 Dan Marsden
+
+ 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)
+==============================================================================*/
+#include <boost/detail/lightweight_test.hpp>
+#include <boost/fusion/container/vector.hpp>
+#include <boost/fusion/view/zip_view.hpp>
+#include <boost/fusion/support/unused.hpp>
+#include <boost/fusion/iterator.hpp>
+#include <boost/fusion/sequence/intrinsic.hpp>
+
+#include <boost/mpl/assert.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+int main()
+{
+ using namespace boost::fusion;
+ {
+ typedef vector2<int,int> int_vector;
+ typedef vector2<char,char> char_vector;
+ typedef vector<int_vector&, unused_type const&, char_vector&> seqs_type;
+ typedef zip_view<seqs_type> view;
+
+ int_vector iv(1,2);
+ char_vector cv('a','b');
+ seqs_type seq(iv, unused, cv);
+ view v(seq);
+
+ BOOST_TEST(at_c<0>(front(v)) == 1);
+ BOOST_TEST(at_c<2>(front(v)) == 'a');
+ BOOST_TEST(at_c<0>(back(v)) == 2);
+ BOOST_TEST(at_c<2>(back(v)) == 'b');
+
+ typedef result_of::begin<view>::type first_iterator;
+ typedef result_of::value_of<first_iterator>::type first_element;
+
+ typedef result_of::at_c<first_element, 0>::type e0;
+ typedef result_of::at_c<first_element, 2>::type e2;
+ BOOST_MPL_ASSERT((boost::is_same<e0, int&>));
+ BOOST_MPL_ASSERT((boost::is_same<e2, char&>));
+
+ BOOST_TEST(size(front(v)) == 3);
+
+ typedef result_of::value_at_c<view, 0>::type first_value_at;
+ typedef result_of::value_at_c<first_value_at, 0>::type v0;
+ typedef result_of::value_at_c<first_value_at, 2>::type v2;
+
+ BOOST_MPL_ASSERT((boost::is_same<v0, int>));
+ BOOST_MPL_ASSERT((boost::is_same<v2, char>));
+
+ BOOST_TEST(at_c<0>(at_c<0>(v)) == 1);
+ BOOST_TEST(at_c<2>(at_c<0>(v)) == 'a');
+ }
+ return boost::report_errors();
+}

Added: sandbox/SOC/2009/fusion/libs/fusion/todo.txt
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/libs/fusion/todo.txt 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,189 @@
+===============================================================================
+Copyright (C) 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger
+
+Use, modification and distribution is subject to 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)
+===============================================================================
+
+* Provide macros for adapting classes, similar to BOOST_FUSION_ADAPT_STRUCT
+ and BOOST_FUSION_ADAPT_ASSOC_STRUCT, but with with user control over
+ member accessors (e.g. get and set free functions).
+
+* Document extension::struct_size, extension::struct_member and
+ extension::struct_assoc_member in extension section.
+
+* Document rationale behind at and value_at and how to choose which
+ to use.
+
+* Reinstate the function object algorithms
+
+* Break all dependency cycles if there are some more
+
+* Break the view<-->algorithm dependency cycle
+
+* Improve extension docs
+
+* Document sequence/convert
+
+* Consider object equivalent of functions and algorithms (so you can do
+ transform(iterators, deref()) with needing to put together a wrapper for deref).
+
+* Make algorithms work with mutable data
+
+* Consider segmented sequence / algorithm support
+
+* Consider utility element_ref<Seq,Member>::type thats consts and refs as appropriate
+
+* Improved motivation section
+
+* Expand details of view concept
+
+* Examples, examples, examples
+
+* look at lambda stuff
+
+* Complete the fusion/include/ directory containing a flat list of
+ include files for all the modules and components.
+
+* The error messages when e.g. the function is not set as const are difficult
+ to decipher. e.g. transform(s, f) <<- where f has a non-const operator()
+
+* mpl, fusion, container type preserving operations incompatible
+ -- shall we consider container-type preserving variations of the
+ functions/algorithms?
+
+ How about making joint_view Concept preserving? This way push/pop/front/back
+ will return a view of the same Concept. - tosh
+
+* map_tie is implemented. It seems not yet documented? - Dan: done now!
+
+* multi_set, multi_map?
+
+* why is insert_range not spelled insert_sequence ?
+
+* Document the new fusion extension mechanisms
+ ->iterator_facade
+ ->sequence_facade
+
+* David A:
+ Wouldn't extension be a lot easier if iterator_base and sequence_base
+ took (optional) 2nd arguments that specify the tag? Then you wouldn't
+ need that whole dance that enables tag dispatching (right?)
+
+* David A: is_iterator isn't documented?
+ JDG: There is no is_iterator ;) There is is_fusion_iterator, but it should
+ probably be placed in detail.
+
+* for_each takes the function object by reference to const, so you have to
+ const qualify operator() and make the data members mutable so you can change
+ them anyway.
+ Eric N: IMO, this is a bug in Fusion. There should be an overload of for_each
+ that takes a function object by non-const reference. Stateful predicates should
+ be supported, and Fusion should be explicit about where and when predicates
+ are copied, so that the state doesn't get messed up.
+
+* Make Boost.parameters library's ArgumentPacks a conforming fusion sequence
+
+* Optimize container performance with typeof / compiler defect typeof. In particular
+ improve the performance of the prototype deque implementation.
+
+* Deque docs if we decide we like it
+
+* Rewrite the whole extension docs section. More formal docs of extension point,
+ example to use the various facade types, rather than hand coding everything.
+
+* zip optimization - Zip is rather compiler heavy, try and reduce the likelihood
+ of compilers like msvc7 hitting internal compiler limits
+
+* Document the unused support added to zip for Hartmut.
+
+* Rationalize support/unused.hpp and the ignore stuff needed for tie etc.
+
+* Why do we need to set FUSION_MAX_VECTOR_SIZE when we set
+ FUSION_MAX_MAP_SIZE? Setting FUSION_MAX_MAP_SIZE should be enough.
+
+tosh:
+
+* Document Incrementable / Single Pass Concepts
+* Provide infinity-aware default implementation for Incrementable Sequences
+
+ Thoughts: It would probably be cleaner to have infinity conceptually
+ orthogonal so there can be infinite Bidi/RA/Assoc Sequences.
+ OTOH it complicates things in way that might not be worth it...
+
+* Implement always_view/always with repetitive_view<single_view<T> >
+ semantics - using repetitive_view will for this purpose will be way
+ too much overhead.
+
+? Functional wrappers for intrinsics/algorithms.
+
+* Rewrite functional benchmark
+
+==========================================================
+
+From the fusion review (please mark all done items):
+
+The following comments refer to issues that the library authors should
+address prior to merging the library into CVS:
+
+* Documentation: Many of the reviewers stated that they would like to
+ see more tutorial documentation that demonstrates not only what the
+ particular constructs in Fusion do, but also how they are expected
+ to be used. A reasonably concise motivating example has been
+ requested. It has already been pointed out that Fusion is used for
+ some other boost libraries. A well-developed and self-contained
+ case study of when and how to use Fusion would be greatly
+ appreciated. The relationship between this library and the current
+ Boost.Tuple library, as well as Boost.Mpl, should be discussed. The
+ reference documentation is quite thorough and detailed comments
+ regarding them have already been addressed by the authors. However
+ the notion of "views" requires greater documentation. The
+ examples in the algorithm sections currently do little more than
+ demonstrate the syntax by which they can be called. Examples that
+ more specifically express intent would be a notable
+ improvement. (see for example Matt Austern's "Generic Programming
+ and the STL"). In general the documentation would benefit from
+ copy-editing.
+
+* Several commented on the use of the name "pair" for the fusion type
+ that has typedefs for two types but only contains the second type.
+ Although the typedefs and member names are consistent with the
+ std::pair object, the name "pair" is confusing. The
+ compile-time/run-time hybrid nature of this library makes it
+ difficult to find perfect metaphors for constructs in the library.
+ In this case, it seems better to find a term for this template (and
+ the concept that it models) that more directly states its purpose.
+ The name "tag_of" would also benefit from renaming.
+
+* The behavior of Fusion functions in the face of argument-dependent
+ lookup (ADL) is not well specified. This should be made
+ explicit in the reference documentation.
+
+The following comments refer to issues that, while not mandatory,
+deserve consideration:
+
+* The library name "Fusion", though not arbitrary, says little about
+ the library's purpose. There is precedent for this within boost,
+ however. A name change is not mandatory for the
+ library's acceptance, but it would be worth while for the authors to
+ consider a more telling name.
+
+ Dan - I like the name Fusion, and there is precendent for less direct
+ library names like Spirit and Xpressive in Boost. (And Boost is not
+ exactly an explicit name either).
+
+* The mechanism for extending Fusion with new containers and iterators
+ is complex and involves implementing a number of components,
+ especially regarding iterators. An adaptation layer that is
+ analogous to the Boost.Iterator library would be a fine addition to
+ Fusion.
+
+ Dan - Joel added iterator and container adapters, still to be documented
+ as part of the improved extension docs to be done by me.
+
+* It would be beneficial to supply Boost.Serialization support for the
+ Fusion container types. I am sure, as mentioned, that the authors
+ of this library would accept a volunteer to implement this
+ functionality.
+

Added: sandbox/SOC/2009/fusion/project-root.jam
==============================================================================
--- (empty file)
+++ sandbox/SOC/2009/fusion/project-root.jam 2009-08-17 19:47:17 EDT (Mon, 17 Aug 2009)
@@ -0,0 +1,23 @@
+# Copyright Christopher Schmidt 2009.
+# 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)
+
+import os ;
+local BOOST_INCLUDES_PATH = [ os.environ BOOST_INCLUDES_PATH ] ;
+
+project
+ : requirements <include>.
+ <include>$(BOOST_INCLUDES_PATH)
+ <define>BOOST_FUSION_ENABLE_STATIC_ASSERTS
+# <toolset>gcc:<cxxflags>-std=c++0x
+ : build-dir ../bin
+ : default-build debug <link>shared <runtime-link>shared <threading>multi
+ ;
+
+build-project libs/fusion/example/test ;
+
+#build-project libs/fusion/doc ;
+#build-project libs/fusion/example/extension ;
+#build-project libs/fusion/example/performance ;
+build-project libs/fusion/test ;
\ No newline at end of file


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk