Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71306 - in branches/release: . boost boost/algorithm/string boost/archive boost/bimap boost/config boost/date_time boost/date_time/posix_time boost/detail boost/filesystem boost/function boost/functional boost/functional/hash boost/fusion boost/fusion/container/list/detail boost/geometry boost/geometry/algorithms boost/geometry/arithmetic boost/geometry/core boost/geometry/domains boost/geometry/geometries boost/geometry/iterators boost/geometry/multi boost/geometry/policies boost/geometry/ranges boost/geometry/strategies boost/geometry/util boost/geometry/views boost/gil boost/graph boost/icl boost/integer boost/interprocess boost/intrusive boost/io boost/iostreams boost/iterator boost/math boost/msm boost/numeric/ublas boost/pool boost/program_options boost/program_options/detail boost/property_tree boost/python boost/range boost/regex boost/serialization boost/signals boost/signals2 boost/spirit boost/spirit/home boost/spirit/home/karma boost/spirit/home/support boost/spirit/home/support/detail boost/spirit/home/support/utree boost/spirit/home/support/utree/detail boost/statechart boost/system boost/thread boost/tr1 boost/type_traits boost/typeof boost/unordered boost/utility boost/uuid boost/variant boost/wave doc libs libs/algorithm/string libs/array libs/array/test libs/bimap libs/config libs/date_time libs/date_time/data libs/date_time/example/gregorian libs/date_time/example/local_time libs/date_time/example/posix_time libs/date_time/example/tutorial libs/date_time/test/posix_time libs/date_time/xmldoc libs/detail libs/filesystem libs/function libs/functional libs/functional/hash libs/fusion libs/geometry libs/geometry/doc libs/geometry/example libs/geometry/test libs/graph/doc libs/graph_parallel libs/icl libs/icl/doc libs/icl/doc/html libs/icl/doc/html/header/boost/icl libs/icl/test libs/icl/test/test_doc_code_ libs/integer libs/interprocess libs/intrusive libs/io libs/io/doc libs/iostreams libs/iterator libs/math libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/html/math_toolkit/main_overview libs/mpi/build libs/mpl/doc/refmanual libs/mpl/doc/src/refmanual libs/msm libs/numeric/ublas libs/numeric/ublas/doc libs/parameter/doc/html libs/phoenix/doc libs/phoenix/doc/examples libs/pool libs/program_options libs/program_options/test libs/property_tree libs/python libs/range libs/regex libs/serialization libs/serialization/doc libs/serialization/example libs/serialization/src libs/serialization/test libs/serialization/vc7ide libs/signals libs/signals2 libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/example/qi libs/spirit/phoenix libs/spirit/repository/doc/html libs/spirit/repository/doc/html/spirit_repository libs/spirit/repository/doc/html/spirit_repository/karma_components/directives libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal libs/spirit/repository/doc/html/spirit_repository/qi_components libs/spirit/repository/doc/html/spirit_repository/qi_components/directives libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal libs/spirit/repository/doc/html/spirit_repository/qi_components/operators libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive libs/spirit/test libs/spirit/test/karma libs/spirit/test/qi libs/spirit/test/support libs/statechart libs/static_assert libs/system libs/thread libs/timer libs/tr1 libs/type_traits libs/type_traits/doc libs/typeof/doc libs/units/test libs/unordered libs/utility libs/utility/swap/test libs/uuid libs/wave more status tools tools/bcp tools/boostbook tools/build/v2 tools/inspect tools/quickbook tools/quickbook/doc tools/quickbook/src tools/quickbook/test tools/regression tools/regression/src tools/release tools/wave
From: hartmut.kaiser_at_[hidden]
Date: 2011-04-15 22:16:59


Author: hkaiser
Date: 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
New Revision: 71306
URL: http://svn.boost.org/trac/boost/changeset/71306

Log:
Spirit: merging from trunk
Added:
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/kwd.html
      - copied unchanged from r71301, /trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/kwd.html
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/
      - copied from r71301, /trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators.html
      - copied unchanged from r71301, /trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators.html
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/keyword_list.html
      - copied unchanged from r71301, /trunk/libs/spirit/repository/doc/html/spirit_repository/qi_components/operators/keyword_list.html
