Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74534 - in branches/release: . boost boost/algorithm/string boost/archive boost/bimap boost/config boost/date_time boost/date_time/posix_time boost/detail boost/dynamic_bitset boost/filesystem boost/function boost/functional 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/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/locale boost/math boost/msm boost/msm/back boost/msm/front boost/msm/front/detail boost/msm/front/euml boost/msm/mpl_graph boost/numeric/ublas boost/pool boost/program_options boost/program_options/detail boost/property_tree boost/proto boost/proto/detail boost/proto/transform 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/statechart boost/system boost/thread boost/tr1 boost/type_traits boost/typeof boost/unordered boost/utility boost/uuid boost/variant boost/wave boost/xpressive 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/fusion libs/geometry libs/geometry/doc libs/geometry/doc/concept libs/geometry/doc/doxy libs/geometry/doc/generated libs/geometry/doc/html libs/geometry/doc/reference libs/geometry/doc/src 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/locale libs/math libs/math/doc/sf_and_dist libs/math/doc/sf_and_dist/html/math_toolkit/main_overview libs/math/test 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/proto/doc/reference libs/proto/test libs/python libs/range libs/regex libs/serialization libs/serialization/example libs/serialization/src libs/serialization/test libs/signals libs/signals2 libs/signals2/doc libs/spirit libs/spirit/classic/example libs/spirit/doc libs/spirit/example libs/spirit/phoenix libs/spirit/test libs/spirit/test/qi libs/statechart libs/static_assert libs/system libs/thread libs/timer libs/tr1 libs/type_traits libs/typeof/doc libs/unordered libs/utility libs/utility/swap/test libs/uuid libs/wave more status tools tools/bcp tools/boostbook tools/build/v2 tools/build/v2/tools tools/inspect tools/quickbook tools/regression tools/regression/src tools/release tools/wave
From: eric_at_[hidden]
Date: 2011-09-23 11:04:15


Author: eric_niebler
Date: 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
New Revision: 74534
URL: http://svn.boost.org/trac/boost/changeset/74534