Properties modified:
   branches/release/ (props changed)
   branches/release/INSTALL (props changed)
   branches/release/Jamroot (props changed)
   branches/release/LICENSE_1_0.txt (props changed)
   branches/release/boost/ (props changed)
   branches/release/boost-build.jam (props changed)
   branches/release/boost.css (props changed)
   branches/release/boost.png (props changed)
   branches/release/boost/algorithm/string/ (props changed)
   branches/release/boost/archive/ (props changed)
   branches/release/boost/archive/basic_binary_iarchive.hpp (props changed)
   branches/release/boost/array.hpp (props changed)
   branches/release/boost/bimap/ (props changed)
   branches/release/boost/concept_check.hpp (props changed)
   branches/release/boost/config/ (props changed)
   branches/release/boost/config.hpp (props changed)
   branches/release/boost/date_time/c_time.hpp (props changed)
   branches/release/boost/date_time/gregorian_calendar.ipp (props changed)
   branches/release/boost/date_time/posix_time/time_serialize.hpp (props changed)
   branches/release/boost/date_time/strings_from_facet.hpp (props changed)
   branches/release/boost/date_time/time_facet.hpp (props changed)
   branches/release/boost/detail/ (props changed)
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/filesystem.hpp (props changed)
   branches/release/boost/function/ (props changed)
   branches/release/boost/functional/ (props changed)
   branches/release/boost/functional/hash/ (props changed)
   branches/release/boost/fusion/ (props changed)
   branches/release/boost/fusion/container/list/detail/build_cons.hpp (props changed)
   branches/release/boost/geometry/ (props changed)
   branches/release/boost/geometry/algorithms/ (props changed)
   branches/release/boost/geometry/arithmetic/ (props changed)
   branches/release/boost/geometry/core/ (props changed)
   branches/release/boost/geometry/domains/ (props changed)
   branches/release/boost/geometry/geometries/ (props changed)
   branches/release/boost/geometry/geometry.hpp (props changed)
   branches/release/boost/geometry/iterators/ (props changed)
   branches/release/boost/geometry/multi/ (props changed)
   branches/release/boost/geometry/policies/ (props changed)
   branches/release/boost/geometry/ranges/ (props changed)
   branches/release/boost/geometry/strategies/ (props changed)
   branches/release/boost/geometry/util/ (props changed)
   branches/release/boost/geometry/views/ (props changed)
   branches/release/boost/gil/ (props changed)
   branches/release/boost/graph/ (props changed)
   branches/release/boost/icl/ (props changed)
   branches/release/boost/integer/ (props changed)
   branches/release/boost/interprocess/ (props changed)
   branches/release/boost/intrusive/ (props changed)
   branches/release/boost/io/ (props changed)
   branches/release/boost/iostreams/ (props changed)
   branches/release/boost/iterator/ (props changed)
   branches/release/boost/iterator/iterator_facade.hpp (props changed)
   branches/release/boost/math/ (props changed)
   branches/release/boost/math_fwd.hpp (props changed)
   branches/release/boost/msm/ (props changed)
   branches/release/boost/numeric/ublas/ (props changed)
   branches/release/boost/numeric/ublas/functional.hpp (props changed)
   branches/release/boost/pool/ (props changed)
   branches/release/boost/program_options/ (props changed)
   branches/release/boost/program_options/detail/parsers.hpp (props changed)
   branches/release/boost/program_options/parsers.hpp (props changed)
   branches/release/boost/property_tree/ (props changed)
   branches/release/boost/python/ (props changed)
   branches/release/boost/range/ (props changed)
   branches/release/boost/regex/ (props changed)
   branches/release/boost/serialization/ (props changed)
   branches/release/boost/signals/ (props changed)
   branches/release/boost/signals2/ (props changed)
   branches/release/boost/signals2.hpp (props changed)
   branches/release/boost/spirit/ (props changed)
   branches/release/boost/spirit/home/ (props changed)
   branches/release/boost/spirit/home/karma/ (props changed)
   branches/release/boost/spirit/home/support/attributes.hpp (props changed)
   branches/release/boost/statechart/ (props changed)
   branches/release/boost/static_assert.hpp (props changed)
   branches/release/boost/system/ (props changed)
   branches/release/boost/thread/ (props changed)
   branches/release/boost/thread.hpp (props changed)
   branches/release/boost/token_functions.hpp (props changed)
   branches/release/boost/tr1/ (props changed)
   branches/release/boost/type_traits/ (props changed)
   branches/release/boost/typeof/message.hpp (props changed)
   branches/release/boost/typeof/register_functions.hpp (props changed)
   branches/release/boost/typeof/register_functions_iterate.hpp (props changed)
   branches/release/boost/typeof/typeof.hpp (props changed)
   branches/release/boost/typeof/unsupported.hpp (props changed)
   branches/release/boost/unordered/ (props changed)
   branches/release/boost/utility/ (props changed)
   branches/release/boost/utility/value_init.hpp (props changed)
   branches/release/boost/uuid/ (props changed)
   branches/release/boost/variant/ (props changed)
   branches/release/boost/version.hpp (props changed)
   branches/release/boost/wave/ (props changed)
   branches/release/bootstrap.bat (props changed)
   branches/release/bootstrap.sh (props changed)
   branches/release/doc/ (props changed)
   branches/release/index.htm (props changed)
   branches/release/index.html (props changed)
   branches/release/libs/ (props changed)
   branches/release/libs/algorithm/string/ (props changed)
   branches/release/libs/array/ (props changed)
   branches/release/libs/array/test/array0.cpp (props changed)
   branches/release/libs/array/test/array2.cpp (props changed)
   branches/release/libs/array/test/array6.cpp (props changed)
   branches/release/libs/bimap/ (props changed)
   branches/release/libs/config/ (props changed)
   branches/release/libs/date_time/ (props changed)
   branches/release/libs/date_time/data/date_time_zonespec.csv (props changed)
   branches/release/libs/date_time/example/gregorian/days_between_new_years.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/days_since_year_start.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/days_till_new_year.cpp (props changed)
   branches/release/libs/date_time/example/gregorian/month_add.cpp (props changed)
   branches/release/libs/date_time/example/local_time/flight.cpp (props changed)
   branches/release/libs/date_time/example/local_time/local_date_time.cpp (props changed)
   branches/release/libs/date_time/example/posix_time/print_hours.cpp (props changed)
   branches/release/libs/date_time/example/posix_time/time_math.cpp (props changed)
   branches/release/libs/date_time/example/tutorial/io_tutorial.cpp (props changed)
   branches/release/libs/date_time/test/posix_time/testtime_facet.cpp (props changed)
   branches/release/libs/date_time/test/posix_time/testtime_input_facet.cpp (props changed)
   branches/release/libs/date_time/xmldoc/date_class.xml (props changed)
   branches/release/libs/date_time/xmldoc/usage_examples.xml (props changed)
   branches/release/libs/detail/ (props changed)
   branches/release/libs/filesystem/ (props changed)
   branches/release/libs/function/ (props changed)
   branches/release/libs/functional/ (props changed)
   branches/release/libs/functional/hash/ (props changed)
   branches/release/libs/fusion/ (props changed)
   branches/release/libs/geometry/ (props changed)
   branches/release/libs/geometry/doc/ (props changed)
   branches/release/libs/geometry/example/ (props changed)
   branches/release/libs/geometry/index.html (props changed)
   branches/release/libs/geometry/test/ (props changed)
   branches/release/libs/graph/doc/ (props changed)
   branches/release/libs/graph_parallel/ (props changed)
   branches/release/libs/icl/ (props changed)
   branches/release/libs/icl/doc/ (props changed)
   branches/release/libs/icl/doc/html/ (props changed)
   branches/release/libs/icl/doc/html/header/boost/icl/ (props changed)
   branches/release/libs/icl/test/ (props changed)
   branches/release/libs/icl/test/test_doc_code_/ (props changed)
   branches/release/libs/integer/ (props changed)
   branches/release/libs/interprocess/ (props changed)
   branches/release/libs/intrusive/ (props changed)
   branches/release/libs/io/ (props changed)
   branches/release/libs/io/doc/ (props changed)
   branches/release/libs/iostreams/ (props changed)
   branches/release/libs/iterator/ (props changed)
   branches/release/libs/libraries.htm (props changed)
   branches/release/libs/maintainers.txt (props changed)
   branches/release/libs/math/ (props changed)
   branches/release/libs/math/doc/sf_and_dist/faq.qbk (props changed)
   branches/release/libs/math/doc/sf_and_dist/html/math_toolkit/main_overview/faq.html (props changed)
   branches/release/libs/mpi/build/ (props changed)
   branches/release/libs/mpl/doc/refmanual/broken-compiler-workarounds.html (props changed)
   branches/release/libs/mpl/doc/refmanual/categorized-index-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/cfg-no-preprocessed-headers.html (props changed)
   branches/release/libs/mpl/doc/refmanual/composition-and-argument-binding.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-concepts.html (props changed)
   branches/release/libs/mpl/doc/refmanual/data-types-miscellaneous.html (props changed)
   branches/release/libs/mpl/doc/refmanual/extensible-associative-sequence.html (props changed)
   branches/release/libs/mpl/doc/refmanual/inserter-class.html (props changed)
   branches/release/libs/mpl/doc/refmanual/tag-dispatched-metafunction.html (props changed)
   branches/release/libs/mpl/doc/refmanual/trivial-metafunctions-summary.html (props changed)
   branches/release/libs/mpl/doc/src/refmanual/Iterators-Iterator.rst (props changed)
   branches/release/libs/msm/ (props changed)
   branches/release/libs/numeric/ublas/ (props changed)
   branches/release/libs/numeric/ublas/doc/ (props changed)
   branches/release/libs/parameter/doc/html/index.html (props changed)
   branches/release/libs/phoenix/doc/basics.qbk (props changed)
   branches/release/libs/phoenix/doc/examples/extending_actors.qbk (props changed)
   branches/release/libs/phoenix/doc/organisation.qbk (props changed)
   branches/release/libs/pool/ (props changed)
   branches/release/libs/program_options/ (props changed)
   branches/release/libs/program_options/test/parsers_test.cpp (props changed)
   branches/release/libs/property_tree/ (props changed)
   branches/release/libs/python/ (props changed)
   branches/release/libs/range/ (props changed)
   branches/release/libs/regex/ (props changed)
   branches/release/libs/serialization/ (props changed)
   branches/release/libs/serialization/doc/ (props changed)
   branches/release/libs/serialization/example/ (props changed)
   branches/release/libs/serialization/src/ (props changed)
   branches/release/libs/serialization/test/test_diamond_complex.cpp (props changed)
   branches/release/libs/serialization/vc7ide/ (props changed)
   branches/release/libs/signals/ (props changed)
   branches/release/libs/signals2/ (props changed)
   branches/release/libs/spirit/ (props changed)
   branches/release/libs/spirit/classic/example/ (props changed)
   branches/release/libs/spirit/doc/ (props changed)
   branches/release/libs/spirit/example/ (props changed)
   branches/release/libs/spirit/phoenix/ (props changed)
   branches/release/libs/spirit/test/ (props changed)
   branches/release/libs/spirit/test/qi/optional.cpp (props changed)
   branches/release/libs/statechart/ (props changed)
   branches/release/libs/static_assert/ (props changed)
   branches/release/libs/system/ (props changed)
   branches/release/libs/thread/ (props changed)
   branches/release/libs/timer/ (props changed)
   branches/release/libs/tr1/ (props changed)
   branches/release/libs/type_traits/ (props changed)
   branches/release/libs/type_traits/doc/ (props changed)
   branches/release/libs/typeof/doc/typeof.qbk (props changed)
   branches/release/libs/units/test/ (props changed)
   branches/release/libs/unordered/ (props changed)
   branches/release/libs/utility/ (props changed)
   branches/release/libs/utility/assert.html (props changed)
   branches/release/libs/utility/assert_test.cpp (props changed)
   branches/release/libs/utility/swap.html (props changed)
   branches/release/libs/utility/swap/test/std_bitset.cpp (props changed)
   branches/release/libs/utility/value_init.htm (props changed)
   branches/release/libs/utility/value_init_test.cpp (props changed)
   branches/release/libs/uuid/ (props changed)
   branches/release/libs/wave/ (props changed)
   branches/release/more/ (props changed)
   branches/release/rst.css (props changed)
   branches/release/status/ (props changed)
   branches/release/status/Jamfile.v2 (props changed)
   branches/release/status/explicit-failures-markup.xml (props changed)
   branches/release/tools/ (props changed)
   branches/release/tools/bcp/ (props changed)
   branches/release/tools/boostbook/ (props changed)
   branches/release/tools/build/v2/ (props changed)
   branches/release/tools/inspect/ (props changed)
   branches/release/tools/quickbook/ (props changed)
   branches/release/tools/quickbook/doc/ (props changed)
   branches/release/tools/quickbook/src/ (props changed)
   branches/release/tools/quickbook/test/ (props changed)
   branches/release/tools/regression/ (props changed)
   branches/release/tools/regression/src/library_status.cpp (props changed)
   branches/release/tools/release/ (props changed)
   branches/release/tools/wave/ (props changed)
Text files modified:
   branches/release/boost/spirit/home/support/adapt_adt_attributes.hpp | 100 ++++++++++++++++++++++
   branches/release/boost/spirit/home/support/detail/what_function.hpp | 3
   branches/release/boost/spirit/home/support/utree/detail/utree_detail1.hpp | 3
   branches/release/boost/spirit/home/support/utree/detail/utree_detail2.hpp | 173 +++++++++++++++++++++++++++------------
   branches/release/boost/spirit/home/support/utree/operators.hpp | 146 +++++++++++++++++++++++++--------
   branches/release/boost/spirit/home/support/utree/utree.hpp | 92 +++++++++++++++++----
   branches/release/libs/spirit/example/qi/german_floating_point.cpp | 16 +-
   branches/release/libs/spirit/repository/doc/html/index.html | 4
   branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html | 18 ++--
   branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html | 24 ++--
   branches/release/libs/spirit/repository/doc/html/spirit_repository/preface.html | 10 +-
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html | 18 ++--
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html | 16 +-
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html | 26 +++---
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html | 22 ++--
   branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html | 16 +-
   branches/release/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp | 58 ++++++++++---
   branches/release/libs/spirit/test/support/utree.cpp | 116 ++++++++++++++------------
   18 files changed, 590 insertions(+), 271 deletions(-)

Modified: branches/release/boost/spirit/home/support/adapt_adt_attributes.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/adapt_adt_attributes.hpp (original)
+++ branches/release/boost/spirit/home/support/adapt_adt_attributes.hpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -31,12 +31,28 @@
     template <typename T, int N, bool Const>
     struct container_value<fusion::extension::adt_attribute_proxy<T, N, Const> >
       : container_value<
- typename fusion::extension::adt_attribute_proxy<
- T, N, Const
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<
+ T, N, Const
+ >::type
>::type
>
     {};
 
+ template <typename T, int N, bool Const>
+ struct container_value<
+ fusion::extension::adt_attribute_proxy<T, N, Const> const>
+ : container_value<
+ typename add_const<
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<
+ T, N, Const
+ >::type
+ >::type
+ >::type
+ >
+ {};
+
     template <typename T, int N, typename Val>
     struct push_back_container<
         fusion::extension::adt_attribute_proxy<T, N, false>
@@ -59,10 +75,88 @@
     template <typename T, int N, bool Const>
     struct container_iterator<fusion::extension::adt_attribute_proxy<T, N, Const> >
       : container_iterator<
- typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<
+ T, N, Const
+ >::type
+ >::type
>
     {};
 