Log:
merge [74470], [74481], [74513], [74527] from trunk; fixes #4723, #5905
Added:
   branches/release/boost/proto/detail/remove_typename.hpp
      - copied unchanged from r74527, /trunk/boost/proto/detail/remove_typename.hpp
   branches/release/libs/proto/test/switch.cpp
      - copied unchanged from r74513, /trunk/libs/proto/test/switch.cpp
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/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/cregex.hpp (props changed)
   branches/release/boost/cstdint.hpp (props changed)
   branches/release/boost/date_time/c_time.hpp (props changed)
   branches/release/boost/date_time/date_formatting.hpp (props changed)
   branches/release/boost/date_time/filetime_functions.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/date_time/tz_db_base.hpp (props changed)
   branches/release/boost/detail/ (props changed)
   branches/release/boost/detail/interlocked.hpp (props changed)
   branches/release/boost/dynamic_bitset/dynamic_bitset.hpp (props changed)
   branches/release/boost/filesystem/ (props changed)
   branches/release/boost/filesystem.hpp (props changed)
   branches/release/boost/function/ (props changed)
   branches/release/boost/function/function_template.hpp (props changed)
   branches/release/boost/functional/ (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/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/integer.hpp (props changed)
   branches/release/boost/integer_fwd.hpp (props changed)
   branches/release/boost/integer_traits.hpp (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/locale/ (props changed)
   branches/release/boost/locale.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/msm/active_state_switching_policies.hpp (props changed)
   branches/release/boost/msm/back/ (props changed)
   branches/release/boost/msm/back/any_event.hpp (props changed)
   branches/release/boost/msm/back/args.hpp (props changed)
   branches/release/boost/msm/back/bind_helpers.hpp (props changed)
   branches/release/boost/msm/back/common_types.hpp (props changed)
   branches/release/boost/msm/back/copy_policies.hpp (props changed)
   branches/release/boost/msm/back/default_compile_policy.hpp (props changed)
   branches/release/boost/msm/back/dispatch_table.hpp (props changed)
   branches/release/boost/msm/back/favor_compile_time.hpp (props changed)
   branches/release/boost/msm/back/fold_to_list.hpp (props changed)
   branches/release/boost/msm/back/history_policies.hpp (props changed)
   branches/release/boost/msm/back/metafunctions.hpp (props changed)
   branches/release/boost/msm/back/mpl_graph_fsm_check.hpp (props changed)
   branches/release/boost/msm/back/no_fsm_check.hpp (props changed)
   branches/release/boost/msm/back/queue_container_circular.hpp (props changed)
   branches/release/boost/msm/back/queue_container_deque.hpp (props changed)
   branches/release/boost/msm/back/state_machine.hpp (props changed)
   branches/release/boost/msm/back/tools.hpp (props changed)
   branches/release/boost/msm/common.hpp (props changed)
   branches/release/boost/msm/front/ (props changed)
   branches/release/boost/msm/front/common_states.hpp (props changed)
   branches/release/boost/msm/front/completion_event.hpp (props changed)
   branches/release/boost/msm/front/detail/ (props changed)
   branches/release/boost/msm/front/detail/common_states.hpp (props changed)
   branches/release/boost/msm/front/detail/row2_helper.hpp (props changed)
   branches/release/boost/msm/front/euml/ (props changed)
   branches/release/boost/msm/front/euml/algorithm.hpp (props changed)
   branches/release/boost/msm/front/euml/common.hpp (props changed)
   branches/release/boost/msm/front/euml/container.hpp (props changed)
   branches/release/boost/msm/front/euml/euml.hpp (props changed)
   branches/release/boost/msm/front/euml/euml_typeof.hpp (props changed)
   branches/release/boost/msm/front/euml/guard_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/iteration.hpp (props changed)
   branches/release/boost/msm/front/euml/operator.hpp (props changed)
   branches/release/boost/msm/front/euml/phoenix_placeholders.hpp (props changed)
   branches/release/boost/msm/front/euml/querying.hpp (props changed)
   branches/release/boost/msm/front/euml/state_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/stl.hpp (props changed)
   branches/release/boost/msm/front/euml/stt_grammar.hpp (props changed)
   branches/release/boost/msm/front/euml/transformation.hpp (props changed)
   branches/release/boost/msm/front/functor_row.hpp (props changed)
   branches/release/boost/msm/front/internal_row.hpp (props changed)
   branches/release/boost/msm/front/row2.hpp (props changed)
   branches/release/boost/msm/front/state_machine_def.hpp (props changed)
   branches/release/boost/msm/front/states.hpp (props changed)
   branches/release/boost/msm/mpl_graph/ (props changed)
   branches/release/boost/msm/msm_grammar.hpp (props changed)
   branches/release/boost/msm/proto_config.hpp (props changed)
   branches/release/boost/msm/row_tags.hpp (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/regex.h (props changed)
   branches/release/boost/regex.hpp (props changed)
   branches/release/boost/regex_fwd.hpp (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/type_traits.hpp (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/boost/xpressive/ (props changed)
   branches/release/boostcpp.jam (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/fusion/ (props changed)
   branches/release/libs/geometry/ (props changed)
   branches/release/libs/geometry/doc/ (props changed)
   branches/release/libs/geometry/doc/Jamfile.v2 (props changed)
   branches/release/libs/geometry/doc/about_documentation.qbk (props changed)
   branches/release/libs/geometry/doc/acknowledgments.qbk (props changed)
   branches/release/libs/geometry/doc/compiling.qbk (props changed)
   branches/release/libs/geometry/doc/concept/ (props changed)
   branches/release/libs/geometry/doc/copyright_note_policy.txt (props changed)
   branches/release/libs/geometry/doc/design_rationale.qbk (props changed)
   branches/release/libs/geometry/doc/doxy/ (props changed)
   branches/release/libs/geometry/doc/generated/ (props changed)
   branches/release/libs/geometry/doc/geometry.qbk (props changed)
   branches/release/libs/geometry/doc/html/ (props changed)
   branches/release/libs/geometry/doc/imports.qbk (props changed)
   branches/release/libs/geometry/doc/introduction.qbk (props changed)
   branches/release/libs/geometry/doc/make_qbk.py (props changed)
   branches/release/libs/geometry/doc/matrix.qbk (props changed)
   branches/release/libs/geometry/doc/quickref.xml (props changed)
   branches/release/libs/geometry/doc/quickstart.qbk (props changed)
   branches/release/libs/geometry/doc/readme.txt (props changed)
   branches/release/libs/geometry/doc/reference/ (props changed)
   branches/release/libs/geometry/doc/reference.qbk (props changed)
   branches/release/libs/geometry/doc/src/ (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/locale/ (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/math/test/s_.ipp (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/example/ (props changed)
   branches/release/libs/serialization/src/ (props changed)
   branches/release/libs/serialization/test/test_diamond_complex.cpp (props changed)
   branches/release/libs/signals/ (props changed)
   branches/release/libs/signals2/ (props changed)
   branches/release/libs/signals2/doc/ (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/typeof/doc/typeof.qbk (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/expected_results.xml (props changed)
   branches/release/status/explicit-failures-markup.xml (contents, props changed)
   branches/release/status/explicit-failures.xsd (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/build/v2/tools/mpi.jam (props changed)
   branches/release/tools/inspect/ (props changed)
   branches/release/tools/quickbook/ (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/proto/detail/reverse.hpp | 4
   branches/release/boost/proto/extends.hpp | 13 ++--
   branches/release/boost/proto/make_expr.hpp | 6 +-
   branches/release/boost/proto/matches.hpp | 85 ++++++++++++++++++++---------
   branches/release/boost/proto/operators.hpp | 115 ++++++++++++++++++++++++++++++++-------
   branches/release/boost/proto/proto_fwd.hpp | 8 +-
   branches/release/boost/proto/transform/default.hpp | 4
   branches/release/boost/proto/transform/impl.hpp | 44 +++++++++++++++
   branches/release/libs/proto/doc/reference/extends.xml | 9 +++
   branches/release/libs/proto/doc/reference/matches.xml | 41 ++++++++-----
   branches/release/libs/proto/test/Jamfile.v2 | 1
   branches/release/status/explicit-failures-markup.xml | 1
   12 files changed, 248 insertions(+), 83 deletions(-)

Modified: branches/release/boost/proto/detail/reverse.hpp
==============================================================================
--- branches/release/boost/proto/detail/reverse.hpp (original)
+++ branches/release/boost/proto/detail/reverse.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -49,8 +49,8 @@
         typedef typename meta::end<seq>::type last_type;
 
         reverse_view(Sequence& seq)
- : first(fusion::begin(seq))
- , last(fusion::end(seq))
+ : first(fusion::begin(seq))
+ , last(fusion::end(seq))
         {}
 
         first_type first;

Modified: branches/release/boost/proto/extends.hpp
==============================================================================
--- branches/release/boost/proto/extends.hpp (original)
+++ branches/release/boost/proto/extends.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -32,6 +32,7 @@
 #include <boost/proto/args.hpp>
 #include <boost/proto/traits.hpp>
 #include <boost/proto/generate.hpp>
+#include <boost/proto/detail/remove_typename.hpp>
 
 #ifdef _MSC_VER
 #define BOOST_PROTO_DISABLE_MSVC_C4522 __pragma(warning(disable: 4522))
@@ -160,15 +161,16 @@
                                                                                                     \
         typedef Expr proto_base_expr_; /**< INTERNAL ONLY */ \
         typedef typename proto_base_expr_::proto_base_expr proto_base_expr; \
- typedef Domain proto_domain; \
+ typedef BOOST_PROTO_REMOVE_TYPENAME(Domain) proto_domain; \
         typedef Derived proto_derived_expr; \
+ typedef Domain::proto_generator proto_generator; \
         typedef typename proto_base_expr::proto_tag proto_tag; \
         typedef typename proto_base_expr::proto_args proto_args; \
         typedef typename proto_base_expr::proto_arity proto_arity; \
         typedef typename proto_base_expr::proto_grammar proto_grammar; \
         typedef typename proto_base_expr::address_of_hack_type_ proto_address_of_hack_type_; \
         typedef void proto_is_expr_; /**< INTERNAL ONLY */ \
- static const long proto_arity_c = proto_base_expr::proto_arity_c; \
+ static const long proto_arity_c = proto_base_expr::proto_arity_c; \
         typedef boost::proto::tag::proto_expr fusion_tag; \
         BOOST_PP_REPEAT(BOOST_PROTO_MAX_ARITY, BOOST_PROTO_EXTENDS_CHILD, ~) \
                                                                                                     \
@@ -197,7 +199,6 @@
     #define BOOST_PROTO_BASIC_EXTENDS(Expr, Derived, Domain) \
         BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, Domain) \
         typedef void proto_is_aggregate_; \
- typedef Domain::proto_generator proto_generator; \
         /**< INTERNAL ONLY */
 
     #define BOOST_PROTO_EXTENDS_COPY_ASSIGN_IMPL_(This, Const, Typename) \
@@ -504,8 +505,7 @@
             {}
 
             typedef extends proto_extends;
- BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, Domain)
- typedef typename Domain::proto_generator proto_generator;
+ BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, typename Domain)
             BOOST_PROTO_EXTENDS_ASSIGN_CONST_()
             BOOST_PROTO_EXTENDS_SUBSCRIPT_CONST()
 
@@ -533,8 +533,7 @@
             {}
 
             typedef extends proto_extends;
- BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, Domain)
- typedef typename Domain::proto_generator proto_generator;
+ BOOST_PROTO_BASIC_EXTENDS_(Expr, Derived, typename Domain)
             BOOST_PROTO_EXTENDS_ASSIGN_()
             BOOST_PROTO_EXTENDS_SUBSCRIPT()
 

Modified: branches/release/boost/proto/make_expr.hpp
==============================================================================
--- branches/release/boost/proto/make_expr.hpp (original)
+++ branches/release/boost/proto/make_expr.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -310,9 +310,9 @@
>
             struct impl
               : detail::make_expr_<
- Tag
- , Domain
- BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
+ Tag
+ , Domain
+ BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PROTO_MAX_ARITY, A)
>
             {};
         };

Modified: branches/release/boost/proto/matches.hpp
==============================================================================
--- branches/release/boost/proto/matches.hpp (original)
+++ branches/release/boost/proto/matches.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -402,6 +402,24 @@
         {};
 
         // handle proto::switch_
+ template<typename Expr, typename Tag, typename Args, long Arity, typename Cases, typename Transform>
+ struct matches_<Expr, proto::basic_expr<Tag, Args, Arity>, switch_<Cases, Transform> >
+ : matches_<
+ Expr
+ , proto::basic_expr<Tag, Args, Arity>
+ , typename Cases::template case_<
+ typename when<_,Transform>::template impl<Expr,int,int>::result_type
+ >::proto_grammar
+ >
+ {
+ typedef
+ typename Cases::template case_<
+ typename when<_, Transform>::template impl<Expr, int, int>::result_type
+ >
+ which;
+ };
+
+ // handle proto::switch_ with the default Transform for specially for better compile times
         template<typename Expr, typename Tag, typename Args, long Arity, typename Cases>
         struct matches_<Expr, proto::basic_expr<Tag, Args, Arity>, switch_<Cases> >
           : matches_<
@@ -447,8 +465,9 @@
     /// and \c V defaults to \c not_\<_\>.)
     /// \li An expression \c E matches <tt>not_\<T\></tt> if \c E does
     /// not match \c T.
- /// \li An expression \c E matches <tt>switch_\<C\></tt> if
- /// \c E matches <tt>C::case_\<E::proto_tag\></tt>.
+ /// \li An expression \c E matches <tt>switch_\<C,T\></tt> if
+ /// \c E matches <tt>C::case_\<boost::result_of\<T(E)\>::type\></tt>.
+ /// (Note: T defaults to <tt>tag_of\<_\>()</tt>.)
     ///
     /// A terminal expression <tt>expr\<AT,term\<A\> \></tt> matches
     /// a grammar <tt>expr\<BT,term\<B\> \></tt> if \c BT is \c AT or
@@ -604,8 +623,8 @@
             #endif
             operator()(
                 typename impl::expr_param e
- , typename impl::state_param
- , typename impl::data_param
+ , typename impl::state_param
+ , typename impl::data_param
             ) const
             {
                 return e;
@@ -769,33 +788,47 @@
     };
 
     /// \brief For matching one of a set of alternate grammars, which
- /// are looked up based on an expression's tag type. When used as a
- /// transform, \c switch_\<\> applies the transform associated with
- /// the grammar that matches the expression.
+ /// are looked up based on some property of an expression. The
+ /// property on which to dispatch is specified by the \c Transform
+ /// template parameter, which defaults to <tt>tag_of\<_\>()</tt>.
+ /// That is, when the \c Trannsform is not specified, the alternate
+ /// grammar is looked up using the tag type of the current expression.
     ///
- /// \note \c switch_\<\> is functionally identical to \c or_\<\> but
- /// is often more efficient. It does a fast, O(1) lookup based on an
- /// expression's tag type to find a sub-grammar that may potentially
- /// match the expression.
+ /// When used as a transform, \c switch_\<\> applies the transform
+ /// associated with the grammar that matches the expression.
     ///
- /// An expression type \c E matches <tt>switch_\<C\></tt> if \c E
- /// matches <tt>C::case_\<E::proto_tag\></tt>.
+ /// \note \c switch_\<\> is functionally identical to \c or_\<\> but
+ /// is often more efficient. It does a fast, O(1) lookup using the
+ /// result of the specified transform to find a sub-grammar that may
+ /// potentially match the expression.
+ ///
+ /// An expression type \c E matches <tt>switch_\<C,T\></tt> if \c E
+ /// matches <tt>C::case_\<boost::result_of\<T(E)\>::type\></tt>.
+ ///
+ /// When applying <tt>switch_\<C,T\></tt> as a transform with an
+ /// expression \c e of type \c E, state \c s of type \S and data
+ /// \c d of type \c D, it is equivalent to
+ /// <tt>C::case_\<boost::result_of\<T(E,S,D)\>::type\>()(e, s, d)</tt>.
+ template<typename Cases, typename Transform>
+ struct switch_ : transform<switch_<Cases, Transform> >
+ {
+ typedef switch_ proto_grammar;
+
+ template<typename Expr, typename State, typename Data>
+ struct impl
+ : Cases::template case_<
+ typename when<_, Transform>::template impl<Expr, State, Data>::result_type
+ >::template impl<Expr, State, Data>
+ {};
+ };
+
+ /// INTERNAL ONLY (This is merely a compile-time optimization for the common case)
     ///
- /// When applying <tt>switch_\<C\></tt> as a transform with an
- /// expression \c e of type \c E, state \c s and data \c d, it is
- /// equivalent to <tt>C::case_\<E::proto_tag\>()(e, s, d)</tt>.
     template<typename Cases>
- struct switch_ : transform<switch_<Cases> >
+ struct switch_<Cases> : transform<switch_<Cases> >
     {
         typedef switch_ proto_grammar;
 
- /// \param e An expression
- /// \param s The current state
- /// \param d A data of arbitrary type
- /// \pre <tt>matches\<Expr,switch_\>::value</tt> is \c true.
- /// \return <tt>which()(e, s, d)</tt>, where <tt>which</tt> is
- /// <tt>Cases::case_<typename Expr::proto_tag></tt>
-
         template<typename Expr, typename State, typename Data>
         struct impl
           : Cases::template case_<typename Expr::proto_tag>::template impl<Expr, State, Data>
@@ -901,8 +934,8 @@
 
     /// INTERNAL ONLY
     ///
- template<typename Cases>
- struct is_callable<switch_<Cases> >
+ template<typename Cases, typename Transform>
+ struct is_callable<switch_<Cases, Transform> >
       : mpl::true_
     {};
 

Modified: branches/release/boost/proto/operators.hpp
==============================================================================
--- branches/release/boost/proto/operators.hpp (original)
+++ branches/release/boost/proto/operators.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -10,6 +10,7 @@
 #ifndef BOOST_PROTO_OPERATORS_HPP_EAN_04_01_2005
 #define BOOST_PROTO_OPERATORS_HPP_EAN_04_01_2005
 
+#include <boost/config.hpp>
 #include <boost/preprocessor/punctuation/comma.hpp>
 #include <boost/mpl/logical.hpp>
 #include <boost/utility/enable_if.hpp>
@@ -34,14 +35,14 @@
           : boost::lazy_enable_if_c<
                 boost::mpl::and_<
                     Trait
- , lazy_matches<result_of::make_expr<Tag, basic_default_domain, Arg &>, Grammar>
+ , lazy_matches<result_of::make_expr<Tag, basic_default_domain, Arg>, Grammar>
>::value
- , result_of::make_expr<Tag, Domain, Arg &>
+ , result_of::make_expr<Tag, Domain, Arg>
>
         {};
 
         template<typename Domain, typename Trait, typename Tag, typename Arg>
- struct enable_unary<Domain, proto::_, Trait, Tag, Arg>
+ struct enable_unary<Domain, proto::_, Trait, Tag, Arg &>
           : boost::lazy_enable_if_c<
                 Trait::value
               , result_of::make_expr<Tag, Domain, Arg &>
@@ -49,13 +50,13 @@
         {};
 
         template<typename Trait, typename Tag, typename Arg>
- struct enable_unary<deduce_domain, not_a_grammar, Trait, Tag, Arg>
+ struct enable_unary<deduce_domain, not_a_grammar, Trait, Tag, Arg &>
           : enable_unary<
                 typename domain_of<Arg>::type
               , typename domain_of<Arg>::type::proto_grammar
               , Trait
               , Tag
- , Arg
+ , Arg &
>
         {};
 
@@ -64,14 +65,14 @@
           : boost::lazy_enable_if_c<
                 boost::mpl::and_<
                     Trait
- , lazy_matches<result_of::make_expr<Tag, basic_default_domain, Left &, Right &>, Grammar>
+ , lazy_matches<result_of::make_expr<Tag, basic_default_domain, Left, Right>, Grammar>
>::value
- , result_of::make_expr<Tag, Domain, Left &, Right &>
+ , result_of::make_expr<Tag, Domain, Left, Right>
>
         {};
 
         template<typename Domain, typename Trait, typename Tag, typename Left, typename Right>
- struct enable_binary<Domain, proto::_, Trait, Tag, Left, Right>
+ struct enable_binary<Domain, proto::_, Trait, Tag, Left &, Right &>
           : boost::lazy_enable_if_c<
                 Trait::value
               , result_of::make_expr<Tag, Domain, Left &, Right &>
@@ -79,14 +80,14 @@
         {};
 
         template<typename Trait, typename Tag, typename Left, typename Right>
- struct enable_binary<deduce_domain, not_a_grammar, Trait, Tag, Left, Right>
+ struct enable_binary<deduce_domain, not_a_grammar, Trait, Tag, Left &, Right &>
           : enable_binary<
                 typename deduce_domain2<Left, Right>::type
               , typename deduce_domain2<Left, Right>::type::proto_grammar
               , Trait
               , Tag
- , Left
- , Right
+ , Left &
+ , Right &
>
         {};
 
@@ -95,6 +96,8 @@
 #define BOOST_PROTO_UNARY_OP_IS_POSTFIX_0
 #define BOOST_PROTO_UNARY_OP_IS_POSTFIX_1 , int
 
+#ifdef BOOST_NO_RVALUE_REFERENCES
+
 #define BOOST_PROTO_DEFINE_UNARY_OPERATOR(OP, TAG, TRAIT, DOMAIN, POST) \
     template<typename Arg> \
     typename boost::proto::detail::enable_unary< \
@@ -102,7 +105,7 @@
       , DOMAIN::proto_grammar \
       , BOOST_PROTO_APPLY_UNARY_(TRAIT, Arg) \
       , TAG \
- , Arg \
+ , Arg & \
>::type const \
     operator OP(Arg &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
     { \
@@ -115,7 +118,7 @@
       , DOMAIN::proto_grammar \
       , BOOST_PROTO_APPLY_UNARY_(TRAIT, Arg) \
       , TAG \
- , Arg const \
+ , Arg const & \
>::type const \
     operator OP(Arg const &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
     { \
@@ -130,8 +133,8 @@
       , DOMAIN::proto_grammar \
       , BOOST_PROTO_APPLY_BINARY_(TRAIT, Left, Right) \
       , TAG \
- , Left \
- , Right \
+ , Left & \
+ , Right & \
>::type const \
     operator OP(Left &left, Right &right) \
     { \
@@ -144,8 +147,8 @@
       , DOMAIN::proto_grammar \
       , BOOST_PROTO_APPLY_BINARY_(TRAIT, Left, Right) \
       , TAG \
- , Left \
- , Right const \
+ , Left & \
+ , Right const & \
>::type const \
     operator OP(Left &left, Right const &right) \
     { \
@@ -158,8 +161,8 @@
       , DOMAIN::proto_grammar \
       , BOOST_PROTO_APPLY_BINARY_(TRAIT, Left, Right) \
       , TAG \
- , Left const \
- , Right \
+ , Left const & \
+ , Right & \
>::type const \
     operator OP(Left const &left, Right &right) \
     { \
@@ -172,8 +175,8 @@
       , DOMAIN::proto_grammar \
       , BOOST_PROTO_APPLY_BINARY_(TRAIT, Left, Right) \
       , TAG \
- , Left const \
- , Right const \
+ , Left const & \
+ , Right const & \
>::type const \
     operator OP(Left const &left, Right const &right) \
     { \
@@ -181,6 +184,41 @@
     } \
     /**/
 
+#else
+
+#define BOOST_PROTO_DEFINE_UNARY_OPERATOR(OP, TAG, TRAIT, DOMAIN, POST) \
+ template<typename Arg> \
+ typename boost::proto::detail::enable_unary< \
+ DOMAIN \
+ , DOMAIN::proto_grammar \
+ , BOOST_PROTO_APPLY_UNARY_(TRAIT, Arg) \
+ , TAG \
+ , Arg const & \
+ >::type const \
+ operator OP(Arg &&arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
+ { \
+ return boost::proto::detail::make_expr_<TAG, DOMAIN, Arg const &>()(arg); \
+ } \
+ /**/
+
+#define BOOST_PROTO_DEFINE_BINARY_OPERATOR(OP, TAG, TRAIT, DOMAIN) \
+ template<typename Left, typename Right> \
+ typename boost::proto::detail::enable_binary< \
+ DOMAIN \
+ , DOMAIN::proto_grammar \
+ , BOOST_PROTO_APPLY_BINARY_(TRAIT, Left, Right) \
+ , TAG \
+ , Left const & \
+ , Right const & \
+ >::type const \
+ operator OP(Left &&left, Right &&right) \
+ { \
+ return boost::proto::detail::make_expr_<TAG, DOMAIN, Left const &, Right const &>()(left, right);\
+ } \
+ /**/
+
+#endif
+
 #define BOOST_PROTO_DEFINE_OPERATORS(TRAIT, DOMAIN) \
     BOOST_PROTO_DEFINE_UNARY_OPERATOR(+, boost::proto::tag::unary_plus, TRAIT, DOMAIN, 0) \
     BOOST_PROTO_DEFINE_UNARY_OPERATOR(-, boost::proto::tag::negate, TRAIT, DOMAIN, 0) \
@@ -230,6 +268,11 @@
       : is_expr<T>
     {};
 
+ template<typename T>
+ struct is_extension<T &>
+ : is_expr<T>
+ {};
+
     #define BOOST_PROTO_APPLY_UNARY_(TRAIT, ARG) TRAIT<ARG>
     #define BOOST_PROTO_APPLY_BINARY_(TRAIT, LEFT, RIGHT) boost::mpl::or_<TRAIT<LEFT>, TRAIT<RIGHT> >
 
@@ -268,8 +311,13 @@
     // can use BOOST_PROTO_DEFINE_OPERATORS to define Proto operator overloads that work
     // with their own terminal types.
 
+#ifdef BOOST_NO_RVALUE_REFERENCES
+
     #define BOOST_PROTO_APPLY_UNARY_(TRAIT, ARG) \
- boost::mpl::and_<TRAIT<ARG>, boost::mpl::not_<boost::proto::is_extension<ARG> > > \
+ boost::mpl::and_< \
+ TRAIT<ARG> \
+ , boost::mpl::not_<boost::proto::is_extension<ARG> > \
+ > \
         /**/
 
     #define BOOST_PROTO_APPLY_BINARY_(TRAIT, LEFT, RIGHT) \
@@ -284,6 +332,29 @@
> \
         /**/
 
+#else
+
+ #define BOOST_PROTO_APPLY_UNARY_(TRAIT, ARG) \
+ boost::mpl::and_< \
+ TRAIT<BOOST_PROTO_UNCVREF(ARG) > \
+ , boost::mpl::not_<boost::proto::is_extension<ARG> > \
+ > \
+ /**/
+
+ #define BOOST_PROTO_APPLY_BINARY_(TRAIT, LEFT, RIGHT) \
+ boost::mpl::and_< \
+ boost::mpl::or_<TRAIT<BOOST_PROTO_UNCVREF(LEFT) >, TRAIT<BOOST_PROTO_UNCVREF(RIGHT) > > \
+ , boost::mpl::not_< \
+ boost::mpl::or_< \
+ boost::proto::is_extension<LEFT> \
+ , boost::proto::is_extension<RIGHT> \
+ > \
+ > \
+ > \
+ /**/
+
+#endif
+
 }}
 
 #endif

Modified: branches/release/boost/proto/proto_fwd.hpp
==============================================================================
--- branches/release/boost/proto/proto_fwd.hpp (original)
+++ branches/release/boost/proto/proto_fwd.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -269,6 +269,9 @@
 
     using namespace tagns_;
 
+ template<typename Expr>
+ struct tag_of;
+
     ////////////////////////////////////////////////////////////////////////////////////////////////
     struct _;
 
@@ -359,7 +362,7 @@
     template<typename Condition, typename Then = _, typename Else = not_<_> >
     struct if_;
 
- template<typename Cases>
+ template<typename Cases, typename Transform = tag_of<_>()>
     struct switch_;
 
     template<typename T>
@@ -462,9 +465,6 @@
     struct is_sub_domain_of;
 
     template<typename Expr>
- struct tag_of;
-
- template<typename Expr>
     struct arity_of;
 
     template<typename T, typename Void = void>

Modified: branches/release/boost/proto/transform/default.hpp
==============================================================================
--- branches/release/boost/proto/transform/default.hpp (original)
+++ branches/release/boost/proto/transform/default.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -173,8 +173,8 @@
                 typename uncvref<
                     typename Grammar::template impl<
                         typename result_of::child_c<Expr, 1>::type
- , State
- , Data
+ , State
+ , Data
>::result_type
>::type
>

Modified: branches/release/boost/proto/transform/impl.hpp
==============================================================================
--- branches/release/boost/proto/transform/impl.hpp (original)
+++ branches/release/boost/proto/transform/impl.hpp 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -9,10 +9,13 @@
 #ifndef BOOST_PROTO_TRANSFORM_IMPL_HPP_EAN_04_03_2008
 #define BOOST_PROTO_TRANSFORM_IMPL_HPP_EAN_04_03_2008
 
+#include <boost/config.hpp>
 #include <boost/proto/proto_fwd.hpp>
 
 namespace boost { namespace proto
 {
+#ifdef BOOST_NO_RVALUE_REFERENCES
+
     /// INTERNAL ONLY
     ///
     #define BOOST_PROTO_TRANSFORM_(PrimitiveTransform, X) \
@@ -65,6 +68,47 @@
     } \
     /**/
 
+#else
+
+ /// INTERNAL ONLY
+ ///
+ #define BOOST_PROTO_TRANSFORM_(PrimitiveTransform, X) \
+ BOOST_PROTO_CALLABLE() \
+ typedef X proto_is_transform_; \
+ typedef PrimitiveTransform transform_type; \
+ \
+ template<typename Sig> \
+ struct result \
+ { \
+ typedef typename boost::proto::detail::apply_transform<Sig>::result_type type; \
+ }; \
+ \
+ template<typename Expr> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr const &)>::result_type \
+ operator ()(Expr &&e) const \
+ { \
+ int i = 0; \
+ return boost::proto::detail::apply_transform<transform_type(Expr const &)>()(e, i, i); \
+ } \
+ \
+ template<typename Expr, typename State> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr const &, State const &)>::result_type \
+ operator ()(Expr &&e, State &&s) const \
+ { \
+ int i = 0; \
+ return boost::proto::detail::apply_transform<transform_type(Expr const &, State const &)>()(e, s, i); \
+ } \
+ \
+ template<typename Expr, typename State, typename Data> \
+ typename boost::proto::detail::apply_transform<transform_type(Expr const &, State const &, Data const &)>::result_type \
+ operator ()(Expr &&e, State &&s, Data &&d) const \
+ { \
+ return boost::proto::detail::apply_transform<transform_type(Expr const &, State const &, Data const &)>()(e, s, d); \
+ } \
+ /**/
+
+#endif
+
     #define BOOST_PROTO_TRANSFORM(PrimitiveTransform) \
         BOOST_PROTO_TRANSFORM_(PrimitiveTransform, void) \
         /**/

Modified: branches/release/libs/proto/doc/reference/extends.xml
==============================================================================
--- branches/release/libs/proto/doc/reference/extends.xml (original)
+++ branches/release/libs/proto/doc/reference/extends.xml 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -378,6 +378,10 @@
 <macroname>BOOST_PROTO_EXTENDS_SUBSCRIPT</macroname>()
 <macroname>BOOST_PROTO_EXTENDS_FUNCTION</macroname>()</programlisting>
       </para>
+ <para>If the <computeroutput>Domain</computeroutput> parameter is dependent, you can specify it as
+ <computeroutput>typename Domain</computeroutput>, as in
+ <computeroutput>BOOST_PROTO_EXTENDS(Expr, Derived, typename Domain)</computeroutput>
+ </para>
       <para>
         <emphasis role="bold">Example:</emphasis><programlisting>template&lt; class Expr &gt;
 struct my_expr;
@@ -420,10 +424,15 @@
         <computeroutput>Derived</computeroutput> is the type of the enclosing struct.
         <computeroutput>Domain</computeroutput> is the Proto domain to which this expression extension belongs.
         (See <computeroutput><classname alt="boost::proto::domain">proto::domain&lt;&gt;</classname></computeroutput>.)
+ Can be preceeded with "<computeroutput>typename</computeroutput>" if the specified domain is a dependent type.
       </para>
       <para><computeroutput>BOOST_PROTO_BASIC_EXTENDS()</computeroutput> adds to its enclosing struct
         exactly one data member of type <computeroutput>Expr</computeroutput>.
       </para>
+ <para>If the <computeroutput>Domain</computeroutput> parameter is dependent, you can specify it as
+ <computeroutput>typename Domain</computeroutput>, as in
+ <computeroutput>BOOST_PROTO_BASIC_EXTENDS(Expr, Derived, typename Domain)</computeroutput>
+ </para>
       <para>
         <emphasis role="bold">Example:</emphasis><programlisting>template&lt; class Expr &gt;
 struct my_expr;

Modified: branches/release/libs/proto/doc/reference/matches.xml
==============================================================================
--- branches/release/libs/proto/doc/reference/matches.xml (original)
+++ branches/release/libs/proto/doc/reference/matches.xml 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <header name="boost/proto/matches.hpp">
   <para>
     Contains definition of the
@@ -427,25 +427,29 @@
       <struct name="switch_">
         <template>
           <template-type-parameter name="Cases"/>
+ <template-type-parameter name="Transform"/>
         </template>
- <inherit><classname>proto::transform</classname>&lt;switch_&lt;Cases&gt; &gt;</inherit>
- <purpose>For matching one of a set of alternate grammars, which are looked up based on an
- expression's tag type. When used as a transform,
+ <inherit><classname>proto::transform</classname>&lt;switch_&lt;Cases, Transform&gt; &gt;</inherit>
+ <purpose>For matching one of a set of alternate grammars, which are looked up based on
+ the result type of the transform passed in second template parameter.
+ If no transform is passed, the default one is <computeroutput>proto::tag_of()</computeroutput>
+ so the default matching is based on the expression's tag type. When used as a transform,
           <computeroutput>proto::switch_&lt;&gt;</computeroutput> applies the transform associated
           with the sub-grammar that matches the expression.</purpose>
         <description>
- <para>
- An expression type <computeroutput>E</computeroutput> matches
- <computeroutput>proto::switch_&lt;C&gt;</computeroutput> if
- <computeroutput>E</computeroutput> matches
- <computeroutput>C::case_&lt;E::proto_tag&gt;</computeroutput>.
- </para>
- <para>
- When applying <computeroutput>proto::switch_&lt;C&gt;</computeroutput> as a transform
- with an expression <computeroutput>e</computeroutput> of type
- <computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> and
- data <computeroutput>d</computeroutput>, it is equivalent to
- <computeroutput>C::case_&lt;E::proto_tag&gt;()(e, s, d)</computeroutput>.
+ <para>
+ An expression type <computeroutput>E</computeroutput> matches
+ <computeroutput>proto::switch_&lt;C,T&gt;</computeroutput> if
+ <computeroutput>E</computeroutput> matches
+ <computeroutput>C::case_&lt;boost::result_of&lt;T(E)&gt;::type&gt;</computeroutput>.
+ </para>
+ <para>
+ When applying <computeroutput>proto::switch_&lt;C,T&gt;</computeroutput> as a
+ transform with an expression <computeroutput>e</computeroutput> of type
+ <computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> of
+ type <computeroutput>S</computeroutput> and data <computeroutput>d</computeroutput>
+ of type <computeroutput>D</computeroutput>, it is equivalent to
+ <computeroutput>C::case_&lt;boost::result_of&lt;T(E,S,D)&gt;::type&gt;()(e, s, d)</computeroutput>.
           </para>
         </description>
         <struct name="impl">
@@ -455,7 +459,10 @@
             <template-type-parameter name="Data"/>
           </template>
           <inherit><type>
- Cases::template case_&lt;typename Expr::tag_type&gt;::template impl&lt;Expr, State, Data&gt;</type></inherit>
+ Cases::template case_&lt;
+ typename <classname>when</classname>&lt;_, Transform&gt;::template impl&lt;Expr, State, Data&gt;::result_type
+ &gt;::template impl&lt;Expr, State, Data&gt;</type>
+ </inherit>
         </struct>
         <typedef name="proto_grammar">
           <type>switch_</type>

Modified: branches/release/libs/proto/test/Jamfile.v2
==============================================================================
--- branches/release/libs/proto/test/Jamfile.v2 (original)
+++ branches/release/libs/proto/test/Jamfile.v2 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -31,6 +31,7 @@
         [ run make_expr.cpp ]
         [ run matches.cpp ]
         [ run flatten.cpp ]
+ [ run switch.cpp ]
         [ run toy_spirit.cpp ]
         [ run toy_spirit2.cpp ]
         [ run make.cpp ]

Modified: branches/release/status/explicit-failures-markup.xml
==============================================================================
--- branches/release/status/explicit-failures-markup.xml (original)
+++ branches/release/status/explicit-failures-markup.xml 2011-09-23 11:04:13 EDT (Fri, 23 Sep 2011)
@@ -2750,6 +2750,7 @@
         <toolset name="sun-5.10"/>
         <toolset name="borland-*"/>
         <toolset name="vacpp"/>
+ <toolset name="vacpp-*"/>
       </mark-unusable>
     </library>
 


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