+ template <typename T, int N, bool Const>
+ struct container_iterator<
+ fusion::extension::adt_attribute_proxy<T, N, Const> const>
+ : container_iterator<
+ typename add_const<
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<
+ T, N, Const
+ >::type
+ >::type
+ >::type
+ >
+ {};
+
+ template <typename T, int N, bool Const>
+ struct begin_container<fusion::extension::adt_attribute_proxy<T, N, Const> >
+ {
+ typedef typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ >::type container_type;
+
+ static typename container_iterator<container_type>::type
+ call(fusion::extension::adt_attribute_proxy<T, N, Const>& c)
+ {
+ return c.get().begin();
+ }
+ };
+
+ template <typename T, int N, bool Const>
+ struct begin_container<fusion::extension::adt_attribute_proxy<T, N, Const> const>
+ {
+ typedef typename add_const<
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ >::type
+ >::type container_type;
+
+ static typename container_iterator<container_type>::type
+ call(fusion::extension::adt_attribute_proxy<T, N, Const> const& c)
+ {
+ return c.get().begin();
+ }
+ };
+
+ template <typename T, int N, bool Const>
+ struct end_container<fusion::extension::adt_attribute_proxy<T, N, Const> >
+ {
+ typedef typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ >::type container_type;
+
+ static typename container_iterator<container_type>::type
+ call(fusion::extension::adt_attribute_proxy<T, N, Const>& c)
+ {
+ return c.get().end();
+ }
+ };
+
+ template <typename T, int N, bool Const>
+ struct end_container<fusion::extension::adt_attribute_proxy<T, N, Const> const>
+ {
+ typedef typename add_const<
+ typename remove_reference<
+ typename fusion::extension::adt_attribute_proxy<T, N, Const>::type
+ >::type
+ >::type container_type;
+
+ static typename container_iterator<container_type>::type
+ call(fusion::extension::adt_attribute_proxy<T, N, Const> const& c)
+ {
+ return c.get().end();
+ }
+ };
+
     ///////////////////////////////////////////////////////////////////////////
     template <typename T, int N, typename Val>
     struct assign_to_attribute_from_value<

Modified: branches/release/boost/spirit/home/support/detail/what_function.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/detail/what_function.hpp (original)
+++ branches/release/boost/spirit/home/support/detail/what_function.hpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -32,7 +32,8 @@
 #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
             component; // suppresses warning: C4100: 'component' : unreferenced formal parameter
 #endif
- get<std::list<info> >(what.value).push_back(component.what(context));
+ boost::get<std::list<info> >(what.value).
+ push_back(component.what(context));
         }
 
         info& what;

Modified: branches/release/boost/spirit/home/support/utree/detail/utree_detail1.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/utree/detail/utree_detail1.hpp (original)
+++ branches/release/boost/spirit/home/support/utree/detail/utree_detail1.hpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -18,9 +18,6 @@
     struct index_impl;
     struct assign_impl;
 
- template <typename T>
- struct get_impl;
-
     ///////////////////////////////////////////////////////////////////////////
     // Our POD double linked list. Straightforward implementation.
     // This implementation is very primitive and is not meant to be

Modified: branches/release/boost/spirit/home/support/utree/detail/utree_detail2.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/utree/detail/utree_detail2.hpp (original)
+++ branches/release/boost/spirit/home/support/utree/detail/utree_detail2.hpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -456,7 +456,8 @@
             switch (x.get_type())
             {
                 default:
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception("corrupt utree type", x.get_type()));
                     break;
 
                 case type::invalid_type:
@@ -519,7 +520,8 @@
             switch (x.get_type())
             {
                 default:
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception("corrupt utree type", x.get_type()));
                     break;
 
                 case type::invalid_type:
@@ -578,6 +580,42 @@
 
     struct index_impl
     {
+ static utree& apply(utree& ut, std::size_t i)
+ {
+ switch (ut.get_type())
+ {
+ case utree_type::reference_type:
+ return apply(ut.deref(), i);
+ case utree_type::range_type:
+ return apply(ut.r.first, i);
+ case utree_type::list_type:
+ return apply(ut.l.first, i);
+ default:
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("index operation performed on non-list utree type",
+ ut.get_type()));
+ }
+ }
+
+ static utree const& apply(utree const& ut, std::size_t i)
+ {
+ switch (ut.get_type())
+ {
+ case utree_type::reference_type:
+ return apply(ut.deref(), i);
+ case utree_type::range_type:
+ return apply(ut.r.first, i);
+ case utree_type::list_type:
+ return apply(ut.l.first, i);
+ default:
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("index operation performed on non-list utree type",
+ ut.get_type()));
+ }
+ }
+
         static utree& apply(list::node* node, std::size_t i)
         {
             for (; i > 0; --i)
@@ -963,33 +1001,12 @@
         return detail::visit_impl<utree, utree>::apply(x, y, f);
     }
 
- inline utree& utree::operator[](std::size_t i)
- {
- if (get_type() == type::reference_type)
- return (*p)[i];
- else if (get_type() == type::range_type)
- return detail::index_impl::apply(r.first, i);
-
- // otherwise...
- if (get_type() != type::list_type || size() <= i)
- boost::throw_exception(bad_type_exception());
-
- return detail::index_impl::apply(l.first, i);
- }
-
- inline utree const& utree::operator[](std::size_t i) const
- {
- if (get_type() == type::reference_type)
- return (*(utree const*)p)[i];
- else if (get_type() == type::range_type)
- return detail::index_impl::apply(r.first, i);
+ inline utree::reference get(utree::reference ut, utree::size_type i)
+ { return detail::index_impl::apply(ut, i); }
 
- // otherwise...
- if (get_type() != type::list_type || size() <= i)
- boost::throw_exception(bad_type_exception());
-
- return detail::index_impl::apply(l.first, i);
- }
+ inline utree::const_reference
+ get(utree::const_reference ut, utree::size_type i)
+ { return detail::index_impl::apply(ut, i); }
 
     template <typename T>
     inline void utree::push_front(T const& val)
@@ -997,7 +1014,7 @@
         if (get_type() == type::reference_type)
             return p->push_front(val);
 
- ensure_list_type();
+ ensure_list_type("push_front()");
         l.push_front(val);
     }
 
@@ -1007,7 +1024,7 @@
         if (get_type() == type::reference_type)
             return p->push_back(val);
 
- ensure_list_type();
+ ensure_list_type("push_back()");
         l.push_back(val);
     }
 
@@ -1017,7 +1034,7 @@
         if (get_type() == type::reference_type)
             return p->insert(pos, val);
 
- ensure_list_type();
+ ensure_list_type("insert()");
         if (!pos.node)
         {
             l.push_back(val);
@@ -1033,7 +1050,7 @@
         if (get_type() == type::reference_type)
             return p->insert(pos, n, val);
 
- ensure_list_type();
+ ensure_list_type("insert()");
         for (std::size_t i = 0; i != n; ++i)
             insert(pos, val);
     }
@@ -1044,7 +1061,7 @@
         if (get_type() == type::reference_type)
             return p->insert(pos, first, last);
 
- ensure_list_type();
+ ensure_list_type("insert()");
         while (first != last)
             insert(pos, *first++);
     }
@@ -1080,7 +1097,10 @@
         if (get_type() == type::reference_type)
             return p->pop_front();
         if (get_type() != type::list_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("pop_front() called on non-list utree type",
+ get_type()));
 
         l.pop_front();
     }
@@ -1090,7 +1110,10 @@
         if (get_type() == type::reference_type)
             return p->pop_back();
         if (get_type() != type::list_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("pop_back() called on non-list utree type",
+ get_type()));
 
         l.pop_back();
     }
@@ -1100,7 +1123,10 @@
         if (get_type() == type::reference_type)
             return p->erase(pos);
         if (get_type() != type::list_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("erase() called on non-list utree type",
+ get_type()));
 
         detail::list::node* np = l.erase(pos.node);
         return iterator(np, np?np->prev:l.last);
@@ -1112,7 +1138,10 @@
             return p->erase(first, last);
 
         if (get_type() != type::list_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("erase() called on non-list utree type",
+ get_type()));
         while (first != last)
             erase(first++);
         return last;
@@ -1126,7 +1155,7 @@
             return iterator(r.first, 0);
 
         // otherwise...
- ensure_list_type();
+ ensure_list_type("begin()");
         return iterator(l.first, 0);
     }
 
@@ -1138,7 +1167,7 @@
             return iterator(0, r.first);
 
         // otherwise...
- ensure_list_type();
+ ensure_list_type("end()");
         return iterator(0, l.last);
     }
 
@@ -1150,7 +1179,7 @@
             return ref_iterator(r.first, 0);
 
         // otherwise...
- ensure_list_type();
+ ensure_list_type("ref_begin()");
         return ref_iterator(l.first, 0);
     }
 
@@ -1162,7 +1191,7 @@
             return ref_iterator(0, r.first);
 
         // otherwise...
- ensure_list_type();
+ ensure_list_type("ref_end()");
         return ref_iterator(0, l.last);
     }
 
@@ -1175,7 +1204,10 @@
 
         // otherwise...
         if (get_type() != type::list_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("begin() called on non-list utree type",
+ get_type()));
 
         return const_iterator(l.first, 0);
     }
@@ -1189,7 +1221,10 @@
 
         // otherwise...
         if (get_type() != type::list_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("end() called on non-list utree type",
+ get_type()));
 
         return const_iterator(0, l.last);
     }
@@ -1216,6 +1251,8 @@
 
         if (t == type::range_type)
         {
+ // FIXME: O(n), and we have the room to store the size of a range
+ // in the union if we compute it when assigned/constructed.
             std::size_t size = 0;
             detail::list::node* n = r.first;
             while (n)
@@ -1229,7 +1266,10 @@
             return l.size;
 
         if (t != type::nil_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("size() called on non-list utree type",
+ get_type()));
 
         return 0;
     }
@@ -1251,7 +1291,10 @@
 
         // otherwise...
         if (get_type() != type::list_type || l.first == 0)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("front() called on non-list utree type",
+ get_type()));
 
         return l.first->val;
     }
@@ -1268,7 +1311,10 @@
 
         // otherwise...
         if (get_type() != type::list_type || l.last == 0)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("back() called on non-list utree type",
+ get_type()));
 
         return l.last->val;
     }
@@ -1285,7 +1331,10 @@
 
         // otherwise...
         if (get_type() != type::list_type || l.first == 0)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("front() called on non-list utree type",
+ get_type()));
 
         return l.first->val;
     }
@@ -1302,7 +1351,10 @@
 
         // otherwise...
         if (get_type() != type::list_type || l.last == 0)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception
+ ("back() called on non-list utree type",
+ get_type()));
 
         return l.last->val;
     }
@@ -1324,7 +1376,7 @@
         s.set_type(t);
     }
 
- inline void utree::ensure_list_type()
+ inline void utree::ensure_list_type(char const* failed_in)
     {
         type::info t = get_type();
         if (t == type::invalid_type)
@@ -1334,7 +1386,9 @@
         }
         else if (get_type() != type::list_type)
         {
- boost::throw_exception(bad_type_exception());
+ std::string msg = failed_in;
+ msg += "called on non-list and non-invalid utree type";
+ BOOST_THROW_EXCEPTION(bad_type_exception(msg.c_str(), get_type()));
         }
     }
 
@@ -1365,7 +1419,8 @@
         switch (other.get_type())
         {
             default:
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception("corrupt utree type", other.get_type()));
                 break;
             case type::invalid_type:
             case type::nil_type:
@@ -1440,7 +1495,7 @@
         To dispatch(From const&, boost::mpl::false_) const
         {
             // From is NOT convertible to To !!!
- boost::throw_exception(std::bad_cast());
+ throw std::bad_cast();
             return To();
         }
 
@@ -1466,7 +1521,7 @@
         T* operator()(From const&) const
         {
             // From is NOT convertible to T !!!
- boost::throw_exception(std::bad_cast());
+ throw std::bad_cast();
             return 0;
         }
 
@@ -1500,7 +1555,9 @@
             case type::string_range_type:
             case type::binary_type:
             case type::symbol_type:
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception(
+ "tag() called on string utree type", get_type()));
             default:
               break;
         }
@@ -1515,7 +1572,9 @@
             case type::string_range_type:
             case type::binary_type:
             case type::symbol_type:
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception(
+ "tag() called on string utree type", get_type()));
             default:
               break;
         }
@@ -1525,7 +1584,9 @@
     inline utree utree::eval(scope const& env) const
     {
         if (get_type() != type::function_type)
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(
+ bad_type_exception(
+ "eval() called on non-function utree type", get_type()));
         return (*pf)(env);
     }
 }}

Modified: branches/release/boost/spirit/home/support/utree/operators.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/utree/operators.hpp (original)
+++ branches/release/boost/spirit/home/support/utree/operators.hpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -24,22 +24,6 @@
 
 namespace boost { namespace spirit
 {
- struct illegal_arithmetic_operation : utree_exception
- {
- virtual const char* what() const throw()
- {
- return "utree: Illegal arithmetic operation.";
- }
- };
-
- struct illegal_integral_operation : utree_exception
- {
- virtual const char* what() const throw()
- {
- return "utree: Illegal integral operation.";
- }
- };
-
     // Relational operators
     bool operator==(utree const& a, utree const& b);
     bool operator<(utree const& a, utree const& b);
@@ -175,25 +159,33 @@
 
         bool operator()(utree::invalid_type, utree::invalid_type) const
         {
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("no less-than comparison for this utree type",
+ utree_type::invalid_type));
             return false; // no less than comparison for nil
         }
 
         bool operator()(utree::nil_type, utree::nil_type) const
         {
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("no less-than comparison for this utree type",
+ utree_type::nil_type));
             return false; // no less than comparison for nil
         }
 
         bool operator()(any_ptr const&, any_ptr const&) const
         {
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("no less-than comparison for this utree type",
+ utree_type::any_type));
             return false; // no less than comparison for any_ptr
         }
 
         bool operator()(function_base const&, function_base const&) const
         {
- boost::throw_exception(bad_type_exception());
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("no less-than comparison for this utree type",
+ utree_type::function_type));
             return false; // no less than comparison of functions
         }
     };
@@ -354,7 +346,6 @@
         template <typename A, typename B>
         utree dispatch(A const&, B const&, boost::mpl::false_) const
         {
- boost::throw_exception(illegal_arithmetic_operation());
             return utree(); // cannot apply to non-arithmetic types
         }
 
@@ -377,7 +368,6 @@
         template <typename A>
         utree dispatch(A const&, boost::mpl::false_) const
         {
- boost::throw_exception(illegal_arithmetic_operation());
             return utree(); // cannot apply to non-arithmetic types
         }
 
@@ -403,7 +393,6 @@
         template <typename A, typename B>
         utree dispatch(A const&, B const&, boost::mpl::false_) const
         {
- boost::throw_exception(illegal_integral_operation());
             return utree(); // cannot apply to non-integral types
         }
 
@@ -426,7 +415,6 @@
         template <typename A>
         utree dispatch(A const&, boost::mpl::false_) const
         {
- boost::throw_exception(illegal_integral_operation());
             return utree(); // cannot apply to non-integral types
         }
 
@@ -542,7 +530,7 @@
 
     inline utree operator&&(utree const& a, utree const& b)
     {
- return utree::visit(a, b, logical_function_and_);
+ return utree::visit(a, b, logical_function_and_);
     }
 
     inline utree operator||(utree const& a, utree const& b)
@@ -557,62 +545,146 @@
 
     inline utree operator+(utree const& a, utree const& b)
     {
- return utree::visit(a, b, arithmetic_function_plus);
+ utree r = utree::visit(a, b, arithmetic_function_plus);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("addition performed on non-arithmetic utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator-(utree const& a, utree const& b)
     {
- return utree::visit(a, b, arithmetic_function_minus);
+ utree r = utree::visit(a, b, arithmetic_function_minus);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("subtraction performed on non-arithmetic utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator*(utree const& a, utree const& b)
     {
- return utree::visit(a, b, arithmetic_function_times);
+ utree r = utree::visit(a, b, arithmetic_function_times);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("multiplication performed on non-arithmetic utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator/(utree const& a, utree const& b)
     {
- return utree::visit(a, b, arithmetic_function_divides);
+ utree r = utree::visit(a, b, arithmetic_function_divides);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("division performed on non-arithmetic utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator%(utree const& a, utree const& b)
     {
- return utree::visit(a, b, integral_function_modulus);
+ utree r = utree::visit(a, b, integral_function_modulus);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("modulos performed on non-integral utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator-(utree const& a)
     {
- return utree::visit(a, arithmetic_function_negate);
+ utree r = utree::visit(a, arithmetic_function_negate);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("negation performed on non-arithmetic utree type",
+ a.which()));
+ }
+ return r;
     }
 
     inline utree operator&(utree const& a, utree const& b)
     {
- return utree::visit(a, b, integral_function_bitand_);
+ utree r = utree::visit(a, b, integral_function_bitand_);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("bitwise and performed on non-integral utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator|(utree const& a, utree const& b)
     {
- return utree::visit(a, b, integral_function_bitor_);
+ utree r = utree::visit(a, b, integral_function_bitor_);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("bitwise or performed on non-integral utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator^(utree const& a, utree const& b)
     {
- return utree::visit(a, b, integral_function_bitxor_);
+ utree r = utree::visit(a, b, integral_function_bitxor_);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("bitwise xor performed on non-integral utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator<<(utree const& a, utree const& b)
     {
- return utree::visit(a, b, integral_function_shift_left);
+ utree r = utree::visit(a, b, integral_function_shift_left);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("left shift performed on non-integral utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator>>(utree const& a, utree const& b)
     {
- return utree::visit(a, b, integral_function_shift_right);
+ utree r = utree::visit(a, b, integral_function_shift_right);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("right shift performed on non-integral utree types",
+ a.which(), b.which()));
+ }
+ return r;
     }
 
     inline utree operator~(utree const& a)
     {
- return utree::visit(a, integral_function_invert);
+ utree r = utree::visit(a, integral_function_invert);
+ if (r.which() == utree_type::invalid_type)
+ {
+ BOOST_THROW_EXCEPTION(bad_type_exception
+ ("inversion performed on non-integral utree type",
+ a.which()));
+ }
+ return r;
     }
 }}
 

Modified: branches/release/boost/spirit/home/support/utree/utree.hpp
==============================================================================
--- branches/release/boost/spirit/home/support/utree/utree.hpp (original)
+++ branches/release/boost/spirit/home/support/utree/utree.hpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -12,9 +12,11 @@
 #include <cstddef>
 #include <algorithm>
 #include <string>
-#include <ostream>
+#include <iostream>
+#include <sstream>
 #include <typeinfo>
 
+#include <boost/integer.hpp>
 #include <boost/throw_exception.hpp>
 #include <boost/assert.hpp>
 #include <boost/noncopyable.hpp>
@@ -45,13 +47,7 @@
        function, which applies to certain stored utree_type's only, but this
        precondition is violated as the `utree` instance holds some other type.
     */
- struct bad_type_exception : utree_exception
- {
- virtual const char* what() const throw()
- {
- return "utree: Illegal operation for currently stored data.";
- }
- };
+ struct bad_type_exception /*: utree_exception*/;
     //]
 
     //[utree_types
@@ -86,9 +82,65 @@
 
             binary_type // Arbitrary binary data
         };
+ typedef boost::uint_t<sizeof(info)*8>::exact exact_integral_type;
+ typedef boost::uint_t<sizeof(info)*8>::fast fast_integral_type;
     };
     //]
 
+ // streaming operator for utree types - essential for diagnostics
+ inline std::ostream& operator<<(std::ostream& out, utree_type::info t)
+ {
+ switch (t) {
+ case utree_type::invalid_type: { out << "invalid"; break; }
+ case utree_type::nil_type: { out << "nil"; break; }
+ case utree_type::list_type: { out << "list"; break; }
+ case utree_type::range_type: { out << "range"; break; }
+ case utree_type::reference_type: { out << "reference"; break; }
+ case utree_type::any_type: { out << "any"; break; }
+ case utree_type::function_type: { out << "function"; break; }
+ case utree_type::bool_type: { out << "bool"; break; }
+ case utree_type::int_type: { out << "int"; break; }
+ case utree_type::double_type: { out << "double"; break; }
+ case utree_type::string_type: { out << "string"; break; }
+ case utree_type::string_range_type: { out << "string_range"; break; }
+ case utree_type::symbol_type: { out << "symbol"; break; }
+ case utree_type::binary_type: { out << "binary"; break; }
+ default: { out << "unknown"; break; }
+ }
+ out << std::hex << "[0x"
+ << static_cast<utree_type::fast_integral_type>(t) << "]";
+ return out;
+ }
+
+ struct bad_type_exception : utree_exception
+ {
+ std::string msg;
+
+ bad_type_exception(char const* error, utree_type::info got)
+ : msg()
+ {
+ std::ostringstream oss;
+ oss << "utree: " << error
+ << " (got utree type '" << got << "')";
+ msg = oss.str();
+ }
+
+ bad_type_exception(char const* error, utree_type::info got1,
+ utree_type::info got2)
+ : msg()
+ {
+ std::ostringstream oss;
+ oss << "utree: " << error
+ << " (got utree types '" << got1 << "' and '" << got2 << "')";
+ msg = oss.str();
+ }
+
+ virtual ~bad_type_exception() throw() {}
+
+ virtual const char* what() const throw()
+ { return msg.c_str(); }
+ };
+
     ///////////////////////////////////////////////////////////////////////////
     // A typed string with parametric Base storage. The storage can be any
     // range or (stl container) of chars.
@@ -471,17 +523,16 @@
         ref_iterator ref_end();
         //]
 
- // random access
- reference operator[](size_type);
- const_reference operator[](size_type) const;
-
         // This clears the utree instance and resets its type to `invalid_type`
         void clear();
 
         void swap(utree&);
-
+
         bool empty() const;
+
         size_type size() const;
+ /*`[warning `size()` has O(n) complexity on `utree` ranges. On utree
+ lists, it has O(1) complexity.]`*/
 
         ////////////////////////////////////////////////////////////////////////
 
@@ -507,7 +558,7 @@
 
     //<-
     protected:
- void ensure_list_type();
+ void ensure_list_type(char const* failed_in = "ensure_list_type()");
 
     private:
         typedef utree_type type;
@@ -517,9 +568,6 @@
         friend struct detail::index_impl;
         friend struct detail::assign_impl;
 
- template <class T>
- friend struct detail::get_impl;
-
         type::info get_type() const;
         void set_type(type::info);
         void free();
@@ -541,11 +589,19 @@
     };
     //]
 
+ //[utree_tuple_interface
+ /*<-*/inline/*->*/
+ utree::reference get(utree::reference, utree::size_type);
+ /*<-*/inline/*->*/
+ utree::const_reference get(utree::const_reference, utree::size_type);
+ /*`[warning `get()` has O(n) complexity.]`*/
+ //]
+
     struct utree::list_type : utree
     {
         using utree::operator=;
 
- list_type() : utree() { ensure_list_type(); }
+ list_type() : utree() { ensure_list_type("list_type()"); }
 
         template <typename T0>
         list_type(T0 t0) : utree(t0) {}

Modified: branches/release/libs/spirit/example/qi/german_floating_point.cpp
==============================================================================
--- branches/release/libs/spirit/example/qi/german_floating_point.cpp (original)
+++ branches/release/libs/spirit/example/qi/german_floating_point.cpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -11,14 +11,14 @@
 template <typename T>
 struct german_real_policies : qi::real_policies<T>
 {
- template <typename Iterator>
- static bool parse_dot(Iterator& first, Iterator const& last)
- {
- if (first == last || *first != ',')
- return false;
- ++first;
- return true;
- }
+ template <typename Iterator>
+ static bool parse_dot(Iterator& first, Iterator const& last)
+ {
+ if (first == last || *first != ',')
+ return false;
+ ++first;
+ return true;
+ }
 };
 
 qi::real_parser<double, german_real_policies<double> > const german_double;

Modified: branches/release/libs/spirit/repository/doc/html/index.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/index.html (original)
+++ branches/release/libs/spirit/repository/doc/html/index.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -33,7 +33,7 @@
 </div></div>
 <div><p class="copyright">Copyright &#169; 2001-2011 Joel de Guzman, Hartmut Kaiser</p></div>
 <div><div class="legalnotice">
-<a name="id863156"></a><p>
+<a name="id820812"></a><p>
         Distributed under the Boost Software License, Version 1.0. (See accompanying
         file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
       </p>
@@ -90,7 +90,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: March 26, 2011 at 19:23:38 GMT</small></p></td>
+<td align="left"><p><small>Last revised: April 15, 2011 at 23:36:10 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/directives/karma_confix_generator.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -28,7 +28,7 @@
         Confix Generator</a>
 </h4></div></div></div>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.description"></a><h6>
-<a name="id898353"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.description-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.description">Description</a>
         </h6>
 <p>
@@ -93,20 +93,20 @@
           tag using a simple: <code class="computeroutput"><span class="identifier">ol</span><span class="special">[</span><span class="string">"Some text"</span><span class="special">]</span></code> (which results in <code class="computeroutput"><span class="special">&lt;</span><span class="identifier">ol</span><span class="special">&gt;</span><span class="identifier">Some</span> <span class="identifier">text</span><span class="special">&lt;/</span><span class="identifier">ol</span><span class="special">&gt;</span></code>).
         </p>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.header"></a><h6>
-<a name="id899318"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.header-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/karma/directive/confix.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.synopsis"></a><h6>
-<a name="id899392"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.synopsis-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">confix</span><span class="special">(</span><span class="identifier">prefix</span><span class="special">,</span> <span class="identifier">suffix</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
 </pre>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.parameters"></a><h6>
-<a name="id899440"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.parameters-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.parameters">Parameters</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -175,7 +175,7 @@
           All three parameters can be arbitrary complex generators themselves.
         </p>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.attribute"></a><h6>
-<a name="id899603"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.attribute-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.attribute">Attribute</a>
         </h6>
 <p>
@@ -202,7 +202,7 @@
           </p></td></tr>
 </table></div>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.example"></a><h6>
-<a name="id899778"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.example-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.example">Example</a>
         </h6>
 <p>
@@ -211,7 +211,7 @@
           styles and a function prototype (for the full example code see here: confix.cpp)
         </p>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.prerequisites"></a><h6>
-<a name="id899808"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.prerequisites-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -241,7 +241,7 @@
 <p>
         </p>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles"></a><h6>
-<a name="id900044"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_different_comment_styles">Generating
           Different Comment Styles</a>
         </h6>
@@ -285,7 +285,7 @@
           */</span> </code>.
         </p>
 <a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype"></a><h6>
-<a name="id900338"></a>
+<a name="spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype-heading"></a>
           <a class="link" href="karma_confix_generator.html#spirit_repository.karma_components.directives.karma_confix_generator.generating_a_function_prototype">Generating
           a Function Prototype</a>
         </h6>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/karma_components/nonterminal/subrule.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -28,7 +28,7 @@
         subrules</a>
 </h4></div></div></div>
 <a name="spirit_repository.karma_components.nonterminal.subrule.description"></a><h6>
-<a name="id900667"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.description-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.description">Description</a>
         </h6>
 <p>
@@ -86,21 +86,21 @@
           parts), whereas the rest can use rules and grammars.
         </p>
 <a name="spirit_repository.karma_components.nonterminal.subrule.header"></a><h6>
-<a name="id900934"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.header-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/karma/nonterminal/subrule.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">karma_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_"></a><h6>
-<a name="id901009"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__declaration_">Synopsis
           (declaration)</a>
         </h6>
 <pre class="programlisting"><span class="identifier">subrule</span><span class="special">&lt;</span><span class="identifier">ID</span><span class="special">,</span> <span class="identifier">A1</span><span class="special">,</span> <span class="identifier">A2</span><span class="special">&gt;</span> <span class="identifier">sr</span><span class="special">(</span><span class="identifier">name</span><span class="special">);</span>
 </pre>
 <a name="spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_"></a><h6>
-<a name="id901074"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__declaration_">Parameters
           (declaration)</a>
         </h6>
@@ -170,7 +170,7 @@
 </tbody>
 </table></div>
 <a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_"></a><h6>
-<a name="id902369"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.synopsis__usage_">Synopsis
           (usage)</a>
         </h6>
@@ -199,7 +199,7 @@
 <span class="special">)(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...)</span> <span class="comment">// Arguments to group, i.e. to start subrule srA
 </span></pre>
 <a name="spirit_repository.karma_components.nonterminal.subrule.parameters__usage_"></a><h6>
-<a name="id902605"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.parameters__usage_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.parameters__usage_">Parameters
           (usage)</a>
         </h6>
@@ -323,7 +323,7 @@
 </tbody>
 </table></div>
 <a name="spirit_repository.karma_components.nonterminal.subrule.groups"></a><h6>
-<a name="id902931"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.groups-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.groups">Groups</a>
         </h6>
 <p>
@@ -368,7 +368,7 @@
 </span><span class="special">;</span>
 </pre>
 <a name="spirit_repository.karma_components.nonterminal.subrule.attributes"></a><h6>
-<a name="id903325"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.attributes-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.attributes">Attributes</a>
         </h6>
 <p>
@@ -397,7 +397,7 @@
             </li>
 </ul></div>
 <a name="spirit_repository.karma_components.nonterminal.subrule.locals"></a><h6>
-<a name="id903412"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.locals-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.locals">Locals</a>
         </h6>
 <p>
@@ -407,7 +407,7 @@
           refer to the subrule's locals, if present.
         </p>
 <a name="spirit_repository.karma_components.nonterminal.subrule.example"></a><h6>
-<a name="id903448"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.example-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.example">Example</a>
         </h6>
 <p>
@@ -473,7 +473,7 @@
           <a href="../../../../../example/karma/mini_xml_karma_sr.cpp" target="_top">../../example/karma/mini_xml_karma_sr.cpp</a>
         </p>
 <a name="spirit_repository.karma_components.nonterminal.subrule.performance"></a><h6>
-<a name="id904333"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.performance-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.performance">Performance</a>
         </h6>
 <p>
@@ -484,7 +484,7 @@
           subrules is very similar, so performance is very similar too).
         </p>
 <a name="spirit_repository.karma_components.nonterminal.subrule.notes"></a><h6>
-<a name="id904370"></a>
+<a name="spirit_repository.karma_components.nonterminal.subrule.notes-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.karma_components.nonterminal.subrule.notes">Notes</a>
         </h6>
 <p>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/preface.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/preface.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/preface.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -27,7 +27,7 @@
 <a name="spirit_repository.preface"></a><a class="link" href="preface.html" title="Preface">Preface</a>
 </h2></div></div></div>
 <a name="spirit_repository.preface.the_spirit_repository"></a><h4>
-<a name="id863183"></a>
+<a name="spirit_repository.preface.the_spirit_repository-heading"></a>
       <a class="link" href="preface.html#spirit_repository.preface.the_spirit_repository">The Spirit
       Repository</a>
     </h4>
@@ -73,11 +73,11 @@
     </p>
 <p>
       Based on the user feedback and general usability of things it it possible over
- time to move repository components<span class="emphasis"><em>grammars into the /Spirit</em></span>
+ time to move repository components/grammars into the <span class="emphasis"><em>Spirit</em></span>
       core library.
     </p>
 <a name="spirit_repository.preface.how_to_use_this_manual"></a><h4>
-<a name="id863271"></a>
+<a name="spirit_repository.preface.how_to_use_this_manual-heading"></a>
       <a class="link" href="preface.html#spirit_repository.preface.how_to_use_this_manual">How to use
       this manual</a>
     </h4>
@@ -86,7 +86,7 @@
       icons precede some text to indicate:
     </p>
 <div class="table">
-<a name="id863285"></a><p class="title"><b>Table&#160;1.&#160;Icons</b></p>
+<a name="id820945"></a><p class="title"><b>Table&#160;1.&#160;Icons</b></p>
 <div class="table-contents"><table class="table" summary="Icons">
 <colgroup>
 <col>
@@ -208,7 +208,7 @@
       Tools</a>.
     </p>
 <a name="spirit_repository.preface.support"></a><h4>
-<a name="id863540"></a>
+<a name="spirit_repository.preface.support-heading"></a>
       <a class="link" href="preface.html#spirit_repository.preface.support">Support</a>
     </h4>
 <p>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/confix.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -28,7 +28,7 @@
         Confix Parser Directive</a>
 </h4></div></div></div>
 <a name="spirit_repository.qi_components.directives.confix.description"></a><h6>
-<a name="id876299"></a>
+<a name="spirit_repository.qi_components.directives.confix.description-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.description">Description</a>
         </h6>
 <p>
@@ -95,20 +95,20 @@
           </p></td></tr>
 </table></div>
 <a name="spirit_repository.qi_components.directives.confix.header"></a><h6>
-<a name="id878160"></a>
+<a name="spirit_repository.qi_components.directives.confix.header-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/qi/directive/confix.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_confix</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.qi_components.directives.confix.synopsis"></a><h6>
-<a name="id878238"></a>
+<a name="spirit_repository.qi_components.directives.confix.synopsis-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">confix</span><span class="special">(</span><span class="identifier">prefix</span><span class="special">,</span> <span class="identifier">suffix</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
 </pre>
 <a name="spirit_repository.qi_components.directives.confix.parameters"></a><h6>
-<a name="id878291"></a>
+<a name="spirit_repository.qi_components.directives.confix.parameters-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parameters">Parameters</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -172,7 +172,7 @@
           All three parameters can be arbitrarily complex parsers themselves.
         </p>
 <a name="spirit_repository.qi_components.directives.confix.attribute"></a><h6>
-<a name="id878437"></a>
+<a name="spirit_repository.qi_components.directives.confix.attribute-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.attribute">Attribute</a>
         </h6>
 <p>
@@ -198,7 +198,7 @@
           </p></td></tr>
 </table></div>
 <a name="spirit_repository.qi_components.directives.confix.example"></a><h6>
-<a name="id878675"></a>
+<a name="spirit_repository.qi_components.directives.confix.example-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.example">Example</a>
         </h6>
 <p>
@@ -208,7 +208,7 @@
           see confix.cpp)
         </p>
 <a name="spirit_repository.qi_components.directives.confix.prerequisites"></a><h6>
-<a name="id878710"></a>
+<a name="spirit_repository.qi_components.directives.confix.prerequisites-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -243,7 +243,7 @@
 <p>
         </p>
 <a name="spirit_repository.qi_components.directives.confix.parsing_different_comment_styles"></a><h6>
-<a name="id879120"></a>
+<a name="spirit_repository.qi_components.directives.confix.parsing_different_comment_styles-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_different_comment_styles">Parsing
           Different Comment Styles</a>
         </h6>
@@ -295,7 +295,7 @@
           This is a comment */</span> </code>".
         </p>
 <a name="spirit_repository.qi_components.directives.confix.parsing_tagged_data"></a><h6>
-<a name="id879691"></a>
+<a name="spirit_repository.qi_components.directives.confix.parsing_tagged_data-heading"></a>
           <a class="link" href="confix.html#spirit_repository.qi_components.directives.confix.parsing_tagged_data">Parsing
           Tagged Data</a>
         </h6>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/directives/distinct.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -28,7 +28,7 @@
         Distinct Parser Directive</a>
 </h4></div></div></div>
 <a name="spirit_repository.qi_components.directives.distinct.description"></a><h6>
-<a name="id880040"></a>
+<a name="spirit_repository.qi_components.directives.distinct.description-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.description">Description</a>
         </h6>
 <p>
@@ -140,20 +140,20 @@
           above.
         </p>
 <a name="spirit_repository.qi_components.directives.distinct.header"></a><h6>
-<a name="id881275"></a>
+<a name="spirit_repository.qi_components.directives.distinct.header-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/qi/directive/distinct.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_distinct</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.qi_components.directives.distinct.synopsis"></a><h6>
-<a name="id881353"></a>
+<a name="spirit_repository.qi_components.directives.distinct.synopsis-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">distinct</span><span class="special">(</span><span class="identifier">tail</span><span class="special">)[</span><span class="identifier">subject</span><span class="special">]</span>
 </pre>
 <a name="spirit_repository.qi_components.directives.distinct.parameters"></a><h6>
-<a name="id881397"></a>
+<a name="spirit_repository.qi_components.directives.distinct.parameters-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.parameters">Parameters</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -206,7 +206,7 @@
           All two parameters can be arbitrary complex parsers themselves.
         </p>
 <a name="spirit_repository.qi_components.directives.distinct.attribute"></a><h6>
-<a name="id881504"></a>
+<a name="spirit_repository.qi_components.directives.distinct.attribute-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.attribute">Attribute</a>
         </h6>
 <p>
@@ -220,7 +220,7 @@
 <pre class="programlisting"><span class="identifier">a</span><span class="special">:</span> <span class="identifier">A</span><span class="special">,</span> <span class="identifier">b</span><span class="special">:</span> <span class="identifier">B</span> <span class="special">--&gt;</span> <span class="identifier">distinct</span><span class="special">(</span><span class="identifier">b</span><span class="special">)[</span><span class="identifier">a</span><span class="special">]:</span> <span class="identifier">A</span>
 </pre>
 <a name="spirit_repository.qi_components.directives.distinct.example"></a><h6>
-<a name="id881621"></a>
+<a name="spirit_repository.qi_components.directives.distinct.example-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.example">Example</a>
         </h6>
 <p>
@@ -228,7 +228,7 @@
           parser. distinct.cpp)
         </p>
 <a name="spirit_repository.qi_components.directives.distinct.prerequisites"></a><h6>
-<a name="id881654"></a>
+<a name="spirit_repository.qi_components.directives.distinct.prerequisites-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -257,7 +257,7 @@
 <p>
         </p>
 <a name="spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords"></a><h6>
-<a name="id881890"></a>
+<a name="spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords-heading"></a>
           <a class="link" href="distinct.html#spirit_repository.qi_components.directives.distinct.using_the_distinct_directive_to_match_keywords">Using
           The Distinct Directive to Match keywords</a>
         </h6>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/nonterminal/subrule.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -28,7 +28,7 @@
         subrules</a>
 </h4></div></div></div>
 <a name="spirit_repository.qi_components.nonterminal.subrule.description"></a><h6>
-<a name="id890393"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.description-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.description">Description</a>
         </h6>
 <p>
@@ -97,21 +97,21 @@
           most performance-critical parts), whereas the rest can use rules and grammars.
         </p>
 <a name="spirit_repository.qi_components.nonterminal.subrule.header"></a><h6>
-<a name="id891331"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.header-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/qi/nonterminal/subrule.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_subrule</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_"></a><h6>
-<a name="id891406"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__declaration_">Synopsis
           (declaration)</a>
         </h6>
 <pre class="programlisting"><span class="identifier">subrule</span><span class="special">&lt;</span><span class="identifier">ID</span><span class="special">,</span> <span class="identifier">A1</span><span class="special">,</span> <span class="identifier">A2</span><span class="special">&gt;</span> <span class="identifier">sr</span><span class="special">(</span><span class="identifier">name</span><span class="special">);</span>
 </pre>
 <a name="spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_"></a><h6>
-<a name="id891471"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__declaration_">Parameters
           (declaration)</a>
         </h6>
@@ -181,7 +181,7 @@
 </tbody>
 </table></div>
 <a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_"></a><h6>
-<a name="id891606"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.synopsis__usage_">Synopsis
           (usage)</a>
         </h6>
@@ -210,7 +210,7 @@
 <span class="special">)(</span><span class="identifier">a1</span><span class="special">,</span> <span class="identifier">a2</span><span class="special">,</span> <span class="special">...)</span> <span class="comment">// Arguments to group, i.e. to start subrule srA
 </span></pre>
 <a name="spirit_repository.qi_components.nonterminal.subrule.parameters__usage_"></a><h6>
-<a name="id891841"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.parameters__usage_-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.parameters__usage_">Parameters
           (usage)</a>
         </h6>
@@ -334,7 +334,7 @@
 </tbody>
 </table></div>
 <a name="spirit_repository.qi_components.nonterminal.subrule.groups"></a><h6>
-<a name="id892166"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.groups-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.groups">Groups</a>
         </h6>
 <p>
@@ -379,7 +379,7 @@
 </span><span class="special">;</span>
 </pre>
 <a name="spirit_repository.qi_components.nonterminal.subrule.attributes"></a><h6>
-<a name="id892567"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.attributes-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.attributes">Attributes</a>
         </h6>
 <p>
@@ -408,7 +408,7 @@
             </li>
 </ul></div>
 <a name="spirit_repository.qi_components.nonterminal.subrule.locals"></a><h6>
-<a name="id892657"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.locals-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.locals">Locals</a>
         </h6>
 <p>
@@ -418,7 +418,7 @@
           refer to the subrule's locals, if present.
         </p>
 <a name="spirit_repository.qi_components.nonterminal.subrule.example"></a><h6>
-<a name="id892693"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.example-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.example">Example</a>
         </h6>
 <p>
@@ -506,7 +506,7 @@
           <a href="../../../../../example/qi/mini_xml2_sr.cpp" target="_top">../../example/qi/mini_xml2_sr.cpp</a>
         </p>
 <a name="spirit_repository.qi_components.nonterminal.subrule.performance"></a><h6>
-<a name="id895182"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.performance-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.performance">Performance</a>
         </h6>
 <p>
@@ -514,7 +514,7 @@
           examples to subrules, with various compilers.
         </p>
 <div class="table">
-<a name="id895198"></a><p class="title"><b>Table&#160;2.&#160;Subrules performance</b></p>
+<a name="id840665"></a><p class="title"><b>Table&#160;2.&#160;Subrules performance</b></p>
 <div class="table-contents"><table class="table" summary="Subrules performance">
 <colgroup>
 <col>
@@ -761,7 +761,7 @@
             </li>
 </ul></div>
 <a name="spirit_repository.qi_components.nonterminal.subrule.notes"></a><h6>
-<a name="id895590"></a>
+<a name="spirit_repository.qi_components.nonterminal.subrule.notes-heading"></a>
           <a class="link" href="subrule.html#spirit_repository.qi_components.nonterminal.subrule.notes">Notes</a>
         </h6>
 <p>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/advance.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -28,7 +28,7 @@
         advance Parser</a>
 </h4></div></div></div>
 <a name="spirit_repository.qi_components.primitive.advance.description"></a><h6>
-<a name="id863615"></a>
+<a name="spirit_repository.qi_components.primitive.advance.description-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.description">Description</a>
         </h6>
 <p>
@@ -66,20 +66,20 @@
 <pre class="programlisting"><span class="identifier">little_dword</span><span class="special">[</span><span class="identifier">_a</span> <span class="special">=</span> <span class="identifier">_1</span><span class="special">]</span> <span class="special">&gt;&gt;</span> <span class="identifier">advance</span><span class="special">(</span><span class="identifier">_a</span><span class="special">)</span> <span class="special">&gt;&gt;</span> <span class="identifier">little_dword</span><span class="special">...</span>
 </pre>
 <a name="spirit_repository.qi_components.primitive.advance.header"></a><h6>
-<a name="id871597"></a>
+<a name="spirit_repository.qi_components.primitive.advance.header-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/qi/primitive/advance.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_advance</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.qi_components.primitive.advance.synopsis"></a><h6>
-<a name="id871675"></a>
+<a name="spirit_repository.qi_components.primitive.advance.synopsis-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">advance</span><span class="special">(</span><span class="identifier">distance</span><span class="special">)</span>
 </pre>
 <a name="spirit_repository.qi_components.primitive.advance.parameters"></a><h6>
-<a name="id871712"></a>
+<a name="spirit_repository.qi_components.primitive.advance.parameters-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parameters">Parameters</a>
         </h6>
 <div class="informaltable"><table class="table">
@@ -113,7 +113,7 @@
 </tr></tbody>
 </table></div>
 <a name="spirit_repository.qi_components.primitive.advance.attribute"></a><h6>
-<a name="id871783"></a>
+<a name="spirit_repository.qi_components.primitive.advance.attribute-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.attribute">Attribute</a>
         </h6>
 <p>
@@ -123,7 +123,7 @@
 <pre class="programlisting"><span class="identifier">advance</span> <span class="special">--&gt;</span> <span class="identifier">unused</span>
 </pre>
 <a name="spirit_repository.qi_components.primitive.advance.example"></a><h6>
-<a name="id871837"></a>
+<a name="spirit_repository.qi_components.primitive.advance.example-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.example">Example</a>
         </h6>
 <p>
@@ -132,7 +132,7 @@
           binary data (for the full example code see advance.cpp)
         </p>
 <a name="spirit_repository.qi_components.primitive.advance.prerequisites"></a><h6>
-<a name="id871872"></a>
+<a name="spirit_repository.qi_components.primitive.advance.prerequisites-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -162,7 +162,7 @@
 <p>
         </p>
 <a name="spirit_repository.qi_components.primitive.advance.setting_up_the_grammar"></a><h6>
-<a name="id872143"></a>
+<a name="spirit_repository.qi_components.primitive.advance.setting_up_the_grammar-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.setting_up_the_grammar">Setting
           up the Grammar</a>
         </h6>
@@ -206,7 +206,7 @@
           descend into alternatives.
         </p>
 <a name="spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data"></a><h6>
-<a name="id872598"></a>
+<a name="spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parsing_a_correctly_delimited_string_of_data">Parsing
           a Correctly-delimited String of Data</a>
         </h6>
@@ -245,7 +245,7 @@
 <p>
         </p>
 <a name="spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation"></a><h6>
-<a name="id873282"></a>
+<a name="spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.parsing_the_alternative_representation">Parsing
           the Alternative Representation</a>
         </h6>
@@ -284,7 +284,7 @@
 <p>
         </p>
 <a name="spirit_repository.qi_components.primitive.advance.notes"></a><h6>
-<a name="id875038"></a>
+<a name="spirit_repository.qi_components.primitive.advance.notes-heading"></a>
           <a class="link" href="advance.html#spirit_repository.qi_components.primitive.advance.notes">Notes</a>
         </h6>
 <p>

Modified: branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html
==============================================================================
--- branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html (original)
+++ branches/release/libs/spirit/repository/doc/html/spirit_repository/qi_components/primitive/flush_multi_pass.html 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -28,7 +28,7 @@
         flush_multi_pass parser</a>
 </h4></div></div></div>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.description"></a><h6>
-<a name="id875078"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.description-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.description">Description</a>
         </h6>
 <p>
@@ -53,20 +53,20 @@
           <code class="computeroutput"><span class="identifier">eps</span></code>).
         </p>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.header"></a><h6>
-<a name="id875186"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.header-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.header">Header</a>
         </h6>
 <pre class="programlisting"><span class="comment">// forwards to &lt;boost/spirit/repository/home/qi/primitive/flush_multi_pass.hpp&gt;
 </span><span class="preprocessor">#include</span> <span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span><span class="special">/</span><span class="identifier">include</span><span class="special">/</span><span class="identifier">qi_flush_multi_pass</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
 </pre>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.synopsis"></a><h6>
-<a name="id875259"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.synopsis-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.synopsis">Synopsis</a>
         </h6>
 <pre class="programlisting"><span class="identifier">flush_multi_pass</span>
 </pre>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.parameters"></a><h6>
-<a name="id875280"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.parameters-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.parameters">Parameters</a>
         </h6>
 <p>
@@ -74,7 +74,7 @@
           not require any parameters.
         </p>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.attribute"></a><h6>
-<a name="id875304"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.attribute-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.attribute">Attribute</a>
         </h6>
 <p>
@@ -84,7 +84,7 @@
 <pre class="programlisting"><span class="identifier">flush_multi_pass</span> <span class="special">--&gt;</span> <span class="identifier">unused</span>
 </pre>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.example"></a><h6>
-<a name="id875354"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.example-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.example">Example</a>
         </h6>
 <p>
@@ -96,7 +96,7 @@
           a function prototype (for the full example code see here: flush_multi_pass.cpp)
         </p>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites"></a><h6>
-<a name="id875386"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.prerequisites">Prerequisites</a>
         </h6>
 <p>
@@ -125,7 +125,7 @@
 <p>
         </p>
 <a name="spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer"></a><h6>
-<a name="id875595"></a>
+<a name="spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer-heading"></a>
           <a class="link" href="flush_multi_pass.html#spirit_repository.qi_components.primitive.flush_multi_pass.clearing_the_internal_buffer">Clearing
           the internal buffer</a>
         </h6>

Modified: branches/release/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp
==============================================================================
--- branches/release/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp (original)
+++ branches/release/libs/spirit/test/karma/regression_numerics_adapt_adt.cpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -15,21 +15,20 @@
 #include "test.hpp"
 
 ///////////////////////////////////////////////////////////////////////////////
-class box
+class data1
 {
 private:
     int width_;
     int height_;
 
 public:
-
- box()
- : width_(400),
- height_(400) {}
-
- box(int width, int height)
- : width_(width),
- height_(height) {}
+ data1()
+ : width_(400), height_(400)
+ {}
+
+ data1(int width, int height)
+ : width_(width), height_(height)
+ {}
 
     int width() const { return width_;}
     int height() const { return height_;}
@@ -39,9 +38,33 @@
 };
 
 BOOST_FUSION_ADAPT_ADT(
- box,
- (int, int, obj.width(), obj.set_width(val) )
- (int, int, obj.height(), obj.set_height(val) )
+ data1,
+ (int, int, obj.width(), obj.set_width(val))
+ (int, int, obj.height(), obj.set_height(val))
+);
+
+///////////////////////////////////////////////////////////////////////////////
+class data2
+{
+private:
+ std::string data_;
+
+public:
+ data2()
+ : data_("test")
+ {}
+
+ data2(std::string const& data)
+ : data_(data)
+ {}
+
+ std::string const& data() const { return data_;}
+ void set_data(std::string const& data) { data_ = data;}
+};
+
+BOOST_FUSION_ADAPT_ADT(
+ data2,
+ (std::string, std::string const&, obj.data(), obj.set_data(val))
 );
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -52,10 +75,19 @@
     {
         using boost::spirit::karma::int_;
 
- box b(800, 600);
+ data1 b(800, 600);
         BOOST_TEST(test("width: 800\nheight: 600\n",
             "width: " << int_ << "\n" << "height: " << int_ << "\n", b));
     }
 
+ {
+ using boost::spirit::karma::char_;
+ using boost::spirit::karma::string;
+
+ data2 d("test");
+ BOOST_TEST(test("data: test\n", "data: " << +char_ << "\n", d));
+ BOOST_TEST(test("data: test\n", "data: " << string << "\n", d));
+ }
+
     return boost::report_errors();
 }

Modified: branches/release/libs/spirit/test/support/utree.cpp
==============================================================================
--- branches/release/libs/spirit/test/support/utree.cpp (original)
+++ branches/release/libs/spirit/test/support/utree.cpp 2011-04-15 22:16:56 EDT (Fri, 15 Apr 2011)
@@ -49,6 +49,7 @@
 int main()
 {
     using boost::spirit::utree;
+ using boost::spirit::get;
     using boost::spirit::utf8_symbol_type;
     using boost::spirit::binary_string_type;
 
@@ -56,7 +57,7 @@
         // test the size
         std::cout << "size of utree is: "
             << sizeof(utree) << " bytes" << std::endl;
- BOOST_TEST(sizeof(utree) == sizeof(void*[4]));
+ BOOST_TEST_EQ(sizeof(utree), sizeof(void*[4]));
     }
 
     {
@@ -110,7 +111,7 @@
 
         utree val4("Apple");
         utree val5("Apple");
- BOOST_TEST(val4 == val5);
+ BOOST_TEST_EQ(val4, val5);
 
         utree val6("ApplePie");
         BOOST_TEST(val4 < val6);
@@ -128,7 +129,7 @@
 
         utree val4(utf8_symbol_type("Apple"));
         utree val5(utf8_symbol_type("Apple"));
- BOOST_TEST(val4 == val5);
+ BOOST_TEST_EQ(val4, val5);
 
         utree val6(utf8_symbol_type("ApplePie"));
         BOOST_TEST(val4 < val6);
@@ -146,7 +147,7 @@
 
         utree val4(binary_string_type("\x01"));
         utree val5(binary_string_type("\x01"));
- BOOST_TEST(val4 == val5);
+ BOOST_TEST_EQ(val4, val5);
 
         utree val6(binary_string_type("\x01\x02"));
         BOOST_TEST(val4 < val6);
@@ -158,42 +159,42 @@
         utree val;
         val.push_back(123);
         val.push_back("Chuckie");
- BOOST_TEST(val.size() == 2);
+ BOOST_TEST_EQ(val.size(), 2);
         utree val2;
         val2.push_back(123.456);
         val2.push_back("Mah Doggie");
         val.push_back(val2);
- BOOST_TEST(val.size() == 3);
+ BOOST_TEST_EQ(val.size(), 3);
         BOOST_TEST(check(val, "( 123 \"Chuckie\" ( 123.456 \"Mah Doggie\" ) )"));
         BOOST_TEST(check(val.front(), "123"));
 
         utree val3(nil);
         val3.swap(val);
- BOOST_TEST(val3.size() == 3);
+ BOOST_TEST_EQ(val3.size(), 3);
         BOOST_TEST(check(val, "<nil>"));
         val3.swap(val);
         BOOST_TEST(check(val, "( 123 \"Chuckie\" ( 123.456 \"Mah Doggie\" ) )"));
         val.push_back("another string");
- BOOST_TEST(val.size() == 4);
+ BOOST_TEST_EQ(val.size(), 4);
         BOOST_TEST(check(val, "( 123 \"Chuckie\" ( 123.456 \"Mah Doggie\" ) \"another string\" )"));
         val.pop_front();
         BOOST_TEST(check(val, "( \"Chuckie\" ( 123.456 \"Mah Doggie\" ) \"another string\" )"));
         utree::iterator i = val.begin();
         ++++i;
         val.insert(i, "Right in the middle");
- BOOST_TEST(val.size() == 4);
+ BOOST_TEST_EQ(val.size(), 4);
         BOOST_TEST(check(val, "( \"Chuckie\" ( 123.456 \"Mah Doggie\" ) \"Right in the middle\" \"another string\" )"));
         val.pop_back();
         BOOST_TEST(check(val, "( \"Chuckie\" ( 123.456 \"Mah Doggie\" ) \"Right in the middle\" )"));
- BOOST_TEST(val.size() == 3);
+ BOOST_TEST_EQ(val.size(), 3);
         utree::iterator it = val.end(); --it;
         val.erase(it);
         BOOST_TEST(check(val, "( \"Chuckie\" ( 123.456 \"Mah Doggie\" ) )"));
- BOOST_TEST(val.size() == 2);
+ BOOST_TEST_EQ(val.size(), 2);
 
         val.insert(val.begin(), val2.begin(), val2.end());
         BOOST_TEST(check(val, "( 123.456 \"Mah Doggie\" \"Chuckie\" ( 123.456 \"Mah Doggie\" ) )"));
- BOOST_TEST(val.size() == 4);
+ BOOST_TEST_EQ(val.size(), 4);
     }
 
     {
@@ -211,23 +212,23 @@
         using boost::spirit::invalid;
 
         utree a(nil), b(nil);
- BOOST_TEST(a == b);
+ BOOST_TEST_EQ(a, b);
         a = 123;
         BOOST_TEST(a != b);
         b = 123;
- BOOST_TEST(a == b);
+ BOOST_TEST_EQ(a, b);
         a = 100.00;
         BOOST_TEST(a < b);
 
         b = a = utree(invalid);
- BOOST_TEST(a == b);
+ BOOST_TEST_EQ(a, b);
         a.push_back(1);
         a.push_back("two");
         a.push_back(3.0);
         b.push_back(1);
         b.push_back("two");
         b.push_back(3.0);
- BOOST_TEST(a == b);
+ BOOST_TEST_EQ(a, b);
         b.push_back(4);
         BOOST_TEST(a != b);
         BOOST_TEST(a < b);
@@ -237,31 +238,34 @@
         using boost::spirit::empty_list;
 
         utree a(empty_list);
- a.push_back(1);
- a.push_back(2);
- a.push_back(3);
- a.push_back(4);
- a.push_back(5);
- a.push_back(6);
- a.push_back(7);
- a.push_back(8);
- a.push_back(9);
- a.push_back(10);
- a.push_back(11);
- a.push_back(12);
-
- BOOST_TEST(a[0] == utree(1));
- BOOST_TEST(a[1] == utree(2));
- BOOST_TEST(a[2] == utree(3));
- BOOST_TEST(a[3] == utree(4));
- BOOST_TEST(a[4] == utree(5));
- BOOST_TEST(a[5] == utree(6));
- BOOST_TEST(a[6] == utree(7));
- BOOST_TEST(a[7] == utree(8));
- BOOST_TEST(a[8] == utree(9));
- BOOST_TEST(a[9] == utree(10));
- BOOST_TEST(a[10] == utree(11));
- BOOST_TEST(a[11] == utree(12));
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+ a.push_back(0);
+
+ for (utree::size_type i = 0; i < a.size(); ++i)
+ get(a, i) = int(i + 1);
+
+ BOOST_TEST_EQ(get(a, 0), utree(1));
+ BOOST_TEST_EQ(get(a, 1), utree(2));
+ BOOST_TEST_EQ(get(a, 2), utree(3));
+ BOOST_TEST_EQ(get(a, 3), utree(4));
+ BOOST_TEST_EQ(get(a, 4), utree(5));
+ BOOST_TEST_EQ(get(a, 5), utree(6));
+ BOOST_TEST_EQ(get(a, 6), utree(7));
+ BOOST_TEST_EQ(get(a, 7), utree(8));
+ BOOST_TEST_EQ(get(a, 8), utree(9));
+ BOOST_TEST_EQ(get(a, 9), utree(10));
+ BOOST_TEST_EQ(get(a, 10), utree(11));
+ BOOST_TEST_EQ(get(a, 11), utree(12));
     }
 
     {
@@ -282,7 +286,7 @@
         utree val(123);
         utree ref(boost::ref(val));
         BOOST_TEST(check(ref, "123"));
- BOOST_TEST(ref == utree(123));
+ BOOST_TEST_EQ(ref, utree(123));
 
         val.clear();
         val.push_back(1);
@@ -290,10 +294,10 @@
         val.push_back(3);
         val.push_back(4);
         BOOST_TEST(check(ref, "( 1 2 3 4 )"));
- BOOST_TEST(ref[0] == utree(1));
- BOOST_TEST(ref[1] == utree(2));
- BOOST_TEST(ref[2] == utree(3));
- BOOST_TEST(ref[3] == utree(4));
+ BOOST_TEST_EQ(get(ref, 0), utree(1));
+ BOOST_TEST_EQ(get(ref, 1), utree(2));
+ BOOST_TEST_EQ(get(ref, 2), utree(3));
+ BOOST_TEST_EQ(get(ref, 3), utree(4));
     }
 
     { // put it in an array
@@ -367,18 +371,20 @@
         utree::ref_iterator e = val.ref_end();
 
         utree ref(boost::make_iterator_range(b, e));
- BOOST_TEST(ref[0] == utree(1));
- BOOST_TEST(ref[1] == utree(2));
- BOOST_TEST(ref[2] == utree(3));
- BOOST_TEST(ref[3] == utree(4));
+ BOOST_TEST_EQ(get(ref, 0), utree(1));
+ BOOST_TEST_EQ(get(ref, 1), utree(2));
+ BOOST_TEST_EQ(get(ref, 2), utree(3));
+ BOOST_TEST_EQ(get(ref, 3), utree(4));
         BOOST_TEST(check(ref, "( 1 2 3 4 )"));
     }
 
     {
         // check the tag
+ // TODO: test tags on all utree types (some are invalid and should
+ // throw).
         utree x;
         x.tag(123);
- BOOST_TEST(x.tag() == 123);
+ BOOST_TEST_EQ(x.tag(), 123);
     }
 
     {
@@ -414,11 +420,11 @@
         utree alias(utree::range(i, val.end()), shallow);
 
         BOOST_TEST(check(alias, "( 2 3 4 )"));
- BOOST_TEST(alias.size() == 3);
- BOOST_TEST(alias.front() == 2);
- BOOST_TEST(alias.back() == 4);
+ BOOST_TEST_EQ(alias.size(), 3);
+ BOOST_TEST_EQ(alias.front(), 2);
+ BOOST_TEST_EQ(alias.back(), 4);
         BOOST_TEST(!alias.empty());
- BOOST_TEST(alias[1] == 3);
+ BOOST_TEST_EQ(get(alias, 1), 3);
     }
 
     {


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