Boost logo

Boost-Commit :

From: troy_at_[hidden]
Date: 2008-06-29 11:34:09


Author: troy
Date: 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
New Revision: 46851
URL: http://svn.boost.org/trac/boost/changeset/46851

Log:
merge from release branch
Added:
   branches/CMake/release/libs/xpressive/doc/tracking_ptr.qbk
      - copied unchanged from r46809, /branches/release/libs/xpressive/doc/tracking_ptr.qbk
   branches/CMake/release/libs/xpressive/proto/doc/CallableTransform.xml
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/doc/CallableTransform.xml
   branches/CMake/release/libs/xpressive/proto/doc/concepts/
      - copied from r46809, /branches/release/libs/xpressive/proto/doc/concepts/
   branches/CMake/release/libs/xpressive/proto/doc/concepts/PolymorphicFunctionObject.xml
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/doc/concepts/PolymorphicFunctionObject.xml
   branches/CMake/release/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml
   branches/CMake/release/libs/xpressive/proto/doc/concepts/Transform.xml
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/doc/concepts/Transform.xml
   branches/CMake/release/libs/xpressive/proto/doc/proto.xml
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/doc/proto.xml
   branches/CMake/release/libs/xpressive/proto/example/futures.cpp
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/example/futures.cpp
   branches/CMake/release/libs/xpressive/proto/example/lambda.cpp
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/example/lambda.cpp
   branches/CMake/release/libs/xpressive/proto/example/map_assign.cpp
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/example/map_assign.cpp
   branches/CMake/release/libs/xpressive/proto/test/deep_copy.cpp
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/test/deep_copy.cpp
   branches/CMake/release/libs/xpressive/proto/test/make_expr.cpp
      - copied unchanged from r46809, /branches/release/libs/xpressive/proto/test/make_expr.cpp
   branches/CMake/release/libs/xpressive/test/test_format.cpp
      - copied unchanged from r46809, /branches/release/libs/xpressive/test/test_format.cpp
   branches/CMake/release/libs/xpressive/test/test_skip.cpp
      - copied unchanged from r46809, /branches/release/libs/xpressive/test/test_skip.cpp
Text files modified:
   branches/CMake/release/libs/xpressive/doc/acknowledgements.qbk | 11
   branches/CMake/release/libs/xpressive/doc/actions.qbk | 62
   branches/CMake/release/libs/xpressive/doc/concepts.qbk | 2
   branches/CMake/release/libs/xpressive/doc/dynamic_regexes.qbk | 4
   branches/CMake/release/libs/xpressive/doc/examples.qbk | 2
   branches/CMake/release/libs/xpressive/doc/grammars.qbk | 2
   branches/CMake/release/libs/xpressive/doc/history.qbk | 25
   branches/CMake/release/libs/xpressive/doc/installation.qbk | 4
   branches/CMake/release/libs/xpressive/doc/introduction.qbk | 4
   branches/CMake/release/libs/xpressive/doc/matching.qbk | 10
   branches/CMake/release/libs/xpressive/doc/nyi.qbk | 4
   branches/CMake/release/libs/xpressive/doc/perf.qbk | 2
   branches/CMake/release/libs/xpressive/doc/preface.qbk | 2
   branches/CMake/release/libs/xpressive/doc/quick_start.qbk | 2
   branches/CMake/release/libs/xpressive/doc/regexpp_diffs.qbk | 2
   branches/CMake/release/libs/xpressive/doc/results.qbk | 2
   branches/CMake/release/libs/xpressive/doc/static_regexes.qbk | 2
   branches/CMake/release/libs/xpressive/doc/substitutions.qbk | 175 ++++
   branches/CMake/release/libs/xpressive/doc/symbols.qbk | 4
   branches/CMake/release/libs/xpressive/doc/tips_n_tricks.qbk | 2
   branches/CMake/release/libs/xpressive/doc/tokenization.qbk | 2
   branches/CMake/release/libs/xpressive/doc/traits.qbk | 2
   branches/CMake/release/libs/xpressive/doc/xpressive.qbk | 8
   branches/CMake/release/libs/xpressive/example/numbers.cpp | 118 +-
   branches/CMake/release/libs/xpressive/proto/doc/Jamfile.v2 | 120 +-
   branches/CMake/release/libs/xpressive/proto/doc/acknowledgements.qbk | 2
   branches/CMake/release/libs/xpressive/proto/doc/calculator.qbk | 6
   branches/CMake/release/libs/xpressive/proto/doc/construction.qbk | 695 +++++++++++++++++
   branches/CMake/release/libs/xpressive/proto/doc/evaluation.qbk | 525 +++++++++++++
   branches/CMake/release/libs/xpressive/proto/doc/examples.qbk | 135 +++
   branches/CMake/release/libs/xpressive/proto/doc/extensibility.qbk | 2
   branches/CMake/release/libs/xpressive/proto/doc/grammars.qbk | 30
   branches/CMake/release/libs/xpressive/proto/doc/history.qbk | 7
   branches/CMake/release/libs/xpressive/proto/doc/implementation.qbk | 162 ++++
   branches/CMake/release/libs/xpressive/proto/doc/installation.qbk | 21
   branches/CMake/release/libs/xpressive/proto/doc/preface.qbk | 16
   branches/CMake/release/libs/xpressive/proto/doc/proto.qbk | 76 +
   branches/CMake/release/libs/xpressive/proto/doc/protodoc.xml | 1403 +++++++++++++++++++---------------
   branches/CMake/release/libs/xpressive/proto/doc/quick_start.qbk | 2
   branches/CMake/release/libs/xpressive/proto/doc/rationale.qbk | 76 +
   branches/CMake/release/libs/xpressive/proto/doc/transforms.qbk | 1595 ++++++++++++++++++++++++++-------------
   branches/CMake/release/libs/xpressive/proto/example/Jamfile.v2 | 15
   branches/CMake/release/libs/xpressive/proto/example/calc1.cpp | 16
   branches/CMake/release/libs/xpressive/proto/example/calc2.cpp | 34
   branches/CMake/release/libs/xpressive/proto/example/calc3.cpp | 119 --
   branches/CMake/release/libs/xpressive/proto/example/hello.cpp | 4
   branches/CMake/release/libs/xpressive/proto/example/lazy_vector.cpp | 12
   branches/CMake/release/libs/xpressive/proto/example/mixed.cpp | 108 +-
   branches/CMake/release/libs/xpressive/proto/example/rgb.cpp | 74 +
   branches/CMake/release/libs/xpressive/proto/example/tarray.cpp | 26
   branches/CMake/release/libs/xpressive/proto/example/vec3.cpp | 52
   branches/CMake/release/libs/xpressive/proto/example/vector.cpp | 12
   branches/CMake/release/libs/xpressive/proto/test/Jamfile.v2 | 10
   branches/CMake/release/libs/xpressive/proto/test/calculator.cpp | 16
   branches/CMake/release/libs/xpressive/proto/test/examples.cpp | 383 ++++++---
   branches/CMake/release/libs/xpressive/proto/test/lambda.cpp | 94 -
   branches/CMake/release/libs/xpressive/proto/test/matches.cpp | 32
   branches/CMake/release/libs/xpressive/proto/test/proto_fusion.cpp | 22
   branches/CMake/release/libs/xpressive/proto/test/proto_fusion_s.cpp | 40
   branches/CMake/release/libs/xpressive/proto/test/toy_spirit.cpp | 107 +-
   branches/CMake/release/libs/xpressive/proto/test/toy_spirit2.cpp | 441 ++++------
   branches/CMake/release/libs/xpressive/test/CMakeLists.txt | 7
   branches/CMake/release/libs/xpressive/test/Jamfile.v2 | 3
   branches/CMake/release/libs/xpressive/test/misc1.cpp | 2
   branches/CMake/release/libs/xpressive/test/misc2.cpp | 58 +
   branches/CMake/release/libs/xpressive/test/multiple_defs1.cpp | 2
   branches/CMake/release/libs/xpressive/test/multiple_defs2.cpp | 2
   branches/CMake/release/libs/xpressive/test/regress.ipp | 15
   branches/CMake/release/libs/xpressive/test/test.hpp | 2
   branches/CMake/release/libs/xpressive/test/test1.cpp | 2
   branches/CMake/release/libs/xpressive/test/test1.hpp | 2
   branches/CMake/release/libs/xpressive/test/test10.cpp | 2
   branches/CMake/release/libs/xpressive/test/test10.hpp | 2
   branches/CMake/release/libs/xpressive/test/test10u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test11.cpp | 2
   branches/CMake/release/libs/xpressive/test/test11.hpp | 2
   branches/CMake/release/libs/xpressive/test/test11u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test1u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test2.cpp | 2
   branches/CMake/release/libs/xpressive/test/test2.hpp | 2
   branches/CMake/release/libs/xpressive/test/test2u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test3.cpp | 2
   branches/CMake/release/libs/xpressive/test/test3.hpp | 2
   branches/CMake/release/libs/xpressive/test/test3u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test4.cpp | 2
   branches/CMake/release/libs/xpressive/test/test4.hpp | 2
   branches/CMake/release/libs/xpressive/test/test4u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test5.cpp | 2
   branches/CMake/release/libs/xpressive/test/test5.hpp | 2
   branches/CMake/release/libs/xpressive/test/test5u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test6.cpp | 2
   branches/CMake/release/libs/xpressive/test/test6.hpp | 2
   branches/CMake/release/libs/xpressive/test/test6u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test7.cpp | 2
   branches/CMake/release/libs/xpressive/test/test7.hpp | 2
   branches/CMake/release/libs/xpressive/test/test7u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test8.cpp | 2
   branches/CMake/release/libs/xpressive/test/test8.hpp | 2
   branches/CMake/release/libs/xpressive/test/test8u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test9.cpp | 2
   branches/CMake/release/libs/xpressive/test/test9.hpp | 2
   branches/CMake/release/libs/xpressive/test/test9u.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_actions.cpp | 6
   branches/CMake/release/libs/xpressive/test/test_assert.cpp | 4
   branches/CMake/release/libs/xpressive/test/test_basic_regex.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_cycles.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_dynamic.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_dynamic_grammar.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_match_results.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_non_char.cpp | 8
   branches/CMake/release/libs/xpressive/test/test_partial_match.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_algorithms.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_compiler.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_constants.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_error.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_iterator.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_primitives.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_token_iterator.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_regex_traits.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_static.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_sub_match.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_symbols.cpp | 88 +-
   branches/CMake/release/libs/xpressive/test/test_typeof.cpp | 2
   branches/CMake/release/libs/xpressive/test/test_typeof2.cpp | 14
   124 files changed, 4838 insertions(+), 2416 deletions(-)

Modified: branches/CMake/release/libs/xpressive/doc/acknowledgements.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/acknowledgements.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/acknowledgements.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -8,14 +8,15 @@
 [section Acknowledgments]
 
 I am indebted to [@http://boost.org/people/joel_de_guzman.htm Joel de Guzman]
-and [@http://boost.org/people/hartmut_kaiser.htm Hartmut Kaiser] for their
+and [@http://boost.org/people/hartmut_kaiser.htm Hartmut Kaiser] for their
 expert advice during the early states of xpressive's development. Much of
 static xpressive's syntax is owes a large debt to _spirit_, including the
-syntax for xpressive's semantic actions. I am thankful for
+syntax for xpressive's semantic actions. I am thankful for
 [@http://boost.org/people/john_maddock.htm John Maddock]'s excellent work on
-his proposal to add regular expressions to the standard library. I'd also like
+his proposal to add regular expressions to the standard library, and for
+various ideas borrowed liberally from his regex implementation. I'd also like
 to thank [@http://moderncppdesign.com/ Andrei Alexandrescu] for his input
-regarding the behavior of nested regex objects, and
+regarding the behavior of nested regex objects, and
 [@http://boost.org/people/dave_abrahams.htm Dave Abrahams] for his suggestions
 regarding the regex domain-specific embedded language. Noel Belcourt helped
 porting xpressive to the Metrowerks CodeWarrior compiler. Markus

Modified: branches/CMake/release/libs/xpressive/doc/actions.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/actions.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/actions.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -10,7 +10,7 @@
 [h2 Overview]
 
 Imagine you want to parse an input string and build a `std::map<>` from it. For
-something like that, matching a regular expression isn't enough. You want to
+something like that, matching a regular expression isn't enough. You want to
 /do something/ when parts of your regular expression match. Xpressive lets
 you attach semantic actions to parts of your static regular expressions. This
 section shows you how.
@@ -31,12 +31,12 @@
     {
         std::map<std::string, int> result;
         std::string str("aaa=>1 bbb=>23 ccc=>456");
-
+
         // Match a word and an integer, separated by =>,
         // and then stuff the result into a std::map<>
         sregex pair = ( (s1= +_w) >> "=>" >> (s2= +_d) )
             [ ref(result)[s1] = as<int>(s2) ];
-
+
         // Match one or more word/integer pairs, separated
         // by whitespace.
         sregex rx = pair >> *(+_s >> pair);
@@ -47,7 +47,7 @@
             std::cout << result["bbb"] << '\n';
             std::cout << result["ccc"] << '\n';
         }
-
+
         return 0;
     }
 
@@ -59,7 +59,7 @@
 456
 ]
 
-The regular expression `pair` has two parts: the pattern and the action. The
+The regular expression `pair` has two parts: the pattern and the action. The
 pattern says to match a word, capturing it in sub-match 1, and an integer,
 capturing it in sub-match 2, separated by `"=>"`. The action is the part in
 square brackets: `[ ref(result)[s1] = as<int>(s2) ]`. It says to take sub-match
@@ -73,15 +73,15 @@
 between brackets is an expression template. It encodes the action and executes
 it later. The expression `ref(result)` creates a lazy reference to the `result`
 object. The larger expression `ref(result)[s1]` is a lazy map index operation.
-Later, when this action is getting executed, `s1` gets replaced with the
+Later, when this action is getting executed, `s1` gets replaced with the
 first _sub_match_. Likewise, when `as<int>(s2)` gets executed, `s2` is replaced
-with the second _sub_match_. The `as<>` action converts its argument to the
+with the second _sub_match_. The `as<>` action converts its argument to the
 requested type using Boost.Lexical_cast. The effect of the whole action is to
 insert a new word/integer pair into the map.
 
 [note There is an important difference between the function `boost::ref()` in
-`<boost/ref.hpp>` and `boost::xpressive::ref()` in
-`<boost/xpressive/regex_actions.hpp>`. The first returns a plain
+`<boost/ref.hpp>` and `boost::xpressive::ref()` in
+`<boost/xpressive/regex_actions.hpp>`. The first returns a plain
 `reference_wrapper<>` which behaves in many respects like an ordinary
 reference. By contrast, `boost::xpressive::ref()` returns a /lazy/ reference
 that you can use in expressions that are executed lazily. That is why we can
@@ -137,7 +137,7 @@
 operators. But what if you want to be able to call a function from a semantic
 action? Xpressive provides a mechanism to do this.
 
-The first step is to define a function object type. Here, for instance, is a
+The first step is to define a function object type. Here, for instance, is a
 function object type that calls `push()` on its argument:
 
     struct push_impl
@@ -158,7 +158,7 @@
     // Global "push" function object.
     function<push_impl>::type const push = {{}};
 
-The initialization looks a bit odd, but this is because `push` is being
+The initialization looks a bit odd, but this is because `push` is being
 statically initialized. That means it doesn't need to be constructed
 at runtime. We can use `push` in semantic actions as follows:
 
@@ -182,7 +182,7 @@
 `result_type` typedef. Here, for example, is a `first` function object
 that returns the `first` member of a `std::pair<>` or _sub_match_:
 
- // Function object that returns the
+ // Function object that returns the
     // first element of a pair.
     struct first_impl
     {
@@ -204,7 +204,7 @@
     };
 
     // OK, use as first(s1) to get the begin iterator
- // of the sub-match referred to by s1.
+ // of the sub-match referred to by s1.
     function<first_impl>::type const first = {{}};
 
 [h3 Referring to Local Variables]
@@ -238,7 +238,7 @@
     }
 
 In the above code, we use `xpressive::val()` to hold the shared pointer by
-value. That's not normally necessary because local variables appearing in
+value. That's not normally necessary because local variables appearing in
 actions are held by value by default, but in this case, it is necessary. Had
 we written the action as `++*pi`, it would have executed immediately. That's
 because `++*pi` is not an expression template, but `++*val(pi)` is.
@@ -263,7 +263,7 @@
 
 As you can see, when using `reference<>`, you need to first declare a local
 variable and then declare a `reference<>` to it. These two steps can be combined
-into one using `local<>`.
+into one using `local<>`.
 
 [table local<> vs. reference<>
 [[This ...][... is equivalent to this ...]]
@@ -301,15 +301,15 @@
 that in the semantic action instead of the map itself. Later, when we
 call one of the regex algorithms, we can bind the reference to an actual
 map object. The following code shows how.
-
+
     // Define a placeholder for a map object:
     placeholder<std::map<std::string, int> > _map;
-
+
     // Match a word and an integer, separated by =>,
     // and then stuff the result into a std::map<>
     sregex pair = ( (s1= +_w) >> "=>" >> (s2= +_d) )
         [ _map[s1] = as<int>(s2) ];
-
+
     // Match one or more word/integer pairs, separated
     // by whitespace.
     sregex rx = pair >> *(+_s >> pair);
@@ -319,7 +319,7 @@
 
     // Here is the actual map to fill in:
     std::map<std::string, int> result;
-
+
     // Bind the _map placeholder to the actual map
     smatch what;
     what.let( _map = result );
@@ -340,10 +340,10 @@
 456
 ]
 
-We use `placeholder<>` here to define `_map`, which stands in for a
+We use `placeholder<>` here to define `_map`, which stands in for a
 `std::map<>` variable. We can use the placeholder in the semantic action as if
 it were a map. Then, we define a _match_results_ struct and bind an actual map
-to the placeholder with "`what.let( _map = result );`". The _regex_match_ call
+to the placeholder with "`what.let( _map = result );`". The _regex_match_ call
 behaves as if the placeholder in the semantic action had been replaced with a
 reference to `result`.
 
@@ -360,27 +360,27 @@
 
     // Define a placeholder for a map object:
     placeholder<std::map<std::string, int> > _map;
-
+
     // Match a word and an integer, separated by =>,
     // and then stuff the result into a std::map<>
     sregex pair = ( (s1= +_w) >> "=>" >> (s2= +_d) )
         [ _map[s1] = as<int>(s2) ];
-
+
     // The string to parse
     std::string str("aaa=>1 bbb=>23 ccc=>456");
-
+
     // Here is the actual map to fill in:
     std::map<std::string, int> result;
-
+
     // Create a regex_iterator to find all the matches
     sregex_iterator it(str.begin(), str.end(), pair, let(_map=result));
     sregex_iterator end;
-
+
     // step through all the matches, and fill in
     // the result map
     while(it != end)
         ++it;
-
+
     std::cout << result["aaa"] << '\n';
     std::cout << result["bbb"] << '\n';
     std::cout << result["ccc"] << '\n';
@@ -397,7 +397,7 @@
 
 You are probably already familiar with regular expression /assertions/. In
 Perl, some examples are the [^^] and [^$] assertions, which you can use to
-match the beginning and end of a string, respectively. Xpressive lets you
+match the beginning and end of a string, respectively. Xpressive lets you
 define your own assertions. A custom assertion is a contition which must be
 true at a point in the match in order for the match to succeed. You can check
 a custom assertion with xpressive's _check_ function.
@@ -438,7 +438,7 @@
     sregex rx = (bow >> +_w >> eow)[ check(length(_)==3 || length(_)==6) ] ;
 
 In the above, `length()` is a lazy function that calls the `length()` member
-function of its argument, and `_` is a placeholder that receives the
+function of its argument, and `_` is a placeholder that receives the
 `sub_match`.
 
 Once you get the hang of writing custom assertions inline, they can be
@@ -451,7 +451,7 @@
 
     mark_tag month(1), day(2);
     // find a valid date of the form month/day/year.
- sregex date =
+ sregex date =
         (
             // Month must be between 1 and 12 inclusive
             (month= _d >> !_d) [ check(as<int>(_) >= 1

Modified: branches/CMake/release/libs/xpressive/doc/concepts.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/concepts.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/concepts.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/dynamic_regexes.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/dynamic_regexes.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/dynamic_regexes.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,7 +20,7 @@
 There are two ways to create a dynamic regex: with the _regex_compile_
 function or with the _regex_compiler_ class template. Use _regex_compile_
 if you want the default locale. Use _regex_compiler_ if you need to
-specify a different locale. In the section on
+specify a different locale. In the section on
 [link boost_xpressive.user_s_guide.grammars_and_nested_matches regex grammars],
 we'll see another use for _regex_compiler_.
 

Modified: branches/CMake/release/libs/xpressive/doc/examples.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/examples.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/examples.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/grammars.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/grammars.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/grammars.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/history.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/history.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/history.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,6 +7,27 @@
 
 [section Appendix 1: History]
 
+[h2 Version 2.1.0 6/12/2008]
+
+New Features:
+
+* `skip()` primitive for static regexes, which allows you to specify parts of
+ the input string to ignore during regex matching.
+* Range-based `regex_replace()` algorithm interface.
+* `regex_replace()` accepts formatter objects and formatter lambda expressions
+ in addition to format strings.
+
+Bugs Fixed:
+
+* Semantic actions in look-aheads, look-behinds and independent sub-expressions
+ execute eagerly instead of causing a crash.
+
+[h2 Version 2.0.1 10/23/2007]
+
+Bugs Fixed:
+
+* `sub_match<>` constructor copies singular iterator causing debug assert.
+
 [h2 Version 2.0.0, 10/12/2007]
 
 New Features:
@@ -66,7 +87,7 @@
 
 [h2 Version 0.0.1, November 16, 2003]
 
-Announcement of xpressive:
+Announcement of xpressive:
 [@http://lists.boost.org/Archives/boost/2003/11/56312.php]
 
 [endsect]

Modified: branches/CMake/release/libs/xpressive/doc/installation.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/installation.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/installation.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -16,7 +16,7 @@
 The second way is by downloading xpressive.zip at the
 [@http://www.boost-consulting.com/vault/index.php?directory=Strings%20-%20Text%20Processing
 Boost File Vault] in the ["Strings - Text Processing] directory. In addition to
-the source code and the Boost license, this archive contains a copy of this
+the source code and the Boost license, this archive contains a copy of this
 documentation in PDF format. This version will always be stable and at least as
 current as the version in the latest Boost release. It may be more recent. The
 version in the File Vault is always guaranteed to work with the latest official

Modified: branches/CMake/release/libs/xpressive/doc/introduction.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/introduction.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/introduction.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,7 +15,7 @@
 [@http://www.osl.iu.edu/~tveldhui/papers/Expression-Templates/exprtmpl.html
 Expression Templates]] that are parsed at compile-time (static regexes).
 Dynamic regexes have the advantage that they can be accepted from the user
-as input at runtime or read from an initialization file. Static regexes
+as input at runtime or read from an initialization file. Static regexes
 have several advantages. Since they are C++ expressions instead of
 strings, they can be syntax-checked at compile-time. Also, they can naturally
 refer to code and data elsewhere in your program, giving you the ability to call

Modified: branches/CMake/release/libs/xpressive/doc/matching.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/matching.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/matching.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -23,8 +23,8 @@
 algorithm.]
 
 The input can be a bidirectional range such as `std::string`, a C-style null-terminated string or a pair of
-iterators. In all cases, the type of the iterator used to traverse the input sequence must match the iterator
-type used to declare the regex object. (You can use the table in the
+iterators. In all cases, the type of the iterator used to traverse the input sequence must match the iterator
+type used to declare the regex object. (You can use the table in the
 [link boost_xpressive.user_s_guide.quick_start.know_your_iterator_type Quick Start] to find the correct regex
 type for your iterator.)
 
@@ -78,8 +78,8 @@
 
 In all other regards, _regex_search_ behaves like _regex_match_ ['(see above)]. In particular, it can operate
 on a bidirectional range such as `std::string`, C-style null-terminated strings or iterator ranges. The same
-care must be taken to ensure that the iterator type of your regex matches the iterator type of your input
-sequence. As with _regex_match_, you can optionally provide a _match_results_ struct to receive the results
+care must be taken to ensure that the iterator type of your regex matches the iterator type of your input
+sequence. As with _regex_match_, you can optionally provide a _match_results_ struct to receive the results
 of the search, and a _match_flag_type_ bitmask to control how the match is evaluated.
 
 Click [link boost_xpressive.user_s_guide.examples.see_if_a_string_contains_a_sub_string_that_matches_a_regex here]

Modified: branches/CMake/release/libs/xpressive/doc/nyi.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/nyi.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/nyi.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -10,7 +10,7 @@
 The following features are planned for xpressive 2.X:
 
 * `syntax_option_type::collate`
-* Collation sequences such as [^'''[.a.]''']
+* Collation sequences such as [^'''[.a.]''']
 * Equivalence classes like [^'''[=a=]''']
 * Control of nested results generation with `syntax_option_type::nosubs`,
   and a `nosubs()` modifier for static xpressive.

Modified: branches/CMake/release/libs/xpressive/doc/perf.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/perf.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/perf.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/preface.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/preface.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/preface.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/quick_start.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/quick_start.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/quick_start.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/regexpp_diffs.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/regexpp_diffs.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/regexpp_diffs.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/results.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/results.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/results.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/static_regexes.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/static_regexes.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/static_regexes.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/substitutions.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/substitutions.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/substitutions.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -14,10 +14,12 @@
 [h2 regex_replace()]
 
 Performing search-and-replace using _regex_replace_ is simple. All you need is an input sequence, a regex object,
-and a format string. There are two versions of the _regex_replace_ algorithm. The first accepts the input
-sequence as `std::basic_string<>` and returns the result in a new `std::basic_string<>`. The second accepts
-the input sequence as a pair of iterators, and writes the result into an output iterator. Below are examples of
-each.
+and a format string or a formatter object. There are several versions of the _regex_replace_ algorithm. Some accept
+the input sequence as a bidirectional container such as `std::string` and returns the result in a new container
+of the same type. Others accept the input as a null terminated string and return a `std::string`. Still others
+accept the input sequence as a pair of iterators and writes the result into an output iterator. The substitution
+may be specified as a string with format sequences or as a formatter object. Below are some simple examples of
+using string-based substitutions.
 
     std::string input("This is his face");
     sregex re = as_xpr("his"); // find all occurrences of "his" ...
@@ -63,11 +65,13 @@
                                  Boost-specific format sequences.]]
 ]
 
-These flags live in the `regex_constants` namespace.
+These flags live in the `xpressive::regex_constants` namespace. If the substitution parameter is
+a function object instead of a string, the flags `format_literal`, `format_perl`, `format_sed`, and
+`format_all` are ignored.
 
 [h2 The ECMA-262 Format Sequences]
 
-When you haven't specified a substitution string dialect with one of the format flags above,
+When you haven't specified a substitution string dialect with one of the format flags above,
 you get the dialect defined by ECMA-262, the standard for ECMAScript. The table below shows
 the escape sequences recognized in ECMA-262 mode.
 
@@ -150,4 +154,161 @@
 it is /false-expression/. In this mode, you can use parens [^()] for grouping. If you
 want a literal paren, you must escape it as [^\\(].
 
+[h2 Formatter Objects]
+
+Format strings are not always expressive enough for all your text substitution
+needs. Consider the simple example of wanting to map input strings to output
+strings, as you may want to do with environment variables. Rather than a format
+/string/, for this you would use a formatter /object/. Consider the following
+code, which finds embedded environment variables of the form `"$(XYZ)"` and
+computes the substitution string by looking up the environment variable in a
+map.
+
+ #include <map>
+ #include <string>
+ #include <iostream>
+ #include <boost/xpressive/xpressive.hpp>
+ using namespace boost;
+ using namespace xpressive;
+
+ std::map<std::string, std::string> env;
+
+ std::string const &format_fun(smatch const &what)
+ {
+ return env[what[1].str()];
+ }
+
+ int main()
+ {
+ env["X"] = "this";
+ env["Y"] = "that";
+
+ std::string input("\"$(X)\" has the value \"$(Y)\"");
+
+ // replace strings like "$(XYZ)" with the result of env["XYZ"]
+ sregex envar = "$(" >> (s1 = +_w) >> ')';
+ std::string output = regex_replace(input, envar, format_fun);
+ std::cout << output << std::endl;
+ }
+
+In this case, we use a function, `format_fun()` to compute the substitution string
+on the fly. It accepts a _match_results_ object which contains the results of the
+current match. `format_fun()` uses the first submatch as a key into the global `env`
+map. The above code displays:
+
+[pre
+"this" has the value "that"
+]
+
+The formatter need not be an ordinary function. It may be an object of class type.
+And rather than return a string, it may accept an output iterator into which it
+writes the substitution. Consider the following, which is functionally equivalent
+to the above.
+
+ #include <map>
+ #include <string>
+ #include <iostream>
+ #include <boost/xpressive/xpressive.hpp>
+ using namespace boost;
+ using namespace xpressive;
+
+ struct formatter
+ {
+ typedef std::map<std::string, std::string> env_map;
+ env_map env;
+
+ template<typename Out>
+ Out operator()(smatch const &what, Out out) const
+ {
+ env_map::const_iterator where = env.find(what[1]);
+ if(where != env.end())
+ {
+ std::string const &sub = where->second;
+ out = std::copy(sub.begin(), sub.end(), out);
+ }
+ return out;
+ }
+
+ };
+
+ int main()
+ {
+ formatter fmt;
+ fmt.env["X"] = "this";
+ fmt.env["Y"] = "that";
+
+ std::string input("\"$(X)\" has the value \"$(Y)\"");
+
+ sregex envar = "$(" >> (s1 = +_w) >> ')';
+ std::string output = regex_replace(input, envar, fmt);
+ std::cout << output << std::endl;
+ }
+
+The formatter must be a callable object -- a function or a function object --
+that has one of three possible signatures, detailed in the table below. For
+the table, `fmt` is a function pointer or function object, `what` is a
+_match_results_ object, `out` is an OutputIterator, and `flags` is a value
+of `regex_constants::match_flag_type`:
+
+[table Formatter Signatures
+[
+ [Formatter Invocation]
+ [Return Type]
+ [Semantics]
+]
+[
+ [`fmt(what)`]
+ [Range of characters (e.g. `std::string`) or null-terminated string]
+ [The string matched by the regex is replaced with the string returned by
+ the formatter.]
+]
+[
+ [`fmt(what, out)`]
+ [OutputIterator]
+ [The formatter writes the replacement string into `out` and returns `out`.]
+]
+[
+ [`fmt(what, out, flags)`]
+ [OutputIterator]
+ [The formatter writes the replacement string into `out` and returns `out`.
+ The `flags` parameter is the value of the match flags passed to the
+ _regex_replace_ algorithm.]
+]
+]
+
+[h2 Formatter Expressions]
+
+In addition to format /strings/ and formatter /objects/, _regex_replace_ also
+accepts formatter /expressions/. A formatter expression is a lambda expression
+that generates a string. It uses the same syntax as that for
+[link boost_xpressive.user_s_guide.semantic_actions_and_user_defined_assertions
+Semantic Actions], which are covered later. The above example, which uses
+_regex_replace_ to substitute strings for environment variables, is repeated
+here using a formatter expression.
+
+ #include <map>
+ #include <string>
+ #include <iostream>
+ #include <boost/xpressive/xpressive.hpp>
+ #include <boost/xpressive/regex_actions.hpp>
+ using namespace boost::xpressive;
+
+ int main()
+ {
+ std::map<std::string, std::string> env;
+ env["X"] = "this";
+ env["Y"] = "that";
+
+ std::string input("\"$(X)\" has the value \"$(Y)\"");
+
+ sregex envar = "$(" >> (s1 = +_w) >> ')';
+ std::string output = regex_replace(input, envar, ref(env)[s1]);
+ std::cout << output << std::endl;
+ }
+
+In the above, the formatter expression is `ref(env)[s1]`. This means to use the
+value of the first submatch, `s1`, as a key into the `env` map. The purpose of
+`xpressive::ref()` here is to make the reference to the `env` local variable /lazy/
+so that the index operation is deferred until we know what to replace `s1` with.
+
 [endsect]

Modified: branches/CMake/release/libs/xpressive/doc/symbols.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/symbols.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/symbols.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -9,7 +9,7 @@
 
 [h2 Overview]
 
-Symbol tables can be built into xpressive regular expressions with just a
+Symbol tables can be built into xpressive regular expressions with just a
 `std::map<>`. The map keys are the strings to be matched and the map values are
 the data to be returned to your semantic action. Xpressive attributes, named
 `a1`, `a2`, through `a9`, hold the value corresponding to a matching key so
@@ -83,7 +83,7 @@
 ninety nine million nine hundred ninety nine thousand nine hundred ninety nine"
 along with some special number names like "dozen".
 
-Symbol table matches are case sensitive by default, but they can be made
+Symbol table matches are case sensitive by default, but they can be made
 case-insensitive by enclosing the expression in `icase()`.
 
 [h2 Attributes]

Modified: branches/CMake/release/libs/xpressive/doc/tips_n_tricks.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/tips_n_tricks.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/tips_n_tricks.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/tokenization.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/tokenization.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/tokenization.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/traits.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/traits.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/traits.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/doc/xpressive.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/doc/xpressive.qbk (original)
+++ branches/CMake/release/libs/xpressive/doc/xpressive.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -122,5 +122,11 @@
 
 [include perf.qbk]
 
+[section Appendix 5: Implementation Notes]
+
+[include tracking_ptr.qbk]
+
+[endsect]
+
 [endsect]
 

Modified: branches/CMake/release/libs/xpressive/example/numbers.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/example/numbers.cpp (original)
+++ branches/CMake/release/libs/xpressive/example/numbers.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
-// main.hpp
+// numbers.cpp
 //
-// Copyright 2007 David Jenkins. Distributed under the Boost
+// Copyright 2008 David Jenkins. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -11,7 +11,7 @@
 #endif
 
 #include <iostream>
-#include <string>
+#include <string>
 #include <map>
 #include <boost/assign/list_of.hpp> // for 'map_list_of()'
 #include <boost/xpressive/xpressive.hpp>
@@ -34,20 +34,20 @@
     using namespace boost::assign;
 
     // initialize the maps for named numbers
- std::map< std::string, int > ones_map =
+ std::map< std::string, int > ones_map =
         map_list_of("one",1)("two",2)("three",3)("four",4)("five",5)
         ("six",6)("seven",7)("eight",8)("nine",9);
 
- std::map< std::string, int > teens_map =
+ std::map< std::string, int > teens_map =
         map_list_of("ten",10)("eleven",11)("twelve",12)("thirteen",13)
         ("fourteen",14)("fifteen",15)("sixteen",16)("seventeen",17)
         ("eighteen",18)("nineteen",19);
 
- std::map< std::string, int > tens_map =
+ std::map< std::string, int > tens_map =
         map_list_of("twenty",20)("thirty",30)("fourty",40)
         ("fifty",50)("sixty",60)("seventy",70)("eighty",80)("ninety",90);
 
- std::map< std::string, int > specials_map =
+ std::map< std::string, int > specials_map =
         map_list_of("zero",0)("dozen",12)("score",20);
 
     // n is the integer result
@@ -55,76 +55,70 @@
     // temp stores intermediate values
     local<long> temp(0);
 
- // delimiters between words must be spaces, end-of-sequence, or punctuation
- sregex delim =
- +_s | eos | +punct;
-
     // initialize the regular expressions for named numbers
- sregex ones_rx =
- ( a1 = ones_map ) [ n += a1 ] >> delim;
-
     sregex tens_rx =
- ones_rx
- |
+ // use skip directive to skip whitespace between words
+ skip(_s)
         (
- ( a1 = tens_map ) [ n += a1 ] >> delim
- >> !ones_rx
+ ( a3 = teens_map )
+ |
+ ( a2 = tens_map ) >> !( a1 = ones_map )
+ |
+ ( a1 = ones_map )
         )
- |
- ( ( a1 = teens_map ) [ n += a1 ] >> delim
- );
+ [ n += (a3|0) + (a2|0) + (a1|0) ];
 
     sregex hundreds_rx =
- ( ( tens_rx >> "hundred" >> delim )
- [ n *= 100 ]
- >> !tens_rx
- )
- | tens_rx;
-
- sregex thousands_rx =
- ( ( hundreds_rx >> "thousand" >> delim )
- [ temp += n * 1000, n = 0 ]
- >> !hundreds_rx
+ skip(_s)
+ (
+ tens_rx >>
+ !(
+ as_xpr("hundred") [ n *= 100 ]
+ >> !tens_rx
+ )
         )
- | hundreds_rx
         ;
 
- sregex millions_rx =
- ( ( hundreds_rx >> "million" >> delim )
- [ temp += n * 1000000, n = 0 ]
- >> !thousands_rx
+ sregex specials_rx = // regex for special number names like dozen
+ skip(_s)
+ (
+ // Note: this uses two attribues, a1 and a2, and it uses
+ // a default attribute value of 1 for a1.
+ ( !( a1 = ones_map ) >> ( a2 = specials_map ) )
+ [ n = (a1|1) * a2 ]
+ >> !( "and" >> tens_rx )
         )
- | thousands_rx;
+ ;
 
- // Note: this uses two attribues, a1 and a2, and it uses
- // a default attribute value of 1 for a1.
- sregex specials_rx =
- ( !((a1 = ones_map) >> delim) >> (a2 = specials_map) )
- [ n = (a1 | 1) * a2 ]
- >> delim
- >> !("and" >> +_s >> ones_rx);
-
- sregex number_rx =
- bow
- >>
- ( specials_rx
- |
- millions_rx
- [n += temp, temp = 0 ]
+ sregex number_rx =
+ bow
+ >>
+ skip(_s|punct)
+ (
+ specials_rx // special numbers
+ |
+ ( // normal numbers
+ !( hundreds_rx >> "million" ) [ temp += n * 1000000, n = 0 ]
+ >>
+ !( hundreds_rx >> "thousand" ) [ temp += n * 1000, n = 0 ]
+ >>
+ !hundreds_rx
+ )
+ [n += temp, temp = 0 ]
         );
 
     // this is the input string
     std::string str( "one two three eighteen twenty two "
- "nine hundred ninety nine twelve "
+ "nine hundred ninety nine twelve "
         "eight hundred sixty three thousand ninety five "
         "sixty five hundred ten "
         "two million eight hundred sixty three thousand ninety five "
         "zero sixty five hundred thousand "
- "extra stuff -- skip me "
+ "extra stuff "
         "two dozen "
- "four score and seven ");
+ "four score and seven");
 
- // the results of iterating through the string are:
+ // the MATCHING results of iterating through the string are:
     // one = 1
     // two = 2
     // three = 3
@@ -144,10 +138,20 @@
 
     for( ; cur != end; ++cur )
     {
- std::cout << *cur << " = " << n.get() << '\n';
+ if ((*cur).length() > 0)
+ std::cout << *cur << " = " << n.get() << '\n';
         n.get() = 0;
     }
     std::cout << '\n';
+ // the NON-MATCHING results of iterating through the string are:
+ // extra = unmatched
+ // stuff = unmatched
+ sregex_token_iterator cur2( str.begin(), str.end(), number_rx, -1 );
+ for( ; cur2 != end; ++cur2 )
+ {
+ if ((*cur2).length() > 0)
+ std::cout << *cur2 << " = unmatched" << '\n';
+ }
 }
 
 ///////////////////////////////////////////////////////////////////////////////

Modified: branches/CMake/release/libs/xpressive/proto/doc/Jamfile.v2
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/Jamfile.v2 (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/Jamfile.v2 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -8,56 +8,55 @@
 
 wave-command = [ path.native ../../../../dist/bin/wave ] ;
 
-## Generate reference section using Doxygen
-#doxygen protodoc
-# :
-# ../../../../boost/xpressive/proto/args.hpp
-# ../../../../boost/xpressive/proto/context.hpp
-# ../../../../boost/xpressive/proto/debug.hpp
-# ../../../../boost/xpressive/proto/deep_copy.hpp
-# ../../../../boost/xpressive/proto/domain.hpp
-# ../../../../boost/xpressive/proto/eval.hpp
-# ../../../../boost/xpressive/proto/expr.hpp
-# ../../../../boost/xpressive/proto/extends.hpp
-# ../../../../boost/xpressive/proto/fusion.hpp
-# ../../../../boost/xpressive/proto/generate.hpp
-# ../../../../boost/xpressive/proto/literal.hpp
-# ../../../../boost/xpressive/proto/make_expr.hpp
-# ../../../../boost/xpressive/proto/matches.hpp
-# ../../../../boost/xpressive/proto/operators.hpp
-# ../../../../boost/xpressive/proto/proto.hpp
-# ../../../../boost/xpressive/proto/proto_fwd.hpp
-## ../../../../boost/xpressive/proto/proto_typeof.hpp
-# ../../../../boost/xpressive/proto/ref.hpp
-# ../../../../boost/xpressive/proto/tags.hpp
-# ../../../../boost/xpressive/proto/traits.hpp
-# ../../../../boost/xpressive/proto/transform.hpp
-# ../../../../boost/xpressive/proto/context/callable.hpp
-# ../../../../boost/xpressive/proto/context/default.hpp
-# ../../../../boost/xpressive/proto/context/null.hpp
-# ../../../../boost/xpressive/proto/transform/arg.hpp
-# ../../../../boost/xpressive/proto/transform/apply.hpp
-# ../../../../boost/xpressive/proto/transform/branch.hpp
-# ../../../../boost/xpressive/proto/transform/compose.hpp
-# ../../../../boost/xpressive/proto/transform/construct.hpp
-# ../../../../boost/xpressive/proto/transform/fold.hpp
-# ../../../../boost/xpressive/proto/transform/fold_tree.hpp
-# ../../../../boost/xpressive/proto/transform/function.hpp
-# ../../../../boost/xpressive/proto/transform/list.hpp
-# ../../../../boost/xpressive/proto/transform/pass_through.hpp
-# :
-# <doxygen:param>EXTRACT_ALL=YES
-# <doxygen:param>HIDE_UNDOC_MEMBERS=NO
-# # Use Boost.Wave to preprocess Proto's source
-# <doxygen:param>"INPUT_FILTER=\"$(wave-command) \\
-# -S ../../../.. \\
-# -S \\\"C:\\Program Files\\Microsoft Visual Studio .NET 2003\\vc7\\include\\\" \\
-# -D _WIN32 \\
-# -D BOOST_PROTO_DOXYGEN_INVOKED \\
-# -p 1 \""
-# # This ensures that Wave is actually built before we try to execute it
-# <dependency>../../../../tools/wave/build release
-# ;
+# Generate reference section using Doxygen
+doxygen protodoc
+ :
+ ../../../../boost/xpressive/proto/args.hpp
+ ../../../../boost/xpressive/proto/context.hpp
+ ../../../../boost/xpressive/proto/debug.hpp
+ ../../../../boost/xpressive/proto/deep_copy.hpp
+ ../../../../boost/xpressive/proto/domain.hpp
+ ../../../../boost/xpressive/proto/eval.hpp
+ ../../../../boost/xpressive/proto/expr.hpp
+ ../../../../boost/xpressive/proto/extends.hpp
+ ../../../../boost/xpressive/proto/fusion.hpp
+ ../../../../boost/xpressive/proto/generate.hpp
+ ../../../../boost/xpressive/proto/literal.hpp
+ ../../../../boost/xpressive/proto/make_expr.hpp
+ ../../../../boost/xpressive/proto/matches.hpp
+ ../../../../boost/xpressive/proto/operators.hpp
+ ../../../../boost/xpressive/proto/proto.hpp
+ ../../../../boost/xpressive/proto/proto_fwd.hpp
+# ../../../../boost/xpressive/proto/proto_typeof.hpp
+ ../../../../boost/xpressive/proto/ref.hpp
+ ../../../../boost/xpressive/proto/tags.hpp
+ ../../../../boost/xpressive/proto/traits.hpp
+ ../../../../boost/xpressive/proto/transform.hpp
+ ../../../../boost/xpressive/proto/context/callable.hpp
+ ../../../../boost/xpressive/proto/context/default.hpp
+ ../../../../boost/xpressive/proto/context/null.hpp
+ ../../../../boost/xpressive/proto/transform/arg.hpp
+ ../../../../boost/xpressive/proto/transform/bind.hpp
+ ../../../../boost/xpressive/proto/transform/call.hpp
+ ../../../../boost/xpressive/proto/transform/fold.hpp
+ ../../../../boost/xpressive/proto/transform/fold_tree.hpp
+ ../../../../boost/xpressive/proto/transform/make.hpp
+ ../../../../boost/xpressive/proto/transform/pass_through.hpp
+ ../../../../boost/xpressive/proto/transform/when.hpp
+ :
+ <doxygen:param>EXTRACT_ALL=YES
+ <doxygen:param>HIDE_UNDOC_MEMBERS=NO
+ # Use Boost.Wave to preprocess Proto's source
+# <doxygen:param>INPUT_FILTER=./wave.sh
+ <doxygen:param>"INPUT_FILTER=\"$(wave-command) \\
+ -S ../../../.. \\
+ -S \\\"C:\\Program Files\\Microsoft Visual Studio .NET 2003\\vc7\\include\\\" \\
+ -D _WIN32 \\
+ -D BOOST_PROTO_DOXYGEN_INVOKED \\
+ -p 1 \""
+ # This ensures that Wave is actually built before we try to execute it
+ <dependency>../../../../tools/wave/build release
+ ;
 
 xml proto
     :
@@ -82,28 +81,29 @@
         # How far down we go with TOC's
         <xsl:param>generate.section.toc.level=10
         # Set the path to the boost-root so we find our graphics:
- #<xsl:param>boost.root=../../../../..
+ #<xsl:param>boost.root=$(BOOST_ROOT)
         # location of the main index file so our links work:
- #<xsl:param>boost.libraries=../../../../../libs/libraries.htm
+ #<xsl:param>boost.libraries=$(BOOST_ROOT)/libs/libraries.htm
 
         # PDF Options:
         # TOC Generation: this is needed for FOP-0.9 and later:
         # <xsl:param>fop1.extensions=1
- <xsl:param>xep.extensions=1
+ <format>pdf:<xsl:param>fop1.extensions=0
+ <format>pdf:<xsl:param>xep.extensions=1
         # TOC generation: this is needed for FOP 0.2, but must not be set to zero for FOP-0.9!
- <xsl:param>fop.extensions=0
+ <format>pdf:<xsl:param>fop.extensions=0
         # No indent on body text:
- <xsl:param>body.start.indent=0pt
+ <format>pdf:<xsl:param>body.start.indent=0pt
         # Margin size:
- <xsl:param>page.margin.inner=0.5in
+ <format>pdf:<xsl:param>page.margin.inner=0.5in
         # Margin size:
- <xsl:param>page.margin.outer=0.5in
+ <format>pdf:<xsl:param>page.margin.outer=0.5in
         # Yes, we want graphics for admonishments:
- <xsl:param>admon.graphics=1
+ <format>pdf:<xsl:param>admon.graphics=1
         # Set this one for PDF generation *only*:
- # default pnd graphics are awful in PDF form,
+ # default png graphics are awful in PDF form,
         # better use SVG's instead:
- # <xsl:param>admon.graphics.extension=".svg"
+ # <format>pdf:<xsl:param>admon.graphics.extension=".svg"
 
 # <dependency>protodoc
     ;

Modified: branches/CMake/release/libs/xpressive/proto/doc/acknowledgements.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/acknowledgements.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/acknowledgements.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/proto/doc/calculator.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/calculator.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/calculator.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,7 +19,7 @@
 [heading Defining Terminals]
 
 The first order of business is to define the placeholders `_1` and `_2`. For
-that, we'll use the _terminal_ expression generator.
+that, we'll use the _terminal_ metafunction.
 
     // Define some placeholder types
     struct placeholder1 {};
@@ -138,7 +138,7 @@
 You might notice that the `calculator_context` has a lot of boilerplate. It
 is fairly common for addition nodes to be handled by evaluating the left and
 right children and then adding the result, for instance. For this purpose,
-proto provides the _default_context_, which gives the operators their usual
+Boost.Proto provides the _default_context_, which gives the operators their usual
 meanings, and uses Boost.Typeof to deduce return types. In fact, the
 _callable_context_ from which our `calculator_context` inherits uses
 _default_context_ as a fall-back for any expression types you don't handle

Modified: branches/CMake/release/libs/xpressive/proto/doc/construction.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/construction.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/construction.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -5,7 +5,11 @@
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  /]
 
+[def __implelemtation_defined__ [~implementation-defined]]
+
+[/=======================================================================================]
 [section:expression_construction Expression Construction: Building Proto Expression Trees]
+[/=======================================================================================]
 
 We've seen some simple examples of how to use Proto, but we haven't really said
 much about what is going on under the hood. How exactly does Proto build and
@@ -26,7 +30,7 @@
 The _expr_ template is the most important type in Proto. Although you will
 rarely need to deal with it directly, it's always there behind the scenes
 holding your expression trees together. In fact, _expr_ /is/ the expression
-tree -- braches, leaves and all.
+tree -- branches, leaves and all.
 
 The _expr_ template makes up the nodes in expression trees. The first template
 parameter is the node type; in this case, `proto::tag::terminal`. That means
@@ -55,7 +59,9 @@
 is of type `placeholder1`. Note that we use braces to initialize `_1.arg0`
 because `placeholder1` is also an aggregate.
 
+[/====================================================]
 [section:operator_overloads Proto's Operator Overloads]
+[/====================================================]
 
 Once we have some Proto terminals, expressions involving those terminals build
 expression trees for us, as if by magic. It's not magic; Proto defines
@@ -80,7 +86,9 @@
 
 [endsect]
 
+[/=================================================]
 [section:expression_trees Building Expression Trees]
+[/=================================================]
 
 The `_1` node is an _expr_ type, and new nodes created with this type are
 also _expr_ types. They look like this:
@@ -129,13 +137,191 @@
 
 [endsect]
 
+[/==============================================]
 [section:left_right_arg Accessing Children Nodes]
+[/==============================================]
+
+After assembling an expression into a tree, you'll naturally want to be
+able to do the reverse, and access its children.
+You may even want to be able to iterate over the children with algorithms
+from the Boost.Fusion library. This section shows how.
+
+[heading [^tag_of<>]]
+
+A node in an expression tree is nothing more than a collection of children
+nodes and a tag type. You can access the tag type of any Proto expression type
+`Expr` directly as `typename Expr::proto_tag`, or you can use the _tag_of_
+metafunction, as shown below:
+
+ template<typename Expr>
+ typename proto::result_of::tag_of<Expr>::type
+ get_tag_of(Expr const &)
+ {
+ // Tag types are required to be default-constructible
+ return typename proto::result_of::tag_of<Expr>::type();
+ }
+
+ proto::terminal<int>::type const i = {0};
+
+ // Addition nodes have the "plus" tag type:
+ proto::tag::plus plus_tag = get_tag_of( i + 2 );
+
+[heading [^arg_c()]]
+
+Each node in an expression tree corresponds to an operator in an expression,
+and the children correspond to the operands, or arguments of the operator.
+To access them, you can use the _arg_c_ function template, as demonstrated
+below:
+
+ proto::terminal<int>::type i = {0};
+
+ // Get the 0-th operand of an addition operation:
+ proto::terminal<int>::type &ri = proto::arg_c<0>( i + 2 );
+
+ // Assert that we got back what we put in:
+ assert( &i == &ri );
+
+You can use the `result_of::arg_c<>` metafunction to get the type of the Nth
+child of an expression node. The nested `::type` of the `arg_c<>` metafunction
+gives you the type after references and cv-qualifiers have been stripped from
+the child's type.
+
+ template<typename Expr>
+ void test_result_of_arg_c(Expr const &expr)
+ {
+ typedef typename proto::result_of::arg_c<Expr, 0>::type type;
+
+ // ::type is a non-cv qualified, non-reference
+ BOOST_MPL_ASSERT((is_same< type, terminal<int>::type>));
+ }
+
+ // ...
+ terminal<int>::type i = {0};
+ test_result_of_arg_c( i + 2 );
+
+Why does the `arg_c<>` metafunction strip cv-qualifiers and references? The
+reason is one of practicality. Because expression trees are most typically
+built by holding references to temporary objects, lifetime management of these
+children nodes can be problematic. If `arg_c<>::type` were a reference, it
+would be very simple to create dangling references. Avoiding dangling
+references results in tedious and verbose applications of `remove_reference<>`
+and `remove_const<>`. This is especially problematic when building transforms
+that operate on ephemeral constelations of temporary objects. The current
+behavior of the `arg_c<>` metafunction makes it much simpler to write correct
+code.
+
+If you would like to know exactly the type of the Nth argument, including
+references and cv-qualifiers, you can use
+`fusion::result_of::value_at<Expr, N>::type`. This way, you can tell whether
+a child is stored by value or by reference. And if you would like to know
+the exact type that _arg_c_ returns, you can use
+`fusion::result_of::at_c<Expr, N>::type`. It will always be a reference type,
+and its cv-qualification depends on the cv-qualification of `Expr` and
+whether the child is stored by reference or not.
+
+[heading [^arg()], [^left()], and [^right()]]
+
+Most operators in C++ are unary or binary. For that reason, accessing the
+only operand, or the left and right operands, are very common operations. For
+this reason, Proto provides the _arg_, _left_, and _right_ functions. _arg_
+and _left_ are synonomous with `arg_c<0>()`, and _right_ is synonomous with
+`arg_c<1>()`.
+
+There are also `result_of::arg<>`, `result_of::left<>`, and `result_of::right<>`
+metafunctions that merely forward to their `result_of::arg_c<>` counterparts.
+
+[heading Expression Nodes as Fusion Sequences]
+
+Proto expression nodes are valid Fusion random-access sequences of their
+children nodes. That means you can apply Fusion algorithms to them,
+transform them, apply Fusion filters and views to them, and access their
+elements using `fusion::at()`. The things Fusion can do to heterogeneous
+sequences is beyond the scope of this users' guide, but below is a simple
+example. It takes a lazy function invocation like `fun(1,2,3,4)` and uses
+Fusion to print the function arguments in order.
+
+ struct display
+ {
+ template<typename T>
+ void operator()(T const &t) const
+ {
+ std::cout << t << std::endl;
+ }
+ };
+
+ struct fun_t {};
+ terminal<fun_t>::type const fun = {{}};
+
+ // ...
+ fusion::for_each(
+ fusion::transform(
+ // pop_front() removes the "fun" child
+ fusion::pop_front(fun(1,2,3,4))
+ // Extract the ints from the terminal nodes
+ , functional::arg<>()
+ )
+ , display()
+ );
+
+The above invocation of `fusion::for_each()` displays the following:
+
+[pre
+1
+2
+3
+4
+]
 
-// TODO describe tag_of, arg, arg_c, left and right. Maybe also children_of and Fusion.
+[heading Flattening Proto Expression Tress]
+
+Imagine a slight variation of the above example where, instead of iterating
+over the arguments of a lazy function invocation, we would like to iterate
+over the terminals in an addition expression:
+
+ terminal<int>::type const _1 = {1};
+
+ // ERROR: this doesn't work! Why?
+ fusion::for_each(
+ fusion::transform(
+ _1 + 2 + 3 + 4
+ , functional::arg<>()
+ )
+ , display()
+ );
+
+The reason this doesn't work is because the expression `_1 + 2 + 3 + 4` does
+not describe a flat sequence of terminals --- it describes a binary tree. We
+can treat it as a flat sequence of terminals, however, using Proto's _flatten_
+function. _flatten_ returns a view which makes a tree appear as a flat Fusion
+sequence. If the top-most node has a tag type `T`, then the elements of the
+flattened sequence are the children nodes that do *not* have tag type `T`. This
+process is evaluated recursively. So the above can correctly be written as:
+
+ terminal<int>::type const _1 = {1};
+
+ // OK, iterate over a flattened view
+ fusion::for_each(
+ fusion::transform(
+ proto::flatten(_1 + 2 + 3 + 4)
+ , functional::arg<>()
+ )
+ , display()
+ );
+
+The above invocation of `fusion::for_each()` displays the following:
+
+[pre
+1
+2
+3
+4
+]
 
 [endsect]
 
+[/===============================================================]
 [section:tags_and_meta_functions Operator Tags and Meta-Functions]
+[/===============================================================]
 
 The following table lists the overloadable C++ operators, the Proto tag types
 for each, and the name of the Proto meta-function for generating the
@@ -327,9 +513,512 @@
 
 [endsect]
 
+[/===========================================================]
 [section:construction_utils Expression Construction Utilities]
+[/===========================================================]
+
+Proto gives you many other ways of creating expression trees besides the operator
+overloads. These are useful for building nodes with custom tag types that don't
+correspond to any C++ operator. They're also useful when writing tree transforms
+that manipulate the structure of the expression tree, as we'll see.
+
+Below are the tools and a brief description of each.
+
+[variablelist
+[ [_make_expr_]
+ [A function that takes a tag type and children nodes and
+ builds a parent node of the requested type.]]
+[ [_unpack_expr_]
+ [A function that does the same as _make_expr_ except
+ the children nodes are specified as a Fusion sequence.]]
+[ [`BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE()`]
+ [A macro that generates a number of overloads of a
+ user-specified function template that behaves like
+ _make_expr_.]]
+]
+
+[/====================================================]
+[heading Building Expression Trees With [^make_expr()]]
+[/====================================================]
 
-// TODO describe make_expr, unpack_expr and BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE
+[:[*Synopsys:]]
+
+ namespace proto
+ {
+ namespace result_of
+ {
+ // Metafunction for calculating the return type
+ // of the make_expr() function
+ template<
+ typename Tag
+ , typename DomainOrArg
+ , typename... A
+ >
+ struct make_expr
+ {
+ typedef __implelemtation_defined__ type;
+ };
+ }
+
+ namespace functional
+ {
+ // A callable function object equivalent of the
+ // make_expr() function.
+ template<typename Tag, typename Domain = default_domain>
+ struct make_expr : callable
+ {
+ template<typename Sig> struct result;
+
+ template<typename This, typename... A>
+ struct result<This(A...)>
+ : result_of::make_expr<Tag, Domain, A...>
+ {};
+
+ template<typename... A>
+ typename result_of::make_expr<Tag, Domain, const A...>::type
+ operator ()(A const &... a) const;
+ };
+ }
+
+ // The make_expr() function
+ template<typename Tag, typename Domain, typename... A>
+ typename result_of::make_expr<Tag, Domain, A...>::type
+ make_expr(A const &... a);
+ }
+
+You can use the _make_expr_ function to build an expression tree node with
+a specified tag type, as follows.
+
+ // Some user-defined tag type
+ struct MyTag {};
+
+ // Construct a node with MyTag tag type, and
+ // two terminals as children.
+ int i = 0;
+ proto::make_expr<MyTag, default_domain>(i, 'a');
+
+You are not required to specify a domain. If you choose not to, `default_domain`
+is assumed. So the above is equivalent to:
+
+ // Construct a node with MyTag tag type, and
+ // two terminals as children.
+ int i = 0;
+ proto::make_expr<MyTag>(i, 'a');
+
+The return type of the above function invocation can be calculated with the
+`result_of::make_expr<>` metafunction.
+
+ // Use result_of::make_expr<> to compute the return type:
+ int i = 0;
+ typedef
+ proto::result_of::make_expr<
+ MyTag
+ , int
+ , char
+ >::type
+ expr_type;
+
+ expr_type expr = proto::make_expr<MyTag>(i, 'a');
+
+ // expr_type is the same as this type:
+ typedef
+ proto::binary_expr<
+ MyTag
+ , proto::terminal<int>::type
+ , proto::terminal<char>::type
+ >::type
+ expr_type2;
+
+ BOOST_MPL_ASSERT((is_same<expr_type2, expr_type>));
+
+Notice that the children, an int and a char, are wrapped in terminal
+nodes and held by value. If you would like an argument to be beld by
+reference in the resulting tree node, you can use `boost::ref()`:
+
+ // One terminal held by reference:
+ int i = 0;
+
+ typedef
+ proto::result_of::make_expr<
+ MyTag
+ , int & // <-- Note reference here
+ , char
+ >::type
+ expr_type;
+
+ expr_type expr = proto::make_expr<MyTag>(boost::ref(i), 'a');
+
+In the return type calculation, we can specify by-ref with
+`int &`, but we need `boost::ref()` in the actual function invocation.
+That's because the _make_expr_ function can't tell from the function
+arguments whether you want to store the arguments by value or by
+reference.
+
+Non-terminals are handled similarly. Given the non-terminal `expr` as
+defined above, we could wrap it in a unary plus node by value or by
+reference as follows:
+
+ // Make "expr" a child node of a new unary plus node, where
+ // "expr" is held by-value:
+ typedef
+ proto::result_of::make_expr<
+ proto::tag::posit
+ , expr_type
+ >::type
+ posit_val_type;
+
+ posit_val_type p1 = proto::make_expr<proto::tag::posit>(expr);
+
+ // Same as above, except "expr" is held by-reference:
+ typedef
+ proto::result_of::make_expr<
+ proto::tag::posit
+ , expr_type & // <-- Note reference here
+ >::type
+ posit_ref_type;
+
+ posit_ref_type p2 = proto::make_expr<proto::tag::posit>(boost::ref(expr));
+
+ // Equivalent to "by-ref" line directly above:
+ posit_ref_type p3 = +expr;
+
+The application of unary `operator+` on the last line is equivalent to
+the by-ref invocation of _make_expr_ because Proto's operator overloads
+always build trees by holding nodes by reference.
+
+If you specify a domain when invoking _make_expr_, then _make_expr_
+will use that domain's generator to wrap the resulting node in a
+domain-specific wrapper. In the example below, expressions within the
+`MyDomain` domain are wrapped in a `MyExpr<>` wrapper.
+
+ template<typename Expr>
+ struct MyExpr;
+
+ struct MyDomain
+ : proto::domain<proto::generator<MyExpr> >
+ {};
+
+ // ...
+
+ // Use result_of::make_expr<> to compute the return type:
+ int i = 0;
+ typedef
+ proto::result_of::make_expr<
+ MyTag
+ , MyDomain // <-- Note second template
+ , int // param can be a domain.
+ , char
+ >::type
+ expr_type;
+
+ // Construct an expression within MyDomain:
+ expr_type expr = proto::make_expr<MyTag, MyDomain>(i, 'a');
+
+ // expr_type is the same as this type:
+ typedef
+ // New node is wrapped in MyExpr<>
+ MyExpr<proto::binary_expr<
+ MyTag
+ // Terminals are also wrapped.
+ , MyExpr<proto::terminal<int>::type>
+ , MyExpr<proto::terminal<char>::type>
+ >::type>
+ expr_type2;
+
+ BOOST_MPL_ASSERT((is_same<expr_type2, expr_type>));
+
+[/======================================================]
+[heading Building Expression Trees With [^unpack_expr()]]
+[/======================================================]
+
+[:[*Synopsys:]]
+
+ namespace proto
+ {
+ namespace result_of
+ {
+ // Metafunction for calculating the return type
+ // of the unpack_expr() function
+ template<
+ typename Tag
+ , typename DomainOrSequence
+ , typename SequenceOrVoid = void
+ >
+ struct unpack_expr
+ {
+ typedef __implelemtation_defined__ type;
+ };
+ }
+
+ namespace functional
+ {
+ // A callable function object equivalent of the
+ // unpack_expr() function.
+ template<typename Tag, typename Domain = default_domain>
+ struct unpack_expr : callable
+ {
+ template<typename Sig> struct result;
+
+ template<typename This, typename Sequence>
+ struct result<This(Sequence)>
+ : result_of::unpack_expr<Tag, Domain, Sequence>
+ {};
+
+ template<typename Sequence>
+ typename result_of::unpack_expr<Tag, Domain, Sequence>::type
+ operator ()(Sequence const &sequence) const;
+ };
+ }
+
+ // The unpack_expr() function
+ template<typename Tag, typename Domain, typename Sequence>
+ typename result_of::unpack_expr<Tag, Domain, Sequence>::type
+ unpack_expr(Sequence const &sequence);
+ }
+
+Once you understand _make_expr_, understanding _unpack_expr_ is
+simple. It behaves exactly the same way, except that rather than
+passing children individually, you pass the children as a Fusion
+sequence. So for instance, the following are equivalent:
+
+ // Build an expression with make_expr():
+ int i = 0;
+ proto::make_expr<Tag>(i, 'a');
+
+ // Build the same expression with unpack_expr():
+ proto::unpack_expr<Tag>(fusion::make_tuple(i, 'a'));
+
+ // Also the same as the above:
+ fusion::tuple<int, char> args(i, 'a');
+ proto::unpack_expr<Tag>(args);
+
+If you would like the arguments to be stored by reference, you can
+use `boost::ref()`, just as with _make_expr_.
+
+ // Hold one argument by reference:
+ int i = 0;
+ proto::unpack_expr<Tag>(fusion::make_tuple(boost::ref(i), 'a'));
+
+ // Also the same as the above:
+ fusion::tuple<int &, char> args(i, 'a');
+ proto::unpack_expr<Tag>(args);
+
+As with _make_expr_, _unpack_expr_ has a corresponding metafunction
+in the `proto::result_of` namespace for calculating its return type, as
+well as a callable function object form in the `proto::functional`
+namespace.
+
+One last interesting point about _unpack_expr_: Proto expression
+nodes are themselves valid Fusion sequences. Here, for instance, is
+a clever way to use _unpack_expr_ to turn a binary plus node into
+a binary minus node:
+
+ // Use unpack_expr() to turn an addition into a subtraction
+ proto::literal<int> i(8), j(42);
+ proto::unpack_expr<proto::tag::minus>( i + j );
+
+The expression `i + j` creates an expression tree which _unpack_expr_
+interprets as a sequence of its children `i` and `j`. The result is a
+new node with the `tag::minus` tag and `i` and `j` as children.
+
+[/=====================================================]
+[heading Generating Custom Expression Factory Functions]
+[/=====================================================]
+
+[:[*Synopsys:]]
+
+ // Generate BOOST_PROTO_MAX_ARITY overloads of a
+ // function template named NAME within a particular
+ // DOMAIN that generates expressions with a given
+ // TAG and optionally has some arguments bound.
+ #define BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE( \
+ NAME \
+ , DOMAIN \
+ , TAG \
+ , BOUNDARGS \
+ )
+
+The `proto::functional::make_expr<>` function object makes it very simple
+to create something that behaves like an expression factory function. For
+instance, the following defines a factory named `invert()` that
+"complements" its argument; that is, it builds a new node with type
+`tag::complement` as if Proto's `operator~` had been applied:
+
+ // invert(x) is now a synonym for ~proto::as_expr(x)
+ proto::functional::make_expr<proto::tag::complement> const invert = {};
+
+Such named "operators" are very important for domain-specific embedded
+languages. What's more, when defined as above, the `invert()` factory can
+accept up to `BOOST_PROTO_MAX_ARITY` arguments, although in this case
+that wouldn't be particularly meaningful.
+
+But imagine if you have a custom tag type `foo_tag<>` that is a template.
+You would like to define a `foo()` factory function that itself was a template,
+like this:
+
+ template<typename T, typename A0>
+ typename proto::result_of::make_expr<
+ foo_tag<T>
+ , A0 const &
+ >::type foo(A0 const &a0)
+ {
+ return proto::make_expr<foo_tag<T> >(boost::ref(a0));
+ }
+
+Now, users of your function can invoke it like this: `foo<int>("foo!")`. If
+you want to seamlessly handle up to /N/ argument, you have to write all /N/
+overloads yourself --- `functional::make_expr<>` can't help you. For this
+situation, Proto provides the `BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE()`
+macro. You can invoke it as follows:
+
+ // Generate overloads of the foo() function template
+ // like the one above
+ BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE( \
+ foo \
+ , proto::default_domain \
+ , (foo_tag)(typename) \
+ , BOOST_PP_SEQ_NIL \
+ )
+
+The first macro parameter specified the name of the function template, `foo`.
+The second parameter is the domain of the resulting expression. The third
+parameter is the tag type, specified as a Boost.Preprocessor sequence. A
+tag template like `foo_tag<typename>` is represented as a PP sequence like
+`(foo_tag)(typename)`. Had `foo_tag<>` been defined instead as
+`template<typename, int> struct foo_tag`, that would be a PP sequence like
+`(foo_tag)(typename)(int)`.
+
+The last macro parammeter, `BOOST_PP_SEQ_NIL`, is used for specifying any
+additional implicit arguments. There are none in this case, so
+`BOOST_PP_SEQ_NIL` is used to represent an empty sequence.
+
+As another example, consider a DSEL like the Boost Lambda Library, for
+which you might want a function named `construct()` for doing deferred
+construction of objects. You might want users to be able to use it like
+this:
+
+ std::vector<S> buffer;
+
+ // Use a lambda to construct S objects using two
+ // sequences as constructor arguments:
+ std::transform(
+ sequence1.begin()
+ , sequence1.end()
+ , sequence2.begin()
+ , std::back_inserter(buffer)
+ , construct<S>(_1, _2) // From a hypothetical lambda DSEL
+ );
+
+How might the `construct()` function be defined? We would like it to return
+a lazy function invocation that, when evaluated with two arguments, causes
+`S` objects to be constructed. Lazy functions in Proto look like this:
+
+ // The type of a Proto lazy function
+ proto::function<
+ TheFunctionToCall
+ , Argument1
+ , Argument2
+ , ...
+ >::type
+
+In the above, `TheFunctionToCall` might be an ordinary function object, so
+let's define a `construct_helper<>` function object that constructs an object.
+
+ template<typename T>
+ struct construct_helper
+ {
+ typedef T result_type; // for TR1 result_of
+
+ T operator()() const { return T(); }
+
+ template<typename A0>
+ T operator()(A0 const &a0) const { return T(a0); }
+
+ // ... other overloads ...
+ };
+
+With such a function object, we can say `construct_helper<S>()(1, 'a')` to
+immediately construct an `S` object using `1` and `'a'` as constructor
+arguments. We want this to be lazy, so we can wrap `construct_helper<S>` in
+a Proto terminal.
+
+ // A lazy S constructor
+ terminal<construct_helper<S> >::type const construct_S = {{}};
+
+ // OK, make a lazy function invocation but don't call it.
+ construct_S(1, 'a');
+
+ // Calls the lazy function and constructs an S
+ proto::default_context ctx;
+ S s = proto::eval( construct_S(1, 'a'), ctx );
+
+We're closer, but this is not the syntax we want. Recall that we want
+users to create objects lazily with `construct<S>(_1, _2)`. We can
+get that syntax with the following:
+
+ // Define the construct() function template that
+ // constructs an object lazily.
+ template<typename T, typename A0, typename A1>
+ typename proto::result_of::make_expr<
+ proto::tag::function
+ , construct_helper<T> const
+ , A0 const &
+ , A1 const &
+ >::type const
+ construct(A0 const &a0, A1 const &a1)
+ {
+ return proto::make_expr<proto::tag::function>(
+ construct_helper<T>()
+ , boost::ref(a0)
+ , boost::ref(a1)
+ );
+ }
+
+Now users can say `construct<S>(_1, _2)` and get the lazy object
+construction they want. (Making it work with `std::transform()`
+takes a little more effort, but that's covered in the
+[link boost_proto.users_guide.examples.lambda Lambda] example.)
+Now we need /N/ overloads to handle up to /N/ arguments. That's a lot
+of boiler plate, so we can use the `BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE()`
+macro to simplify our job.
+
+ // Generate BOOST_PROTO_MAX_ARITY-1 overloads of the
+ // construct function template like the one defined above.
+ BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE( \
+ construct \
+ , MyLambdaDomain \
+ , (proto::tag::function) \
+ , ((construct_helper)(typename)) \
+ )
+
+What is new in this case is the fourth macro argument, which specifies
+that there is an implicit first argument to `construct()` of type
+`construct_helper<X>`, where `X` is a template parameter of the function.
+The fourth argument to the macro is actually a PP sequence of PP
+sequences. Each sequence describes one implicit argument.
+
+To see `BOOST_PROTO_DEFINE_VARARG_FUNCTION_TEMPLATE()` and `construct()` in
+action, please check out the
+[link boost_proto.users_guide.examples.lambda Lambda] example.
+
+[blurb [*Ugly Macros]
+
+You may find this use of the preprocessor distasteful and decide to
+write out the overloads yourself. That's fine, but there are some good
+reasons to consider the macro.
+
+1) You may not be able to anticipate the maximum number of arguments
+ your users will require. If users decide to increase
+ `BOOST_PROTO_MAX_ARITY`, the macro will automatically generate
+ the additional overloads for you.
+
+2) On compilers that support variadic templates, you'd rather this
+ generated just one variadic function instead of /N/ overloads,
+ but you'd like your code to be portable to compilers that don't
+ support variadic templates. This is possible if you use the macro,
+ but not otherwise. (Proto doesn't yet support variadic templates
+ but it will in the future.)
+]
 
 [endsect]
 

Modified: branches/CMake/release/libs/xpressive/proto/doc/evaluation.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/evaluation.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/evaluation.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -7,35 +7,550 @@
 
 [section:expression_evaluation Expression Evaluation: Imparting Behaviors Within A Context]
 
+Once you have constructed a Proto expression tree, either by using Proto's
+operator overloads or with _make_expr_ and friends, you probably want to
+actually /do/ something with it. The simplest option is to use `proto::eval()`,
+a generic expression evaluator. To use _eval_, you'll need to define a
+/context/ that tells _eval_ how each node should be evaluated. This section
+goes through the nuts and bolts of using _eval_, defining evaluation contexts,
+and using the contexts that Proto provides.
+
+[note `proto::eval()` is a less powerful but easier-to-use evaluation technique
+than Proto transforms, which are covered later. Although very powerful,
+transforms have a steep learning curve and can be more difficult to debug.
+`proto::eval()` is a rather weak tree traversal algorithm. Dan Marsden has
+been working on a more general and powerful tree traversal library. When it is
+ready, I anticipate that it will eliminate the need for `proto::eval()`.]
+
+[/================================================================]
 [section:proto_eval Evaluating An Expression with [^proto::eval()]]
+[/================================================================]
+
+[:[*Synopsis:]]
 
-TODO
+ namespace proto
+ {
+ namespace result_of
+ {
+ // A metafunction for calculating the return
+ // type of proto::eval() given certain Expr
+ // and Context types.
+ template<typename Expr, typename Context>
+ struct eval
+ {
+ typedef
+ typename Context::template eval<Expr>::result_type
+ type;
+ };
+ }
+
+ namespace functional
+ {
+ // A callable function object type for evaluating
+ // a Proto expression with a certain context.
+ struct eval : callable
+ {
+ template<typename Sig>
+ struct result;
+
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr, Context>::type
+ operator ()(Expr &expr, Context &context) const;
+
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr, Context>::type
+ operator ()(Expr &expr, Context const &context) const;
+ };
+ }
+
+ functional::eval const eval = {};
+ }
+
+Given an expression and an evaluation context, using _eval_ is quite simple.
+Simply pass the expression and the context to _eval_ and it does the rest and
+returns the result. You can use the `eval<>` metafunction in the
+`proto::result_of` namespace to compute the return type of _eval_. The
+following demonstrates a use of _eval_:
+
+ template<typename Expr>
+ typename proto::result_of::eval<Expr const, MyContext>::type
+ MyEvaluate(Expr const &expr)
+ {
+ // Some user-defined context type
+ MyContext ctx;
+
+ // Evaluate an expression with the context
+ return proto::eval(expr, ctx);
+ }
+
+What _eval_ does is also very simple. It defers most of the work to the
+context itself. Here essentially is the implementation of _eval_:
+
+ // eval() dispatches to a nested "eval<>" function
+ // object within the Context:
+ template<typename Expr, typename Context>
+ typename Context::template eval<Expr>::result_type
+ eval(Expr &expr, Context &ctx)
+ {
+ typename Context::template eval<Expr> eval_fun;
+ return eval_fun(expr, ctx);
+ }
+
+Really, _eval_ is nothing more than a thin wrapper that dispatches to the
+appropriate handler within the context class. In the next section, we'll see
+how to implement a context class from scratch.
 
 [endsect]
 
+[/==============================================]
 [section:contexts Defining an Evaluation Context]
+[/==============================================]
 
-TODO
+As we saw in the previous section, there is really not much to the _eval_
+function. Rather, all the interesting expression evaluation goes on within
+a context class. This sections shows how to implement one from scratch.
+
+All context classes have roughly the following form:
+
+ // A prototypical user-defined context.
+ struct MyContext
+ {
+ // A nested eval<> class template
+ template<
+ typename Expr
+ , typename Tag = typename Expr::proto_tag
+ >
+ struct eval;
+
+ // Handle terminal nodes here...
+ template<typename Expr>
+ struct eval<Expr, proto::tag::terminal>
+ {
+ // Must have a nested result_type typedef.
+ typedef ... result_type;
+
+ // Must have a function call operator that takes
+ // an expression and the context.
+ result_type operator()(Expr &expr, MyContext &ctx) const
+ {
+ return ...;
+ }
+ };
+
+ // ... other specializations of struct eval<> ...
+ };
+
+Context classes are nothing more than a collection of specializations of a
+nested `eval<>` class template. Each specialization handles a different
+expression type.
+
+In the [link boost_proto.users_guide.hello_calculator Hello Calculator]
+section, we saw an example of a user-defined context class for evaluating
+calculator expressions. That context class was implemented with the help
+of Proto's _callable_context_. If we were to implement it from scratch, it
+would look something like this:
+
+ // The calculator_contest from the "Hello Calculator" section,
+ // implemented from scratch.
+ struct calculator_context
+ {
+ // The values for the _1 and _2 placeholders are
+ // passed to the calculator_context constructor.
+ calculator_context(double d1, double d2)
+ : d1_(d1), d2_(d2)
+ {}
+
+ template<
+ typename Expr
+ // defaulted template parameters, so we can
+ // specialize on the expressions that need
+ // special handling.
+ , typename Tag = typename tag_of<Expr>::type
+ , typename Arg0 = typename arg_c<Expr, 0>::type
+ >
+ struct eval;
+
+ // Handle placeholder1 terminals here...
+ template<typename Expr>
+ struct eval<Expr, proto::tag::terminal, placeholder1>
+ {
+ typedef double result_type;
+
+ result_type operator()(Expr &, MyContext &ctx) const
+ {
+ // replaces _1 with the value in ctx.d1_
+ return ctx.d1_;
+ }
+ };
+
+ // Handle placeholder2 terminals here...
+ template<typename Expr>
+ struct eval<Expr, proto::tag::terminal, placeholder2>
+ {
+ typedef double result_type;
+
+ result_type operator()(Expr &, MyContext &ctx) const
+ {
+ // replaces _1 with the value in ctx.d2_
+ return ctx.d2_;
+ }
+ };
+
+ // Handle other terminals here...
+ template<typename Expr, typename Arg0>
+ struct eval<Expr, proto::tag::terminal, Arg0>
+ {
+ typedef double result_type;
+
+ result_type operator()(Expr &expr, MyContext &) const
+ {
+ return proto::arg(expr);
+ }
+ };
+
+ // Handle addition here...
+ template<typename Expr, typename Arg0>
+ struct eval<Expr, proto::tag::plus, Arg0>
+ {
+ typedef double result_type;
+
+ result_type operator()(Expr &expr, MyContext &ctx) const
+ {
+ return proto::eval(proto::left(expr), ctx)
+ + proto::eval(proto::right(expr), ctx);
+ }
+ };
+
+ // ... other eval<> specializations for other node types ...
+
+ double d1_, d2_;
+ };
+
+Now we can use _eval_ with the context class above to evaluate calculator
+expressions as follows:
+
+ // Evaluate an expression with a calculator_context
+ double d = proto::eval(_1 + _2, calculator_context(5, 6));
+ assert(11 == d);
+
+Defining a context from scratch this way is tedious and verbose, but it gives
+you complete control over how the expression is evaluated. The context class in
+the [link boost_proto.users_guide.hello_calculator Hello Calculator] example
+was much simpler. In the next section we'll see the helper class Proto provides
+to ease the job of implementing context classes.
 
 [endsect]
 
+[/======================================]
 [section:canned_contexts Canned Contexts]
+[/======================================]
+
+Proto provides some ready-made context classes that you can use as-is, or that
+you can use to help while implementing your own contexts. They are:
 
+[variablelist
+ [ [[link boost_proto.users_guide.expression_evaluation.canned_contexts.default_context [^default_context]]]
+ [An evaluation context that assigns the usual C++ meanings to all the
+ operators. For example, addition nodes are handled by evaluating the
+ left and right children and then adding the results. The _default_context_
+ uses Boost.Typeof to deduce the types of the expressions it evaluates.] ]
+ [ [[link boost_proto.users_guide.expression_evaluation.canned_contexts.null_context [^null_context]]]
+ [A simple context that recursively evaluates children but does not combine
+ the results in any way and returns void.] ]
+ [ [[link boost_proto.users_guide.expression_evaluation.canned_contexts.callable_context [^callable_context<>]]]
+ [A helper that simplifies the job of writing context classes. Rather than
+ writing template specializations, with _callable_context_ you write a
+ function object with an overloaded function call operator. Any expressions
+ not handled by an overload are automatically dispatched to a default
+ evaluation context that you can specify.] ]
+]
+
+[/=========================================]
 [section:default_context [^default_context]]
+[/=========================================]
 
-TODO
+The _default_context_ is an evaluation context that assigns the usual C++
+meanings to all the operators. For example, addition nodes are handled by
+evaluating the left and right children and then adding the results. The
+_default_context_ uses Boost.Typeof to deduce the types of the expressions it
+evaluates.
+
+For example, consider the following "Hello World" example:
+
+ #include <iostream>
+ #include <boost/xpressive/proto/proto.hpp>
+ #include <boost/xpressive/proto/context.hpp>
+ #include <boost/typeof/std/ostream.hpp>
+ using namespace boost;
+
+ proto::terminal< std::ostream & >::type cout_ = { std::cout };
+
+ template< typename Expr >
+ void evaluate( Expr const & expr )
+ {
+ // Evaluate the expression with default_context,
+ // to give the operators their C++ meanings:
+ proto::default_context ctx;
+ proto::eval(expr, ctx);
+ }
+
+ int main()
+ {
+ evaluate( cout_ << "hello" << ',' << " world" );
+ return 0;
+ }
+
+This program outputs the following:
+
+[pre
+hello, world
+]
+
+_default_context_ is trivially defined in terms of a `default_eval<>`
+template, as follows:
+
+ // Definition of default_context
+ struct default_context
+ {
+ template<typename Expr>
+ struct eval
+ : default_eval<Expr, default_context const, typename Expr::proto_tag>
+ {};
+ };
+
+There are a bunch of `default_eval<>` specializations, each of which handles
+a different C++ operator. Here, for instance, is the specialization for binary
+addition:
+
+ // A default expression evaluator for binary addition
+ template<typename Expr, typename Context>
+ struct default_eval<Expr, Context, proto::tag::plus>
+ {
+ private:
+ static Expr & s_expr;
+ static Context & s_ctx;
+
+ public:
+ typedef
+ decltype(
+ proto::eval(proto::arg_c<0>(s_expr), s_ctx)
+ + proto::eval(proto::arg_c<1>(s_expr), s_ctx)
+ )
+ result_type;
+
+ result_type operator ()(Expr &expr, Context &ctx) const
+ {
+ return proto::eval(proto::arg_c<0>(expr), ctx)
+ + proto::eval(proto::arg_c<1>(expr), ctx);
+ }
+ };
+
+The above code uses `decltype` to calculate the return type of the function
+call operator. `decltype` is a new keyword in the next version of C++ that gets
+the type of any expression. Most compilers do not yet support `decltype`
+directly, so `default_eval<>` uses the Boost.Typeof library to emulate it. On
+some compilers, that may mean that `default_context` either doesn't work or
+that it requires you to register your types with the Boost.Typeof library.
+Check the documentation for Boost.Typeof to see.
 
 [endsect]
 
+[/===================================]
 [section:null_context [^null_context]]
+[/===================================]
+
+The _null_context_ is a simple context that recursively evaluates children
+but does not combine the results in any way and returns void. It is useful
+in conjunction with `callable_context<>`, or when defining your own contexts
+which mutate an expression tree in-place rather than accumulate a result, as
+we'll see below.
+
+_null_context_ is trivially implemented in terms of `null_eval<>` as follows:
+
+ // Definition of null_context
+ struct null_context
+ {
+ template<typename Expr>
+ struct eval
+ : null_eval<Expr, null_context const, Expr::proto_arity::value>
+ {};
+ };
+
+And `null_eval<>` is also trivially implemented. Here, for instance is
+a binary `null_eval<>`:
+
+ // Binary null_eval<>
+ template<typename Expr, typename Context>
+ struct null_eval<Expr, Context, 2>
+ {
+ typedef void result_type;
+
+ void operator()(Expr &expr, Context &ctx) const
+ {
+ proto::eval(proto::arg_c<0>(expr), ctx);
+ proto::eval(proto::arg_c<1>(expr), ctx);
+ }
+ };
+
+When would such classes be useful? Imagine you have an expression tree with
+integer terminals, and you would like to increment each integer in-place. You
+might define an evaluation context as follows:
+
+ struct increment_ints
+ {
+ // By default, just evaluate all children by defering
+ // to the null_eval<>
+ template<typename Expr, typename Arg = proto::result_of::arg<Expr>::type>
+ struct eval
+ : null_eval<Expr, increment_ints const>
+ {};
+
+ // Increment integer terminals
+ template<typename Expr>
+ struct eval<Expr, int>
+ {
+ typedef void result_type;
+
+ void operator()(Expr &expr, increment_ints const &) const
+ {
+ ++proto::arg(expr);
+ }
+ };
+ };
 
-TODO
+In the next section on _callable_context_, we'll see an even simpler way to
+achieve the same thing.
 
 [endsect]
 
+[/=============================================]
 [section:callable_context [^callable_context<>]]
+[/=============================================]
 
-TODO
+The _callable_context_ is a helper that simplifies the job of writing context
+classes. Rather than writing template specializations, with _callable_context_
+you write a function object with an overloaded function call operator. Any
+expressions not handled by an overload are automatically dispatched to a
+default evaluation context that you can specify.
+
+Rather than an evaluation context in its own right, _callable_context_ is more
+properly thought of as a context adaptor. To use it, you must define your own
+context that inherits from _callable_context_.
+
+In the [link boost_proto.users_guide.expression_evaluation.canned_contexts.null_context [^null_context]]
+section, we saw how to implement an evaluation context that increments all the
+integers within an expression tree. Here is how to do the same thing with the
+_callable_context_:
+
+ // An evaluation context that increments all
+ // integer terminals in-place.
+ struct increment_ints
+ : callable_context<
+ increment_ints const // derived context
+ , null_context const // fall-back context
+ >
+ {
+ typedef void result_type;
+
+ // Handle int terminals here:
+ void operator()(proto::tag::terminal, int &i) const
+ {
+ ++i;
+ }
+ };
+
+With such a context, we can do the following:
+
+ literal<int> i = 0, j = 10;
+ proto::eval( i - j * 3.14, increment_ints() );
+
+ std::cout << "i = " << i.get() << std::endl;
+ std::cout << "j = " << j.get() << std::endl;
+
+This program outputs the following, which shows that the integers `i` and `j`
+have been incremented by `1`:
+
+[pre
+i = 1
+j = 11
+]
+
+In the `increment_ints` context, we didn't have to define any nested `eval<>`
+templates. That's because _callable_context_ implements them for us.
+_callable_context_ takes two template parameters: the derived context and a
+fall-back context. For each node in the expression tree being evaluated,
+_callable_context_ checks to see if there is an overloaded `operator()` in the
+derived context that accepts it. Given some expression `expr` of type `Expr`,
+and a context `ctx`, it attempts to call:
+
+ ctx(
+ typename Expr::proto_tag()
+ , proto::arg_c<0>(expr)
+ , proto::arg_c<1>(expr)
+ ...
+ );
+
+Using function overloading and metaprogramming tricks, _callable_context_ can
+detect at compile-time whether such a function exists or not. If so, that
+function is called. If not, the current expression is passed to the fall-back
+evaluation context to be processed.
+
+We saw another example of the _callable_context_ when we looked at the simple
+calculator expression evaluator. There, we wanted to customize the evaluation
+of placeholder terminals, and delegate the handling of all other nodes to the
+_default_context_. We did that as follows:
+
+ // An evaluation context for calculator expressions that
+ // explicitly handles placeholder terminals, but defers the
+ // processing of all other nodes to the default_context.
+ struct calculator_context
+ : proto::callable_context< calculator_context const >
+ {
+ calculator_context(double d1, double d2)
+ : d1_(d1), d2_(d2)
+ {}
+
+ // Define the result type of the calculator.
+ typedef double result_type;
+
+ // Handle the placeholders:
+ double operator()(proto::tag::terminal, placeholder1) const
+ {
+ return this->d1_;
+ }
+
+ double operator()(proto::tag::terminal, placeholder2) const
+ {
+ return this->d2_;
+ }
+
+ private:
+ double d1_, d2_;
+ };
+
+In this case, we didn't specify a fall-back context. In that case,
+_callable_context_ uses the _default_context_. With the above
+`calculator_context` and a couple of appropriately defined placeholder
+terminals, we can evaluate calculator expressions, as demonstrated
+below:
+
+ struct placeholder1 {};
+ struct placeholder2 {};
+ terminal<placeholder1>::type const _1 = {{}};
+ terminal<placeholder2>::type const _2 = {{}};
+ // ...
+
+ double j = proto::eval(
+ (_2 - _1) / _2 * 100
+ , calculator_context(4, 5)
+ );
+ std::cout << "j = " << j << std::endl;
+
+The above code displays the following:
+
+[pre
+j = 20
+]
 
 [endsect]
 

Modified: branches/CMake/release/libs/xpressive/proto/doc/examples.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/examples.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/examples.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -15,71 +15,178 @@
 [import ../example/tarray.cpp]
 [import ../example/vec3.cpp]
 [import ../example/vector.cpp]
+[import ../example/map_assign.cpp]
+[import ../example/futures.cpp]
+[import ../example/lambda.cpp]
 
+[/===============]
 [section Examples]
+[/===============]
 
-[section Hello World]
+A code example is worth a thousand words ...
 
-blah blah blah
+[/=================================================================================]
+[section:hello_world Hello World: Building An Expression Template and Evaluating It]
+[/=================================================================================]
 
-[HelloWorld]
+A trivial example which builds and expression template
+and evaluates it.
 
-blah blah blah
+[HelloWorld]
 
 [endsect]
 
-[section Calc1]
+[/==================================================]
+[section:calc1 Calc1: Defining An Evaluation Context]
+[/==================================================]
+
+A simple example which builds a miniature domain-specific
+embedded language for lazy arithmetic expressions, with
+TR1 bind-style argument placeholders.
 
 [Calc1]
 
 [endsect]
 
-[section Calc2]
+[/============================================================]
+[section:calc2 Calc2: Adding Members Using [^proto::extends<>]]
+[/============================================================]
+
+An extension of the Calc1 example that uses _extends_ to
+make calculator expressions valid function objects that
+can be used with STL algorithms.
 
 [Calc2]
 
 [endsect]
 
-[section Calc3]
+[/===============================================]
+[section:calc3 Calc3: Defining A Simple Transform]
+[/===============================================]
+
+An extension of the Calc2 example that uses a Proto transform
+to calculate the arity of a calculator expression and statically
+assert that the correct number of argument are passed.
 
 [Calc3]
 
 [endsect]
 
-[section Lazy Vector]
+[/==============================================================]
+[section:lazy_vector Lazy Vector: Controlling Operator Overloads]
+[/==============================================================]
+
+This example constructs a mini-library for linear algebra, using
+expression templates to eliminate the need for temporaries when
+adding vectors of numbers.
+
+This example uses a domain with a grammar to prune the set
+of overloaded operators. Only those operators that produce
+valid lazy vector expressions are allowed.
 
 [LazyVector]
 
 [endsect]
 
-[section RGB]
+[/========================================================]
+[section:rgb RGB: Type Manipulations With Proto Transforms]
+[/========================================================]
+
+This is a simple example of doing arbitrary type manipulations with Proto
+transforms. It takes some expression involving primiary colors and combines
+the colors according to arbitrary rules. It is a port of the RGB example
+from _PETE_.
 
 [RGB]
 
 [endsect]
 
-[section TArray]
+[/=====================================================]
+[section:tarray TArray: A Simple Linear Algebra Library]
+[/=====================================================]
+
+This example constructs a mini-library for linear algebra, using
+expression templates to eliminate the need for temporaries when
+adding arrays of numbers. It duplicates the TArray example from
+_PETE_.
 
 [TArray]
 
 [endsect]
 
-[section Vec3]
+[/========================================================]
+[section:vec3 Vec3: Computing With Transforms And Contexts]
+[/========================================================]
+
+This is a simple example using `proto::extends<>` to extend a terminal type
+with additional behaviors, and using custom contexts and `proto::eval()` for
+evaluating expressions. It is a port of the Vec3 example from
+_PETE_.
 
 [Vec3]
 
 [endsect]
 
-[section Vector]
+[/========================================================]
+[section:vector Vector: Adapting A Non-Proto Terminal Type]
+[/========================================================]
+
+This is an example of using `BOOST_PROTO_DEFINE_OPERATORS()` to Proto-ify
+expressions using `std::vector<>`, a non-Proto type. It is a port of the
+Vector example from _PETE_.
 
 [Vector]
 
 [endsect]
 
-[section Mixed]
+[/=============================================================]
+[section:mixed Mixed: Adapting Several Non-Proto Terminal Types]
+[/=============================================================]
+
+This is an example of using `BOOST_PROTO_DEFINE_OPERATORS()` to Proto-ify
+expressions using `std::vector<>` and `std::list<>`, non-Proto types. It is a
+port of the Mixed example from _PETE_.
 
 [Mixed]
 
 [endsect]
 
+[/=======================================================]
+[section:map_assign Map Assign: An Intermediate Transform]
+[/=======================================================]
+
+A demonstration of how to implement `map_list_of()` from the Boost.Assign
+library using Proto. `map_list_assign()` is used to conveniently initialize a
+`std::map<>`. By using Proto, we can avoid any dynamic allocation while
+building the intermediate representation.
+
+[MapAssign]
+
+[endsect]
+
+[/===========================================================]
+[section:future_group Future Group: A More Advanced Transform]
+[/===========================================================]
+
+An advanced example of a Proto transform that implements
+Howard Hinnant's design for /future groups/ that block
+for all or some asynchronous operations to complete and
+returns their results in a tuple of the appropriate type.
+
+[FutureGroup]
+
+[endsect]
+
+[/========================================================]
+[section:lambda Lambda: A Simple Lambda Library with Proto]
+[/========================================================]
+
+This is an advanced example that shows how to implement a simple
+lambda DSEL with Proto, like the Boost.Lambda_library. It uses
+contexts, transforms and expression extension.
+
+[Lambda]
+
+[endsect]
+
 [endsect]

Modified: branches/CMake/release/libs/xpressive/proto/doc/extensibility.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/extensibility.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/extensibility.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/proto/doc/grammars.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/grammars.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/grammars.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -268,8 +268,9 @@
 and logically negates it; `not_<Grammar>` will match any expression that
 `Grammar` does /not/ match.
 
-The _if_ template is used together with an MPL lambda expression, which is
-evaluated against expression types to find matches.
+The _if_ template is used together with a Proto transform that is evaluated
+against expression types to find matches. (Proto transforms will be described
+later.)
 
 The _and_ template is like _or_, except that each argument of the _and_ must
 match in order for the _and_ to match. As an example, consider the definition
@@ -279,34 +280,19 @@
     struct CharString
       : and_<
             terminal< _ >
- , if_< is_same< result_of::arg< mpl::_ >, char const * > >
+ , if_< is_same< _arg, char const * >() >
>
     {};
 
 This says that a `CharString` must be a terminal, /and/ its argument must be
 the same as `char const *`. Notice the template argument of _if_:
-`is_same< result_of::arg< mpl::_ >, char const * >`. This is an MPL lambda
-expression because it has the MPL placeholder `mpl::_` in it.
-
-[warning Do not confuse `mpl::_` with `proto::_`. The first is only useful in
-MPL lambda expressions. The second is Proto's grammar wildcard. The only place
-`mpl::_` should appear in your grammars is in an _if_, or in tranform::applyN<>,
-as we'll see later. Elsewhere in your grammars you should be using `proto::_`.]
+`is_same< _arg, char const * >()`. This is Proto transform that compares the
+argument of a terminal to `char const *`.
 
 The _if_ template has a couple of variants. In additon to `if_<Condition>` you
 can also say `if_<Condition, ThenGrammar>` and
 `if_<Condition, ThenGrammar, ElseGrammar>`. These let you select one sub-grammar
-or another based on the `Condition`. The following table shows their
-equivalencies:
-
-[table If-Then-Else Equivalencies
-[[Short-Cut Grammar][Equivalent Grammar]]
-[[`if_<Condition, ThenGrammar>`][`and_<if_<Condition>, ThenGrammar>`]]
-[[`if_<Condition, ThenGrammar, ElseGrammar>`][``or_<
- and_<if_<Condition>, ThenGrammar>
- , and_<not_<if_<Condition> >, ElseGrammar>
->``]]
-]
+or another based on the `Condition`.
 
 [endsect]
 

Modified: branches/CMake/release/libs/xpressive/proto/doc/history.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/history.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/history.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -9,6 +9,11 @@
 
 [variablelist
 [
+ [January 11, 2008]
+ [Boost.Proto v3 brings separation of grammars and transforms and a
+ "round" lambda syntax for defining transforms in-place.]
+]
+[
     [April 15, 2007]
     [Boost.Xpressive is ported from Proto compilers to Proto transforms.
      Support for old Proto compilers is dropped.]

Modified: branches/CMake/release/libs/xpressive/proto/doc/implementation.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/implementation.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/implementation.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,6 +7,166 @@
 
 [section:implementation Appendix C: Implementation Notes]
 
+[section:sfinae Quick-n-Dirty Type Categorization]
+
+Much has already been written about dispatching on type traits using
+SFINAE (Substitution Failure Is Not An Error) techniques in C++. There
+is a Boost library, Boost.Enable_if, to make the technique idiomatic.
+Proto dispatches on type traits extensively, but it doesn't use
+`enable_if<>` very often. Rather, it dispatches based on the presence
+or absence of nested types, often typedefs for void.
+
+Consider the implementation of `is_expr<>`. It could have been written
+as something like this:
+
+ template<typename T>
+ struct is_expr
+ : is_base_and_derived<proto::some_expr_base, T>
+ {};
+
+Rather, it is implemented as this:
+
+ template<typename T, typename Void = void>
+ struct is_expr
+ : mpl::false_
+ {};
+
+ template<typename T>
+ struct is_expr<T, typename T::proto_is_expr_>
+ : mpl::true_
+ {};
+
+This relies on the fact that the specialization will be preferred
+if `T` has a nested `proto_is_expr_` that is a typedef for `void`.
+All Proto expression types have such a nested typedef.
+
+Why does Proto do it this way? The reason is because, after running
+extensive benchmarks while trying to improve compile times, I have
+found that this approach compiles faster. It requires exactly one
+template instantiation. The other approach requires at least 2:
+`is_expr<>` and `is_base_and_derived<>`, plus whatever templates
+`is_base_and_derived<>` may instantiate.
+
+[endsect]
+
+[section:function_arity Detecting the Arity of Function Objects]
+
+In several places, Proto needs to know whether or not a function
+object `Fun` can be called with certain parameters and take a
+fallback action if not. This happens in _callable_context_ and
+in the _call_ transform. How does Proto know? It involves some
+tricky metaprogramming. Here's how.
+
+Another way of framing the question is by trying to implement
+the following `can_be_called<>` Boolean metafunction, which
+checks to see if a function object `Fun` can be called with
+parameters of type `A` and `B`:
+
+ template<typename Fun, typename A, typename B>
+ struct can_be_called;
+
+First, we define the following `dont_care` struct, which has an
+implicit conversion from anything. And not just any implicit
+conversion; it has a ellipsis conversion, which is the worst possible
+conversion for the purposes of overload resolution:
+
+ struct dont_care
+ {
+ dont_care(...);
+ };
+
+We also need some private type known only to us with an overloaded
+comma operator (!), and some functions that detect the presence of
+this type and return types with different sizes, as follows:
+
+ struct private_type
+ {
+ private_type const &operator,(int) const;
+ };
+
+ typedef char yes_type; // sizeof(yes_type) == 1
+ typedef char (&no_type)[2]; // sizeof(no_type) == 2
+
+ template<typename T>
+ no_type is_private_type(T const &);
+
+ yes_type is_private_type(private_type const &);
+
+Next, we implement a binary function object wrapper with a very
+strange conversion operator, whose meaning will become clear later.
+
+ template<typename Fun>
+ struct funwrap2 : Fun
+ {
+ funwrap2();
+ typedef private_type const &(*pointer_to_function)(dont_care, dont_care);
+ operator pointer_to_function() const;
+ };
+
+With all of these bits and pieces, we can implement `can_be_called<>` as
+follows:
+
+ template<typename Fun, typename A, typename B>
+ struct can_be_called
+ {
+ static funwrap2<Fun> &fun;
+ static A &a;
+ static B &b;
+
+ static bool const value = (
+ sizeof(no_type) == sizeof(is_private_type( (fun(a,b), 0) ))
+ );
+
+ typedef mpl::bool_<value> type;
+ };
+
+The idea is to make it so that `fun(a,b)` will always compile by adding
+our own binary function overload, but doing it in such a way that we can
+detect whether our overload was selected or not. And we rig it so that
+our overload is selected if there is really no better option. What follows
+is a description of how `can_be_called<>` works.
+
+We wrap `Fun` in a type that has an implicit conversion to a pointer to
+a binary function. An object `fun` of class type can be invoked as
+`fun(a, b)` if it has such a conversion operator, but since it involves
+a user-defined conversion operator, it is less preferred than an
+overloaded `operator()`, which requires no such conversion.
+
+The function pointer can accept any two arguments by virtue
+of the `dont_care` type. The conversion sequence for each argument is
+guaranteed to be the worst possible conversion sequence: an implicit
+conversion through an ellipsis, and a user-defined conversion to
+`dont_care`. In total, it means that `funwrap2<Fun>()(a, b)` will
+always compile, but it will select our overload only if there really is
+no better option.
+
+If there is a better option --- for example if `Fun` has an overloaded
+function call operator such as `void operator()(A a, B b)` --- then
+`fun(a, b)` will resolve to that one instead. The question now is how
+to detect which function got picked by overload resolution.
+
+Notice how `fun(a, b)` appears in `can_be_called<>`: `(fun(a, b), 0)`.
+Why do we use the comma operator there? The reason is because we are
+using this expression as the argument to a function. If the return type
+of `fun(a, b)` is `void`, it cannot legally be used as an argument to
+a function. The comma operator sidesteps the issue.
+
+This should also make plain the purpose of the overloaded comma operator
+in `private_type`. The return type of the pointer to function is
+`private_type`. If overload resolution selects our overload, then the
+type of `(fun(a, b), 0)` is `private_type`. Otherwise, it is `int`.
+That fact is used to dispatch to either overload of `is_private_type()`,
+which encodes its answer in the size of its return type.
+
+That's how it works with binary functions. Now repeat the above process
+for functions up to some predefined function arity, and you're done.
+
+[endsect]
+
+[section:ppmp_vs_tmp Avoiding Template Instiations With The Preprocessor]
+
 TODO
 
 [endsect]
+
+[endsect]

Modified: branches/CMake/release/libs/xpressive/proto/doc/installation.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/installation.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/installation.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -9,9 +9,11 @@
 
 [heading Getting Proto]
 
-Currently the only way to get Proto is through CVS via the boost project on
-SourceForge.net. Just go to [@http://sf.net/projects/boost] and follow the
-instructions there for anonymous CVS access.
+You can get Proto by downloading [^proto.zip] from
+[@http://www.boost-consulting.com/vault/index.php?directory=Template%20Metaprogramming]
+or by accessing Boost's SVN repository on SourceForge.net. Just go to
+[@http://svn.boost.org/trac/boost/wiki/BoostSubversion]
+and follow the instructions there for anonymous SVN access.
 
 [heading Building with Proto]
 
@@ -19,19 +21,22 @@
 your build scripts or link to any separate lib file to use it. All you need
 to do is `#include <boost/xpressive/proto/proto.hpp>`. This will include the
 core of Proto. If you want to use any transforms, you must include the
-appropriate header from the [^boost\/xpressive\/proto\/transform\/] directory.
+appropriate header from the [^boost\/proto\/transform\/] directory.
+Likewise for any evaluation contexts, which live in the
+[^boost\/proto\/context\/] directory.
 
 [heading Requirements]
 
-Proto depends on Boost. You must use the version in CVS HEAD.
+Proto depends on Boost. You must use either Boost version 1.34.1 or the
+version in SVN trunk.
 
 [heading Supported Compilers]
 
 Currently, Boost.Proto is known to work on the following compilers:
 
 * Visual C++ 7.1 and higher
-* GNU C++ 3.2 and higher
-* Intel on Linun 8.1 and higher
+* GNU C++ 3.4 and higher
+* Intel on Linux 8.1 and higher
 * Intel on Windows 9.1 and higher
 
 [note Please send any questions, comments and bug reports to eric <at> boost-consulting <dot> com.]

Modified: branches/CMake/release/libs/xpressive/proto/doc/preface.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/preface.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/preface.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,8 +7,8 @@
 
 [section Preface]
 
-[:Something witty.]
-[:[*['-- Someone Famous]]]
+[:["There are more things in heaven and earth, Horatio, than are dreamt of in your philosophy.]]
+[:[*['-- William Shakespeare]]]
 
 [heading Description]
 
@@ -61,6 +61,14 @@
 with Fusion's iterators and algorithms.
 
 The syntax for the grammar-matching features of `proto::matches<>` is inspired
-by MPL's lambda expressions.
+by MPL's lambda expressions, and by Aleksey Gurtovoy's
+[@http://lists.boost.org/Archives/boost/2002/11/39718.php "round" lambda] notation.
+
+[heading Further Reading]
+
+A technical paper about an earlier version of Proto was accepted into the
+[@http://lcsd.cs.tamu.edu/2007/ ACM SIGPLAN Symposium on Library-Centric Software Design LCSD'07],
+and can be found at [@http://lcsd.cs.tamu.edu/2007/final/1/1_Paper.pdf]. The
+tree transforms described in that paper differ from what exists today.
 
 [endsect]

Modified: branches/CMake/release/libs/xpressive/proto/doc/proto.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/proto.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/proto.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -2,7 +2,7 @@
 [library Boost.Proto
     [quickbook 1.3]
     [authors [Niebler, Eric]]
- [copyright 2006 Eric Niebler]
+ [copyright 2008 Eric Niebler]
     [category template]
     [id proto]
     [dirname proto]
@@ -18,7 +18,7 @@
 ]
 
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -35,40 +35,46 @@
 
 [/ Links ]
 
+[def _PETE_ [@http://www.codesourcery.com/pooma/download.html PETE]]
 [def _spirit_fx_ [@http://spirit.sourceforge.net Spirit Parser Framework]]
 [def _spirit_ [@http://spirit.sourceforge.net Spirit]]
 [def _xpressive_ [@../../../libs/xpressive/doc/index.html Boost.Xpressive]]
-[def _expr_ [classref boost::proto::exprns_::expr<Tag,Args,1> `expr<>`]]
-[def _ref_ [classref boost::proto::refns_::ref_ `ref_<>`]]
-[def _unref_ [classref boost::proto::functional::unref `unref()`]]
-[def _deep_copy_ [classref boost::proto::functional::deep_copy `deep_copy()`]]
-[def _extends_ [classref boost::proto::exprns_::extends `extends<>`]]
-[def _as_expr_ [classref boost::proto::functional::as_expr `as_expr()`]]
-[def _as_arg_ [classref boost::proto::functional::as_arg `as_arg()`]]
-[def _make_expr_ [funcref boost::proto::make_expr `make_expr()`]]
-[def _unpack_expr_ [funcref boost::proto::unpack_expr `unpack_expr()`]]
-[def _matches_ [classref boost::proto::result_of::matches `matches<>`]]
-[def _or_ [classref boost::proto::control::or_ `or_<>`]]
-[def _and_ [classref boost::proto::control::and_ `and_<>`]]
-[def _if_ [classref boost::proto::control::if_ `if_<>`]]
-[def _not_ [classref boost::proto::control::not_ `not_<>`]]
-[def _exact_ [classref boost::proto::control::exact `exact<>`]]
-[def _convertible_to_ [classref boost::proto::control::convertible_to `convertible_to<>`]]
-[def _is_expr_ [classref boost::proto::result_if::is_expr `is_expr<>`]]
-[def _tag_of_ [classref boost::proto::result_if::tag_of `tag_of<>`]]
-[def _arg_ [funcref boost::proto::arg `arg()`]]
-[def _arg_c_ [funcref boost::proto::arg_c `arg_c()`]]
-[def _eval_ [classref boost::proto::functional::eval `eval()`]]
-[def _left_ [classref boost::proto::functional::left `left()`]]
-[def _right_ [classref boost::proto::functional::right `right()`]]
-[def _terminal_ [classref boost::proto::op::terminal `terminal<>`]]
-[def _unary_expr_ [classref boost::proto::op::unary_expr `unary_expr<>`]]
-[def _binary_expr_ [classref boost::proto::op::binary_expr `binary_expr<>`]]
-[def _literal_ [classref boost::proto::utility::literal `literal<>`]]
-[def _lit_ [funcref boost::proto::lit `lit()`]]
-[def _vararg_ [classref boost::proto::control::vararg `vararg<>`]]
-[def _default_context_ [classref boost::proto::context::default_context `default_context`]]
-[def _callable_context_ [classref boost::proto::context::callable_context `callable_context<>`]]
+[def _expr_ [classref boost::proto::exprns_::expr<Tag,Args,1> `expr<>`]]
+[def _ref_ [classref boost::proto::refns_::ref_ `ref_<>`]]
+[def _unref_ [classref boost::proto::functional::unref `unref()`]]
+[def _deep_copy_ [classref boost::proto::functional::deep_copy `deep_copy()`]]
+[def _extends_ [classref boost::proto::exprns_::extends `extends<>`]]
+[def _as_expr_ [funcref boost::proto::as_expr `as_expr()`]]
+[def _as_arg_ [funcref boost::proto::as_arg `as_arg()`]]
+[def _make_expr_ [funcref boost::proto::make_expr `make_expr()`]]
+[def _unpack_expr_ [funcref boost::proto::unpack_expr `unpack_expr()`]]
+[def _matches_ [classref boost::proto::result_of::matches `matches<>`]]
+[def _or_ [classref boost::proto::control::or_ `or_<>`]]
+[def _and_ [classref boost::proto::control::and_ `and_<>`]]
+[def _if_ [classref boost::proto::control::if_ `if_<>`]]
+[def _not_ [classref boost::proto::control::not_ `not_<>`]]
+[def _exact_ [classref boost::proto::control::exact `exact<>`]]
+[def _convertible_to_ [classref boost::proto::control::convertible_to `convertible_to<>`]]
+[def _is_expr_ [classref boost::proto::result_if::is_expr `is_expr<>`]]
+[def _tag_of_ [classref boost::proto::result_if::tag_of `tag_of<>`]]
+[def _arg_ [funcref boost::proto::arg `arg()`]]
+[def _arg_c_ [funcref boost::proto::arg_c `arg_c()`]]
+[def _eval_ [memberref boost::proto::eval `eval()`]]
+[def _left_ [classref boost::proto::functional::left `left()`]]
+[def _right_ [classref boost::proto::functional::right `right()`]]
+[def _terminal_ [classref boost::proto::op::terminal `terminal<>`]]
+[def _unary_expr_ [classref boost::proto::op::unary_expr `unary_expr<>`]]
+[def _binary_expr_ [classref boost::proto::op::binary_expr `binary_expr<>`]]
+[def _literal_ [classref boost::proto::utility::literal `literal<>`]]
+[def _lit_ [funcref boost::proto::lit `lit()`]]
+[def _vararg_ [classref boost::proto::control::vararg `vararg<>`]]
+[def _default_context_ [classref boost::proto::context::default_context `default_context`]]
+[def _callable_context_ [classref boost::proto::context::callable_context `callable_context<>`]]
+[def _null_context_ [classref boost::proto::context::null_context `null_context<>`]]
+[def _when_ [classref boost::proto::transform::when `when<>`]]
+[def _call_ [classref boost::proto::transform::call `call<>`]]
+[def _make_ [classref boost::proto::transform::make `make<>`]]
+[def _flatten_ [funcref boost::proto::flatten `flatten()`]]
 
 [include preface.qbk]
 
@@ -85,7 +91,7 @@
     [Describes the tools Proto provides for making your expression trees do
      something useful.]]
 [[[link boost_proto.users_guide.expression_introspection Expression Introspection]]
- [Describes Proto's grammar matching faciities, which make
+ [Describes Proto's grammar matching facilities, which make
      it easy to discover the structure of an expression tree.]]
 [[[link boost_proto.users_guide.expression_transformation Expression Transformation]]
     [Describes how to write expression transforms that turn an expression tree
@@ -118,7 +124,7 @@
 
 [endsect]
 
-[xinclude protodoc.xml]
+[xinclude proto.xml]
 
 [section Appendices]
 

Modified: branches/CMake/release/libs/xpressive/proto/doc/protodoc.xml
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/protodoc.xml (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/protodoc.xml 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,27 +1,27 @@
 <?xml version="1.0" standalone="yes"?>
 <library-reference><header name="boost/xpressive/proto/args.hpp"><para>Contains definition of args&lt;&gt; class template. </para><namespace name="boost"><namespace name="proto"><namespace name="argsns_"><struct name="args0"><template>
       <template-type-parameter name="Arg0"/>
- </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>mpl::void_</type></typedef><typedef name="arg2"><type>mpl::void_</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef><data-member name="size" specifiers="static"><type>const long</type></data-member></struct><struct name="args1"><template>
+ </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><data-member name="size" specifiers="static"><type>const long</type></data-member><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>mpl::void_</type></typedef><typedef name="arg2"><type>mpl::void_</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef></struct><struct name="args1"><template>
       <template-type-parameter name="Arg0"/>
- </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>mpl::void_</type></typedef><typedef name="arg2"><type>mpl::void_</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef><data-member name="size" specifiers="static"><type>const long</type></data-member></struct><struct name="args2"><template>
+ </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><data-member name="size" specifiers="static"><type>const long</type></data-member><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>mpl::void_</type></typedef><typedef name="arg2"><type>mpl::void_</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef></struct><struct name="args2"><template>
       <template-type-parameter name="Arg0"/>
       <template-type-parameter name="Arg1"/>
- </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>mpl::void_</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef><data-member name="size" specifiers="static"><type>const long</type></data-member></struct><struct name="args3"><template>
+ </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><data-member name="size" specifiers="static"><type>const long</type></data-member><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>mpl::void_</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef></struct><struct name="args3"><template>
       <template-type-parameter name="Arg0"/>
       <template-type-parameter name="Arg1"/>
       <template-type-parameter name="Arg2"/>
- </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>Arg2</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef><data-member name="size" specifiers="static"><type>const long</type></data-member></struct><struct name="args4"><template>
+ </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><data-member name="size" specifiers="static"><type>const long</type></data-member><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>Arg2</type></typedef><typedef name="arg3"><type>mpl::void_</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef></struct><struct name="args4"><template>
       <template-type-parameter name="Arg0"/>
       <template-type-parameter name="Arg1"/>
       <template-type-parameter name="Arg2"/>
       <template-type-parameter name="Arg3"/>
- </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>Arg2</type></typedef><typedef name="arg3"><type>Arg3</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef><data-member name="size" specifiers="static"><type>const long</type></data-member></struct><struct name="args5"><template>
+ </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><data-member name="size" specifiers="static"><type>const long</type></data-member><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>Arg2</type></typedef><typedef name="arg3"><type>Arg3</type></typedef><typedef name="arg4"><type>mpl::void_</type></typedef></struct><struct name="args5"><template>
       <template-type-parameter name="Arg0"/>
       <template-type-parameter name="Arg1"/>
       <template-type-parameter name="Arg2"/>
       <template-type-parameter name="Arg3"/>
       <template-type-parameter name="Arg4"/>
- </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>Arg2</type></typedef><typedef name="arg3"><type>Arg3</type></typedef><typedef name="arg4"><type>Arg4</type></typedef><data-member name="size" specifiers="static"><type>const long</type></data-member></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/context.hpp"><para>Includes all the context classes in the context/ sub-directory. </para></header><header name="boost/xpressive/proto/context/callable.hpp"><para>Definintion of callable_context&lt;&gt;, an evaluation co
ntext for proto::eval() that explodes each node and calls the derived context type with the expressions constituents. If the derived context doesn't have an overload that handles this node, fall-back to the default_context. TODO: make the fall-back configurable! </para><namespace name="boost"><namespace name="proto"><namespace name="context"><struct name="callable_eval"><template>
+ </template><purpose>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. </purpose><description><para>A type sequence, for use as the 2nd parameter to the <computeroutput>expr&lt;&gt;</computeroutput> class template. The types in the sequence correspond to the children of a node in an expression tree. </para></description><data-member name="size" specifiers="static"><type>const long</type></data-member><typedef name="arg0"><type>Arg0</type></typedef><typedef name="arg1"><type>Arg1</type></typedef><typedef name="arg2"><type>Arg2</type></typedef><typedef name="arg3"><type>Arg3</type></typedef><typedef name="arg4"><type>Arg4</type></typedef></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/context.hpp"><para>Includes all the context classes in the context/ sub-directory. </para></header><header name="boost/xpressive/proto/context/callable.hpp"><para>Definintion of callable_context&lt;&gt;, an evaluation co
ntext for proto::eval() that explodes each node and calls the derived context type with the expressions constituents. If the derived context doesn't have an overload that handles this node, fall-back to the default_context. TODO: make the fall-back configurable! </para><namespace name="boost"><namespace name="proto"><namespace name="context"><struct name="callable_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
       <template-nontype-parameter name="Arity"><type>long</type></template-nontype-parameter>
@@ -54,10 +54,7 @@
       <template-type-parameter name="Context"/>
       <template-type-parameter name="Tag"/>
       <template-nontype-parameter name="Arity"><type>long</type></template-nontype-parameter>
- </template></struct><struct name="default_context"><description><para>default_context </para></description><struct name="eval"><template>
- <template-type-parameter name="Expr"/>
- <template-type-parameter name="ThisContext"><default>default_context const</default></template-type-parameter>
- </template><inherit access="public">boost::proto::context::default_eval&lt; Expr, ThisContext &gt;</inherit><description><para>default_context::eval </para></description></struct></struct><struct-specialization name="default_eval"><template>
+ </template></struct><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::posit</template-arg><template-arg>1</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
@@ -150,7 +147,7 @@
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::shift_right_assign</template-arg><template-arg>2</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::multilpies_assign</template-arg><template-arg>2</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::multiplies_assign</template-arg><template-arg>2</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::divides_assign</template-arg><template-arg>2</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
@@ -174,7 +171,7 @@
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::bitwise_xor_assign</template-arg><template-arg>2</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::terminal</template-arg><template-arg>0</template-arg></specialization><typedef name="result_type"><type>mpl::if_&lt; is_const &lt; Expr &gt;, typename <classname>proto::result_of::arg</classname>&lt; Expr &gt;::const_reference, typename <classname>proto::result_of::arg</classname>&lt; Expr &gt;::reference &gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name=""><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::terminal</template-arg><template-arg>0</template-arg></specialization><typedef name="result_type"><type>mpl::if_&lt; is_const&lt; Expr &gt;, typename <classname>proto::result_of::arg</classname>&lt; Expr &gt;::const_reference, typename <classname>proto::result_of::arg</classname>&lt; Expr &gt;::reference &gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name=""><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::post_inc</template-arg><template-arg>1</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
@@ -189,22 +186,28 @@
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::if_else_</template-arg><template-arg>3</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::comma</template-arg><template-arg>2</template-arg></specialization><typedef name="proto_arg0"><type><classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 0 &gt;::type, Context &gt;::type</type></typedef><typedef name="proto_arg1"><type><classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type, Context &gt;::type</type></typedef><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::comma</template-arg><template-arg>2</template-arg></specialization><typedef name="result_type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="Context"/>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>0</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type()&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>1</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type()&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>2</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>2</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>3</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 2 &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>3</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 2 &gt;::type &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specializat
ion><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>4</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 2 &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 3 &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></
parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>4</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 2 &gt;::type &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 3 &gt;::type &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><paramete
r name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="default_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>5</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 2 &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 3 &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename proto::result_of::arg_c&lt; Expr, 4 &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</t
ype><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/context/null.hpp"><para>Definintion of null_context&lt;&gt;, an evaluation context for proto::eval() that simply evaluates each child expression, doesn't combine the results at all, and returns void. </para><namespace name="boost"><namespace name="proto"><namespace name="context"><struct name="null_eval"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>proto::tag::function</template-arg><template-arg>5</template-arg></specialization><typedef name="function_type"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="result_type"><type>boost::result_of&lt; function_type(typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 1 &gt;::type &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 2 &gt;::type &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 3 &gt;::type &gt;::type, Context &gt;::type, typename <classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; typename proto::result_of::arg_c&lt; Expr, 4 &gt;::t
ype &gt;::type, Context &gt;::type)&gt;::type</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result_type</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct name="default_context"><description><para>default_context </para></description><struct name="eval"><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="ThisContext"><default>default_context const</default></template-type-parameter>
+ </template><inherit access="public">boost::proto::context::default_eval&lt; Expr, ThisContext &gt;</inherit><description><para>default_context::eval </para></description></struct></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/context/null.hpp"><para>Definintion of null_context&lt;&gt;, an evaluation context for proto::eval() that simply evaluates each child expression, doesn't combine the results at all, and returns void. </para><namespace name="boost"><namespace name="proto"><namespace name="context"><struct name="null_eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
       <template-nontype-parameter name="Arity"><type>long</type></template-nontype-parameter>
@@ -229,75 +232,99 @@
     </template><specialization><template-arg>Expr</template-arg><template-arg>Context</template-arg><template-arg>5</template-arg></specialization><typedef name="result_type"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>void</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></method></method-group></struct-specialization><struct name="null_context"><description><para>null_context </para></description><struct name="eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="ThisContext"><default>null_context const</default></template-type-parameter>
- </template><inherit access="public">boost::proto::context::null_eval&lt; Expr, ThisContext &gt;</inherit><description><para>null_context::eval </para></description></struct></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/debug.hpp"><para>Utilities for debugging proto expression trees </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="display_expr"><method-group name="public member functions"><method name="operator()" cv="const"><type>void</type><template>
+ </template><inherit access="public">boost::proto::context::null_eval&lt; Expr, ThisContext &gt;</inherit><description><para>null_context::eval </para></description></struct></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/debug.hpp"><para>Utilities for debugging Proto expression trees </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="display_expr"><purpose>Pretty-print a Proto expression tree. </purpose><description><para>A PolymorphicFunctionObject which accepts a Proto expression tree and pretty-prints it to an <computeroutput>ostream</computeroutput> for debugging purposes. </para></description><typedef name="result_type"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>void</type><template>
           <template-type-parameter name="Args"/>
- </template><parameter name="expr"><paramtype>expr&lt; <classname>tag::terminal</classname>, Args, 0 &gt; const &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>void</type><template>
+ </template><parameter name="expr"><paramtype>proto::expr&lt; <classname>tag::terminal</classname>, Args, 0 &gt; const &amp;</paramtype></parameter><purpose>Pretty-print the current node in a Proto expression tree. </purpose></method><method name="operator()" cv="const"><type>void</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="Args"/>
- </template><parameter name="expr"><paramtype>expr&lt; Tag, Args, 1 &gt; const &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>void</type><template>
+ </template><parameter name="expr"><paramtype>proto::expr&lt; Tag, Args, 1 &gt; const &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>void</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="Args"/>
- </template><parameter name="expr"><paramtype>expr&lt; Tag, Args, 0 &gt; const &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>void</type><template>
+ </template><parameter name="expr"><paramtype>proto::expr&lt; Tag, Args, 0 &gt; const &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>void</type><template>
           <template-type-parameter name="T"/>
- </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></method></method-group><constructor><parameter name="depth"><paramtype>int</paramtype><default>0</default></parameter><parameter name="sout"><paramtype>std::ostream &amp;</paramtype><default>std::cout</default></parameter></constructor></struct></namespace><namespace name="tag"><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::posit</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::negate</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::dereference</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::complement</classname></paramtype></parameter></function><function name="proto_t
ag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::address_of</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::logical_not</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::pre_inc</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::pre_dec</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::post_inc</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::post_dec</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classna
me>tag::shift_left</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::shift_right</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::multiplies</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::divides</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::modulus</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::plus</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::minus</classname></paramtype></parameter></function><function name
="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::less</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::greater</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::less_equal</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::greater_equal</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::equal_to</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::not_equal_to</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramt
ype><classname>tag::logical_or</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::logical_and</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_and</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_or</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_xor</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::comma</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::mem_ptr</classname></paramtype></parameter></
function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::shift_left_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::shift_right_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::multilpies_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::divides_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::modulus_assign</classname></paramtype></parameter></function><function name="proto_tag_na
me"><type>char const *</type><parameter name=""><paramtype><classname>tag::plus_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::minus_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_and_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_or_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_xor_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::subscript</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><paramete
r name=""><paramtype><classname>tag::if_else_</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::function</classname></paramtype></parameter></function><data-member name="proto_tag_name"><type><classname>hidden_detail_::printable_tag</classname>&lt; Tag &gt;::type</type></data-member></namespace><function name="display_expr"><type>void</type><template>
+ </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method></method-group><constructor><parameter name="depth"><paramtype>int</paramtype><default>0</default><description><para>The starting indentation depth for this node. Children nodes will be displayed at a starting depth of <computeroutput>depth+4</computeroutput>. </para></description></parameter><parameter name="sout"><paramtype>std::ostream &amp;</paramtype><default>std::cout</default><description><para>The <computeroutput>ostream</computeroutput> to which the expression tree will be written. </para></description></parameter><description><para>
+</para></description></constructor><method-group name="private member functions"/><copy-assignment><parameter name=""><paramtype><classname>display_expr</classname> const &amp;</paramtype></parameter></copy-assignment></struct></namespace><namespace name="tag"><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::posit</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::negate</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::dereference</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::complement</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::address_of</classname></pa
ramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::logical_not</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::pre_inc</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::pre_dec</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::post_inc</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::post_dec</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::shift_left</classname></paramtype></parameter></function><function name="proto_tag_name"><type>cha
r const *</type><parameter name=""><paramtype><classname>tag::shift_right</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::multiplies</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::divides</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::modulus</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::plus</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::minus</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::less</classname><
/paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::greater</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::less_equal</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::greater_equal</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::equal_to</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::not_equal_to</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::logical_or</classname></paramtype></parameter></function><function name="proto_tag_nam
e"><type>char const *</type><parameter name=""><paramtype><classname>tag::logical_and</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_and</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_or</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_xor</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::comma</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::mem_ptr</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname
>tag::assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::shift_left_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::shift_right_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::multiplies_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::divides_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::modulus_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::plus_assign</classname></paramt
ype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::minus_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_and_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_or_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::bitwise_xor_assign</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::subscript</classname></paramtype></parameter></function><function name="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::if_else_</classname></paramtype></parameter></function><function name
="proto_tag_name"><type>char const *</type><parameter name=""><paramtype><classname>tag::function</classname></paramtype></parameter></function></namespace><overloaded-function name="display_expr"><signature><type>void</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></function><function name="display_expr"><type>void</type><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The Proto expression tree to pretty-print </para></description></parameter><parameter name="sout"><paramtype>std::ostream &amp;</paramtype><description><para>The <computeroutput>ostream</computeroutput> to which the output should be written. </para></description></parameter></signature><signature><type>void</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="sout"><paramtype>std::ostream &amp;</paramtype></parameter></function></namespace></namespace></header><header name="boost/xpressive/proto/deep_copy.hpp"><para>Replace all nodes stored by reference by nodes stored by value. </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="deep_copy"><struct-specialization name="result"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></signature><purpose>Pretty-print a Proto expression tree. </purpose><description><para>
+
+</para></description><notes><para>Equivalent to <computeroutput>functional::display_expr(0, sout)(expr)</computeroutput> </para></notes></overloaded-function></namespace></namespace></header><header name="boost/xpressive/proto/deep_copy.hpp"><para>Replace all nodes stored by reference by nodes stored by value. </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="deep_copy"><purpose>A PolymorphicFunctionObject type for deep-copying Proto expression trees. </purpose><description><para>A PolymorphicFunctionObject type for deep-copying Proto expression trees. When a tree is deep-copied, all internal nodes and most terminals held by reference are instead held by value.</para><para>
+</para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>This(Expr)</template-arg></specialization></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::deep_copy</classname>&lt; Expr &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr)</template-arg></specialization><typedef name="type"><type><classname>result_of::deep_copy</classname>&lt; typename boost::remove_const&lt; typename boost::remove_reference&lt; Expr &gt;::type &gt;::type &gt;::type</type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::deep_copy</classname>&lt; Expr &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="result_of"><struct name="deep_copy"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><purpose>Deep-copies a Proto expression tree, turning all nodes and terminals held by reference into ones held by value. </purpose></method></method-group></struct></namespace><namespace name="result_of"><struct name="deep_copy"><template>
       <template-type-parameter name="Expr"/>
- </template></struct></namespace><data-member name="deep_copy"><type><classname>functional::deep_copy</classname> const</type></data-member></namespace></namespace></header><header name="boost/xpressive/proto/domain.hpp"><para>Contains definition of domain&lt;&gt; class template, for defining domains with a grammar for controlling operator overloading. </para><namespace name="boost"><namespace name="proto"><namespace name="domainns_"><struct name="domain"><template>
+ </template><purpose>A metafunction for calculating the return type of <computeroutput>proto::deep_copy()</computeroutput>. </purpose><description><para>A metafunction for calculating the return type of <computeroutput>proto::deep_copy()</computeroutput>. The type parameter <computeroutput>Expr</computeroutput> should be the type of a Proto expression tree. It should not be a reference type, nor should it be cv-qualified. </para></description><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct></namespace><data-member name="deep_copy"><type><classname>functional::deep_copy</classname> const</type><purpose>A PolymorphicFunctionObject for deep-copying Proto expression trees. </purpose><description><para>A PolymorphicFunctionObject for deep-copying Proto expression trees. When a tree is deep-copied, all internal nodes and most terminals held by reference are instead held by value.</para><para>
+<para>proto::functional::deep_copy. </para>
+</para></description></data-member></namespace></namespace></header><header name="boost/xpressive/proto/domain.hpp"><para>Contains definition of domain&lt;&gt; class template and helpers for defining domains with a generator and a grammar for controlling operator overloading. </para><namespace name="boost"><namespace name="proto"><namespace name="domainns_"><struct name="domain"><template>
       <template-type-parameter name="Generator"/>
       <template-type-parameter name="Grammar"/>
- </template><inherit access="public">Generator</inherit><typedef name="grammar"><type>Grammar</type></typedef></struct><struct name="default_domain"><inherit access="public">boost::proto::domainns_::domain&lt; &gt;</inherit></struct><struct name="deduce_domain"/></namespace><namespace name="result_of"><struct name="is_domain"><template>
+ </template><inherit access="public">Generator</inherit><purpose>For use in defining domain tags to be used with <computeroutput>proto::extends&lt;&gt;</computeroutput>. A Domain associates an expression type with a Generator, and optionally a Grammar. </purpose><description><para>The Generator determines how new expressions in the domain are constructed. Typically, a generator wraps all new expressions in a wrapper that imparts domain-specific behaviors to expressions within its domain. (See <computeroutput>proto::extends&lt;&gt;</computeroutput>.)</para><para>The Grammar determines whether a given expression is valid within the domain, and automatically disables any operator overloads which would cause an invalid expression to be created. By default, the Grammar parameter defaults to the wildcard, <computeroutput>proto::_</computeroutput>, which makes all expressions valid within the domain.</para><para>Example: <programlisting> template&lt;typename Expr&gt;
+ struct MyExpr;
+
+ struct MyGrammar
+ : or_&lt; terminal&lt;_&gt;, plus&lt;MyGrammar, MyGrammar&gt; &gt;
+ {};
+
+ // Define MyDomain, in which all expressions are
+ // wrapped in MyExpr&lt;&gt; and only expressions that
+ // conform to MyGrammar are allowed.
+ struct MyDomain
+ : domain&lt;generator&lt;MyExpr&gt;, MyGrammar&gt;
+ {};
+
+ // Use MyDomain to define MyExpr
+ template&lt;typename Expr&gt;
+ struct MyExpr
+ : extends&lt;Expr, MyExpr&lt;Expr&gt;, MyDomain&gt;
+ {
+ // ...
+ };
+</programlisting> </para></description><typedef name="proto_grammar"><type>Grammar</type></typedef></struct><struct name="default_domain"><inherit access="public">boost::proto::domainns_::domain&lt; &gt;</inherit><purpose>The domain expressions have by default, if <computeroutput>proto::extends&lt;&gt;</computeroutput> has not been used to associate a domain with an expression. </purpose></struct><struct name="deduce_domain"><inherit access="public">boost::proto::domainns_::domain&lt; Generator, Grammar &gt;</inherit><purpose>A pseudo-domain for use in functions and metafunctions that require a domain parameter. It indicates that the domain of the parent node should be inferred from the domains of the children nodes. </purpose><description><para>
+</para></description></struct></namespace><namespace name="result_of"><struct name="is_domain"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="EnableIf"/>
- </template></struct><struct name="domain_of"><template>
+ </template><inherit access="public">boost::mpl::false_</inherit><description><para>A metafunction that returns <computeroutput>mpl::true_</computeroutput> if the type <computeroutput>T</computeroutput> is the type of a Proto domain; <computeroutput>mpl::false_</computeroutput> otherwise. If <computeroutput>T</computeroutput> inherits from <computeroutput>proto::domain&lt;&gt;</computeroutput>, <computeroutput>is_domain&lt;T&gt;</computeroutput> is <computeroutput>mpl::true_</computeroutput>. </para></description></struct><struct name="domain_of"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="EnableIf"/>
- </template><typedef name="type"><type><classname>default_domain</classname></type></typedef></struct><struct-specialization name="is_domain"><template>
- <template-type-parameter name="T"/>
- </template><specialization><template-arg>T</template-arg><template-arg>typename T::proto_is_domain_</template-arg></specialization></struct-specialization><struct-specialization name="domain_of"><template>
- <template-type-parameter name="T"/>
- </template><specialization><template-arg>T</template-arg><template-arg>typename T::proto_is_expr_</template-arg></specialization><typedef name="type"><type>T::proto_domain</type></typedef></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/eval.hpp"><para>Contains the eval() expression evaluator. </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="eval"><struct-specialization name="result"><template>
+ </template><description><para>A metafunction that returns the domain of a given type. If <computeroutput>T</computeroutput> is a Proto expression type, it returns that expression's associated domain. If not, it returns <computeroutput>proto::default_domain</computeroutput>. </para></description><typedef name="type"><type>default_domain</type></typedef></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/eval.hpp"><para>Contains the eval() expression evaluator. </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="eval"><purpose>A PolymorphicFunctionObject type for evaluating a given Proto expression with a given context. </purpose><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><specialization><template-arg>This(Expr</template-arg><template-arg>Context)</template-arg></specialization><inherit access="public">boost::proto::result_of::eval&lt; remove_reference&lt; Expr &gt;::type, remove_reference&lt; Context &gt;::type &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>Context)</template-arg></specialization><typedef name="type"><type><classname>proto::result_of::eval</classname>&lt; typename remove_reference&lt; Expr &gt;::type, typename remove_reference&lt; Context &gt;::type &gt;::type</type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="Context"/>
- </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type><template>
+ </template><parameter name="expr"><paramtype>Expr &amp;</paramtype><description><para>The Proto expression to evaluate </para></description></parameter><parameter name="context"><paramtype>Context &amp;</paramtype><description><para>The context in which the expression should be evaluated. </para></description></parameter><purpose>Evaluate a given Proto expression with a given context. </purpose><description><para>
+
+</para></description><returns><para><computeroutput>typename Context::template eval&lt;Expr&gt;()(expr, context)</computeroutput> </para></returns></method><method name="operator()" cv="const"><type><classname>proto::result_of::eval</classname>&lt; Expr, Context &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="Context"/>
- </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context const &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="result_of"><struct name="eval"><template>
+ </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="context"><paramtype>Context const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method></method-group></struct></namespace><namespace name="result_of"><struct name="eval"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Context"/>
- </template><typedef name="type"><type>Context::template <classname>eval</classname>&lt; Expr &gt;::result_type</type></typedef></struct></namespace><data-member name="eval"><type><classname>functional::eval</classname> const</type></data-member></namespace></namespace></header><header name="boost/xpressive/proto/expr.hpp"><para>Contains definition of expr&lt;&gt; class template. </para><namespace name="boost"><namespace name="proto"><namespace name="exprns_"><struct-specialization name="expr"><template>
+ </template><purpose>A metafunction for calculating the return type of <computeroutput>proto::eval()</computeroutput> given a certain <computeroutput>Expr</computeroutput> and <computeroutput>Context</computeroutput> types. </purpose><description><para>
+</para></description><typedef name="type"><type>Context::template <classname>eval</classname>&lt; Expr &gt;::result_type</type></typedef></struct></namespace><data-member name="eval"><type><classname>functional::eval</classname> const</type><purpose>A PolymorphicFunctionObject for evaluating a given Proto expression with a given context. </purpose><description><para><para>proto::functional::eval. </para>
+</para></description></data-member></namespace></namespace></header><header name="boost/xpressive/proto/expr.hpp"><para>Contains definition of expr&lt;&gt; class template. </para><namespace name="boost"><namespace name="proto"><namespace name="exprns_"><struct-specialization name="expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Args"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>0</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args1&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type. </para></description><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>0</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args0&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type.</para><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a valid Fusion random-access sequence, where the elements of the sequence are the children expressions. </para></description><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 0 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type><classname>default_domain</classname></type></typedef><typedef name="fusion_tag"><type>tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>void</type></typedef><typedef name="proto_arg2"><type>void</type></typedef><typedef name="proto_arg3"><type>void</
type></typedef><typedef name="proto_arg4"><type>void</type></typedef><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
-</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
+ </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 0 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type>default_domain</type></typedef><typedef name="fusion_tag"><type>proto::tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>void</type></typedef><typedef name="proto_arg2"><type>void</type></typedef><typedef name="proto_arg3"><type>void</type></typedef><
typedef name="proto_arg4"><type>void</type></typedef><data-member name="arg0"><type>proto_arg0</type></data-member><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
+</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype><description><para>The rhs. </para></description></parameter><description><para>Subscript</para><para>
 
-</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
+</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv=""><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv=""><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv=""><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
+ </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv=""><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
-</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing the function invocation of <computeroutput/>(*this)(). </para></returns></method><method name="operator()" cv=""><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; expr &gt; &gt; &gt; const</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop1</classname>&lt; expr const , const A0 &gt;::type const</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
+</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing the function invocation of <computeroutput/>(*this)(). </para></returns></method><method name="operator()" cv=""><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; expr &gt; &gt; &gt; const</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop1</classname>&lt; expr const , const A0 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop2</classname>&lt; expr const , const A0, const A1 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
@@ -321,11 +348,7 @@
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><data-member name="arg0"><type>proto_arg0</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static expr</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static expr</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> object initialized with the specified arguments. </para></returns></method><method name="make" cv=""><type>static expr</type><template>
@@ -339,22 +362,18 @@
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name=""><paramtype><emphasis>unspecified</emphasis></paramtype><default>0</default></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method></method-group></struct-specialization><struct-specialization name="expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Args"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>1</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args1&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type. </para></description><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>1</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args0&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type.</para><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a valid Fusion random-access sequence, where the elements of the sequence are the children expressions. </para></description><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 1 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type><classname>default_domain</classname></type></typedef><typedef name="fusion_tag"><type>tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>void</type></typedef><typedef name="proto_arg2"><type>void</type></typedef><typedef name="proto_arg3"><type>void</
type></typedef><typedef name="proto_arg4"><type>void</type></typedef><typedef name="address_of_hack_type_"><description><para>If <computeroutput>Tag</computeroutput> is <computeroutput>boost::proto::tag::address_of</computeroutput> and <computeroutput>proto_arg0</computeroutput> is <computeroutput>proto::ref_&lt;T&gt;</computeroutput>, then <computeroutput>address_of_hack_type_</computeroutput> is <computeroutput>T*</computeroutput>. Otherwise, it is some undefined type. </para></description><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
+ </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 1 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type>default_domain</type></typedef><typedef name="fusion_tag"><type>proto::tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>void</type></typedef><typedef name="proto_arg2"><type>void</type></typedef><typedef name="proto_arg3"><type>void</type></typedef><
typedef name="proto_arg4"><type>void</type></typedef><typedef name="address_of_hack_type_"><description><para>If <computeroutput>Tag</computeroutput> is <computeroutput>boost::proto::tag::address_of</computeroutput> and <computeroutput>proto_arg0</computeroutput> is <computeroutput>proto::ref_&lt;T&gt;</computeroutput>, then <computeroutput>address_of_hack_type_</computeroutput> is <computeroutput>T*</computeroutput>. Otherwise, it is some undefined type. </para></description><type><emphasis>unspecified</emphasis></type></typedef><data-member name="arg0"><type>proto_arg0</type></data-member><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
 </para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="conversion-operator" cv="const"><type>address_of_hack_type_</type><description><para>
 
-</para></description><returns><para>The address of <computeroutput>this-&gt;arg0</computeroutput> if <computeroutput>Tag</computeroutput> is <computeroutput>boost::proto::tag::address_of</computeroutput>. Otherwise, this function will fail to compile.</para></returns><notes><para>Proto overloads <computeroutput>operator&amp;</computeroutput>, which means that proto-ified objects cannot have their addresses taken, unless we use the following hack to make <computeroutput>&amp;x</computeroutput> implicitly convertible to <computeroutput>X*</computeroutput>. </para></notes></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
+</para></description><returns><para>The address of <computeroutput>this-&gt;arg0</computeroutput> if <computeroutput>Tag</computeroutput> is <computeroutput>boost::proto::tag::address_of</computeroutput>. Otherwise, this function will fail to compile.</para></returns><notes><para>Proto overloads <computeroutput>operator&amp;</computeroutput>, which means that proto-ified objects cannot have their addresses taken, unless we use the following hack to make <computeroutput>&amp;x</computeroutput> implicitly convertible to <computeroutput>X*</computeroutput>. </para></notes></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype><description><para>The rhs. </para></description></parameter><description><para>Subscript</para><para>
 
-</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
+</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing the function invocation of <computeroutput/>(*this)(). </para></returns></method><method name="operator()" cv="const"><type><classname>result_of::funop1</classname>&lt; expr const , const A0 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop2</classname>&lt; expr const , const A0, const A1 &gt;::type const</type><template>
@@ -375,30 +394,22 @@
 
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing an assignment of <computeroutput>a</computeroutput> to <computeroutput>*this</computeroutput>. </para></returns></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><data-member name="arg0"><type>proto_arg0</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static expr</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static expr</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> object initialized with the specified arguments. </para></returns></method></method-group></struct-specialization><struct-specialization name="expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Args"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>2</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args1&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type. </para></description><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>2</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args0&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type.</para><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a valid Fusion random-access sequence, where the elements of the sequence are the children expressions. </para></description><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 2 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type><classname>default_domain</classname></type></typedef><typedef name="fusion_tag"><type>tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>void</type></typedef><typedef name="proto_arg3"><type>
void</type></typedef><typedef name="proto_arg4"><type>void</type></typedef><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
-</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
+ </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 2 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type>default_domain</type></typedef><typedef name="fusion_tag"><type>proto::tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>void</type></typedef><typedef name="proto_arg3"><type>void</type></typ
edef><typedef name="proto_arg4"><type>void</type></typedef><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
+</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype><description><para>The rhs. </para></description></parameter><description><para>Subscript</para><para>
 
-</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
+</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing the function invocation of <computeroutput/>(*this)(). </para></returns></method><method name="operator()" cv="const"><type><classname>result_of::funop1</classname>&lt; expr const , const A0 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop2</classname>&lt; expr const , const A0, const A1 &gt;::type const</type><template>
@@ -419,31 +430,23 @@
 
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing an assignment of <computeroutput>a</computeroutput> to <computeroutput>*this</computeroutput>. </para></returns></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static expr</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static expr</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><description><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> object initialized with the specified arguments. </para></returns></method></method-group></struct-specialization><struct-specialization name="expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Args"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>3</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args1&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type. </para></description><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>3</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args0&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type.</para><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a valid Fusion random-access sequence, where the elements of the sequence are the children expressions. </para></description><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 3 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type><classname>default_domain</classname></type></typedef><typedef name="fusion_tag"><type>tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>Args::arg2</type></typedef><typedef name="proto_arg3">
<type>void</type></typedef><typedef name="proto_arg4"><type>void</type></typedef><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
-</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
+ </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 3 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type>default_domain</type></typedef><typedef name="fusion_tag"><type>proto::tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>Args::arg2</type></typedef><typedef name="proto_arg3"><type>void</type
></typedef><typedef name="proto_arg4"><type>void</type></typedef><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><data-member name="arg2"><type>proto_arg2</type></data-member><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
+</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype><description><para>The rhs. </para></description></parameter><description><para>Subscript</para><para>
 
-</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
+</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing the function invocation of <computeroutput/>(*this)(). </para></returns></method><method name="operator()" cv="const"><type><classname>result_of::funop1</classname>&lt; expr const , const A0 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop2</classname>&lt; expr const , const A0, const A1 &gt;::type const</type><template>
@@ -464,11 +467,7 @@
 
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing an assignment of <computeroutput>a</computeroutput> to <computeroutput>*this</computeroutput>. </para></returns></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><data-member name="arg2"><type>proto_arg2</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static expr</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static expr</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
           <template-type-parameter name="A2"/>
@@ -476,20 +475,16 @@
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> object initialized with the specified arguments. </para></returns></method></method-group></struct-specialization><struct-specialization name="expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Args"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>4</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args1&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type. </para></description><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>4</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args0&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type.</para><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a valid Fusion random-access sequence, where the elements of the sequence are the children expressions. </para></description><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 4 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type><classname>default_domain</classname></type></typedef><typedef name="fusion_tag"><type>tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>Args::arg2</type></typedef><typedef name="proto_arg3">
<type>Args::arg3</type></typedef><typedef name="proto_arg4"><type>void</type></typedef><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
-</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
+ </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 4 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type>default_domain</type></typedef><typedef name="fusion_tag"><type>proto::tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>Args::arg2</type></typedef><typedef name="proto_arg3"><type>Args::arg3
</type></typedef><typedef name="proto_arg4"><type>void</type></typedef><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><data-member name="arg2"><type>proto_arg2</type></data-member><data-member name="arg3"><type>proto_arg3</type></data-member><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
+</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype><description><para>The rhs. </para></description></parameter><description><para>Subscript</para><para>
 
-</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
+</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing the function invocation of <computeroutput/>(*this)(). </para></returns></method><method name="operator()" cv="const"><type><classname>result_of::funop1</classname>&lt; expr const , const A0 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop2</classname>&lt; expr const , const A0, const A1 &gt;::type const</type><template>
@@ -510,11 +505,7 @@
 
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing an assignment of <computeroutput>a</computeroutput> to <computeroutput>*this</computeroutput>. </para></returns></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><data-member name="arg2"><type>proto_arg2</type></data-member><data-member name="arg3"><type>proto_arg3</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static expr</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static expr</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
           <template-type-parameter name="A2"/>
@@ -523,20 +514,16 @@
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> object initialized with the specified arguments. </para></returns></method></method-group></struct-specialization><struct-specialization name="expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Args"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>5</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args1&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type. </para></description><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Args</template-arg><template-arg>5</template-arg></specialization><purpose>Representation of a node in an expression tree. </purpose><description><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a node in an expression template tree. It is a container for its children sub-trees. It also serves as the terminal nodes of the tree.</para><para><computeroutput>Tag</computeroutput> is type that represents the operation encoded by this expression. It is typically one of the structs in the <computeroutput>boost::proto::tag</computeroutput> namespace, but it doesn't have to be. If the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput> then this <computeroutput>expr&lt;&gt;</computeroutput> type represents a leaf in the expression tree.</para><para><computeroutput>Args</computeroutput> is a type list representing the type of the children of this expression. It is an instanti
ation of one of <computeroutput>proto::args1&lt;&gt;</computeroutput>, <computeroutput>proto::args2&lt;&gt;</computeroutput>, etc. The children types must all themselves be either <computeroutput>expr&lt;&gt;</computeroutput> or <computeroutput>proto::ref_&lt;proto::expr&lt;&gt;&gt;</computeroutput>, unless the <computeroutput>Tag</computeroutput> type is <computeroutput>boost::proto::tag::terminal</computeroutput>, in which case <computeroutput>Args</computeroutput> must be <computeroutput>proto::args0&lt;T&gt;</computeroutput>, where <computeroutput>T</computeroutput> can be any type.</para><para><computeroutput>proto::expr&lt;&gt;</computeroutput> is a valid Fusion random-access sequence, where the elements of the sequence are the children expressions. </para></description><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 5 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type><classname>default_domain</classname></type></typedef><typedef name="fusion_tag"><type>tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>Args::arg2</type></typedef><typedef name="proto_arg3">
<type>Args::arg3</type></typedef><typedef name="proto_arg4"><type>Args::arg4</type></typedef><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
-</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
+ </template><description><para>Encodes the return type of <computeroutput>expr&lt;&gt;operator()</computeroutput>, for use with <computeroutput>boost::result_of&lt;&gt;</computeroutput> </para></description><typedef name="type"><type>result_of::funop&lt; Sig, expr &gt;::type</type></typedef></struct><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arity"><type>mpl::long_&lt; 5 &gt;</type></typedef><typedef name="proto_base_expr"><type>expr</type></typedef><typedef name="proto_args"><type>Args</type></typedef><typedef name="proto_domain"><type>default_domain</type></typedef><typedef name="fusion_tag"><type>proto::tag::proto_expr</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>expr</type></typedef><typedef name="proto_arg0"><type>Args::arg0</type></typedef><typedef name="proto_arg1"><type>Args::arg1</type></typedef><typedef name="proto_arg2"><type>Args::arg2</type></typedef><typedef name="proto_arg3"><type>Args::arg3
</type></typedef><typedef name="proto_arg4"><type>Args::arg4</type></typedef><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><data-member name="arg2"><type>proto_arg2</type></data-member><data-member name="arg3"><type>proto_arg3</type></data-member><data-member name="arg4"><type>proto_arg4</type></data-member><method-group name="public member functions"><method name="proto_base" cv="const"><type>expr const &amp;</type><description><para>
+</para></description><returns><para>*this </para></returns></method><method name="proto_base" cv=""><type>expr &amp;</type><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype><description><para>The rhs. </para></description></parameter><description><para>Subscript</para><para>
 
-</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>expr&lt; <classname>tag::subscript</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
+</para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing <computeroutput>*this</computeroutput> subscripted with <computeroutput>a</computeroutput>. </para></returns></method><method name="operator[]" cv="const"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; ref_&lt; expr const &gt;, typename <classname>result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; const</type><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; expr const &gt; &gt; &gt; const</type><description><para>Function call</para><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing the function invocation of <computeroutput/>(*this)(). </para></returns></method><method name="operator()" cv="const"><type><classname>result_of::funop1</classname>&lt; expr const , const A0 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::funop2</classname>&lt; expr const , const A0, const A1 &gt;::type const</type><template>
@@ -557,11 +544,7 @@
 
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> node representing an assignment of <computeroutput>a</computeroutput> to <computeroutput>*this</computeroutput>. </para></returns></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><data-member name="arg0"><type>proto_arg0</type></data-member><data-member name="arg1"><type>proto_arg1</type></data-member><data-member name="arg2"><type>proto_arg2</type></data-member><data-member name="arg3"><type>proto_arg3</type></data-member><data-member name="arg4"><type>proto_arg4</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static expr</type><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static expr</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
           <template-type-parameter name="A2"/>
@@ -570,100 +553,95 @@
         </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype></parameter><parameter name="a3"><paramtype>A3 const &amp;</paramtype></parameter><parameter name="a4"><paramtype>A4 const &amp;</paramtype></parameter><description><para>
 </para></description><returns><para>A new <computeroutput>expr&lt;&gt;</computeroutput> object initialized with the specified arguments. </para></returns></method></method-group></struct-specialization></namespace><namespace name="result_of"><struct name="funop0"><template>
       <template-type-parameter name="Expr"/>
- </template><typedef name="type"><type>expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; <classname>ref_</classname>&lt; Expr &gt;&gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
+ </template><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose><typedef name="type"><type>proto::expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; ref_&lt; Expr &gt;&gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr()</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop0&lt; This &gt;</inherit></struct-specialization><struct-specialization name="funop"><template>
+ </template><specialization><template-arg>Expr()</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop0&lt; This &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr const ()</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop0&lt; This const &gt;</inherit></struct-specialization><struct name="funop1"><template>
+ </template><specialization><template-arg>Expr const ()</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop0&lt; Expr &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct name="funop1"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
- </template><typedef name="type"><type>expr&lt; <classname>tag::function</classname>, <classname>args2</classname>&lt; <classname>ref_</classname>&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
+ </template><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose><typedef name="type"><type>proto::expr&lt; <classname>tag::function</classname>, <classname>args2</classname>&lt; ref_&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr(A0)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop1&lt; This, remove_reference&lt; A0 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="funop"><template>
+ </template><specialization><template-arg>Expr(A0)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop1&lt; This, remove_reference&lt; A0 &gt;::type &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr const (A0)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop1&lt; This const , remove_reference&lt; A0 &gt;::type &gt;</inherit></struct-specialization><struct name="funop2"><template>
+ </template><specialization><template-arg>Expr const (A0)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop1&lt; Expr, A0 &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct name="funop2"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
- </template><typedef name="type"><type>expr&lt; <classname>tag::function</classname>, <classname>args3</classname>&lt; <classname>ref_</classname>&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A1 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
+ </template><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose><typedef name="type"><type>proto::expr&lt; <classname>tag::function</classname>, <classname>args3</classname>&lt; ref_&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A1 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr(A0</template-arg><template-arg>A1)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop2&lt; This, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="funop"><template>
+ </template><specialization><template-arg>Expr(A0</template-arg><template-arg>A1)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop2&lt; This, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr const (A0</template-arg><template-arg>A1)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop2&lt; This const , remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type &gt;</inherit></struct-specialization><struct name="funop3"><template>
+ </template><specialization><template-arg>Expr const (A0</template-arg><template-arg>A1)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop2&lt; Expr, A0, A1 &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct name="funop3"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
- </template><typedef name="type"><type>expr&lt; <classname>tag::function</classname>, <classname>args4</classname>&lt; <classname>ref_</classname>&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A1 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A2 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
+ </template><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose><typedef name="type"><type>proto::expr&lt; <classname>tag::function</classname>, <classname>args4</classname>&lt; ref_&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A1 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A2 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr(A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop3&lt; This, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="funop"><template>
+ </template><specialization><template-arg>Expr(A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop3&lt; This, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr const (A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop3&lt; This const , remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type &gt;</inherit></struct-specialization><struct name="funop4"><template>
+ </template><specialization><template-arg>Expr const (A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop3&lt; Expr, A0, A1, A2 &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct name="funop4"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
- </template><typedef name="type"><type>expr&lt; <classname>tag::function</classname>, <classname>args5</classname>&lt; <classname>ref_</classname>&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A1 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A2 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A3 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 &amp;</paramtype></parameter><parameter name="a3"><paramtype>A3 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="funop"><template>
+ </template><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose><typedef name="type"><type>proto::expr&lt; <classname>tag::function</classname>, <classname>args5</classname>&lt; ref_&lt; Expr &gt;, typename <classname>result_of::as_arg</classname>&lt; A0 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A1 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A2 &gt;::type, typename <classname>result_of::as_arg</classname>&lt; A3 &gt;::type &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type const</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 &amp;</paramtype></parameter><parameter name="a3"><paramtype>A3 &amp;</paramtype></parameter></method><
/method-group></struct><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop4&lt; This, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type, remove_reference&lt; A3 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="funop"><template>
+ </template><specialization><template-arg>Expr(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop4&lt; This, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type, remove_reference&lt; A3 &gt;::type &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization><struct-specialization name="funop"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
       <template-type-parameter name="This"/>
- </template><specialization><template-arg>Expr const (A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop4&lt; This const , remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type, remove_reference&lt; A3 &gt;::type &gt;</inherit></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/extends.hpp"><para>Macros and a base class for defining end-user expression types </para><namespace name="boost"><namespace name="proto"><namespace name="exprns_"><struct name="is_proto_expr"><purpose>Empty type to be used as a dummy template parameter of POD expression wrappers. It allows argument-dependent lookup to find Proto's operator overloads. </purpose><description><para><computeroutput>proto::is_proto_expr</computeroutput> allows argument-dependent lookup
 to find Proto's operator overloads. For example:</para><para><programlisting>
-
-
-
-
-
-
-
-
-
-
-
-
-///
+ </template><specialization><template-arg>Expr const (A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg><template-arg>This</template-arg></specialization><inherit access="public">boost::proto::result_of::funop4&lt; Expr, A0, A1, A2, A3 &gt;</inherit><purpose>A helper metafunction for computing the return type of <computeroutput>proto::expr&lt;&gt;operator()</computeroutput>. </purpose></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/extends.hpp"><para>Macros and a base class for defining end-user expression types </para><namespace name="boost"><namespace name="proto"><namespace name="exprns_"><struct name="is_proto_expr"><purpose>Empty type to be used as a dummy template parameter of POD expression wrappers. It allows argument-dependent lookup to find Proto's operator overloads. </purpose><description><para><computeroutput>proto::is_proto_expr</computeroutput> allows argument-dependent loo
kup to find Proto's operator overloads. For example:</para><para><programlisting> template&lt;typename T, typename Dummy = proto::is_proto_expr&gt;
+ struct my_terminal
+ {
+ BOOST_PROTO_EXTENDS(
+ typename proto::terminal&lt;T&gt;::type
+ , my_terminal&lt;T&gt;
+ , default_domain
+ )
+ };
+
+ // ...
+ my_terminal&lt;int&gt; _1, _2;
+ _1 + _2; // OK, uses proto::operator+
 </programlisting></para><para>Without the second <computeroutput>Dummy</computeroutput> template parameter, Proto's operator overloads would not be considered by name lookup. </para></description></struct><struct name="extends"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Derived"/>
       <template-type-parameter name="Domain"/>
       <template-type-parameter name="Tag"/>
- </template><purpose>extends&lt;&gt; class template for adding behaviors to a proto expression template </purpose><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><purpose>extends&lt;&gt; class template for adding behaviors to a Proto expression template </purpose><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><typedef name="type"><type>boost::mpl::apply_wrap1&lt; Domain, typename boost::proto::result_of::funop&lt; Sig, Derived &gt;::type &gt;::type</type></typedef></struct><typedef name="proto_base_expr"><type>Expr</type></typedef><typedef name="proto_domain"><type>Domain</type></typedef><typedef name="proto_derived_expr"><type>Derived</type></typedef><typedef name="proto_tag"><type>Expr::proto_tag</type></typedef><typedef name="proto_args"><type>Expr::proto_args</type></typedef><typedef name="proto_arity"><type>Expr::proto_arity</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="fusion_tag"><type>boost::proto::tag::proto_expr</type></typedef><typedef name="proto_arg0"><type>Expr::proto_arg0</type></typedef><typedef name="proto_arg1"><type>Expr::proto_arg1</type></typedef><typedef name="proto_arg2"><type>Expr::proto_arg2</type></typedef><typedef name="proto_arg3"><type>Expr::proto_arg3</type></typedef><typedef name="proto_arg4"><type>Expr::proto_arg4</type></t
ypedef><method-group name="public member functions"><method name="proto_base" cv=""><type>Expr &amp;</type></method><method name="proto_base" cv="const"><type>Expr const &amp;</type></method><method name="operator[]" cv="const"><type>boost::mpl::apply_wrap1&lt; Domain, boost::proto::expr&lt; <classname>boost::proto::tag::subscript</classname>, <classname>boost::proto::args2</classname>&lt; boost::proto::ref_&lt; Derived const &gt;, typename <classname>boost::proto::result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; &gt;::type const</type><template>
+ </template><typedef name="type"><type>boost::mpl::apply_wrap1&lt; Domain, typename boost::proto::result_of::funop&lt; Sig, Derived &gt;::type &gt;::type</type></typedef></struct><data-member name="expr"><type>Expr</type></data-member><typedef name="proto_base_expr"><type>Expr</type></typedef><typedef name="proto_domain"><type>Domain</type></typedef><typedef name="proto_derived_expr"><type>Derived</type></typedef><typedef name="proto_tag"><type>Expr::proto_tag</type></typedef><typedef name="proto_args"><type>Expr::proto_args</type></typedef><typedef name="proto_arity"><type>Expr::proto_arity</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="fusion_tag"><type>boost::proto::tag::proto_expr</type></typedef><typedef name="proto_arg0"><type>Expr::proto_arg0</type></typedef><typedef name="proto_arg1"><type>Expr::proto_arg1</type></typedef><typedef name="proto_arg2"><type>Expr::proto_arg2</type></typedef><typedef name="proto_arg3"><type>Expr::proto_arg3</type></typedef><ty
pedef name="proto_arg4"><type>Expr::proto_arg4</type></typedef><method-group name="public member functions"><method name="proto_base" cv=""><type>Expr &amp;</type></method><method name="proto_base" cv="const"><type>Expr const &amp;</type></method><method name="operator[]" cv="const"><type>boost::mpl::apply_wrap1&lt; Domain, boost::proto::expr&lt; <classname>boost::proto::tag::subscript</classname>, <classname>boost::proto::args2</classname>&lt; boost::proto::ref_&lt; Derived const &gt;, typename <classname>boost::proto::result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; &gt;::type const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter></method><method name="operator[]" cv="const"><type>boost::mpl::apply_wrap1&lt; Domain, boost::proto::expr&lt; <classname>boost::proto::tag::subscript</classname>, <classname>boost::proto::args2</classname>&lt; boost::proto::ref_&lt; Derived const &gt;, typename <classname>boost::proto::result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; &gt;::type const</type><template>
           <template-type-parameter name="A"/>
@@ -685,21 +663,13 @@
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter></copy-assignment><data-member name="expr"><type>Expr</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static Derived const</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="extends"><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static Derived const</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="extends"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Derived"/>
       <template-type-parameter name="Domain"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>Derived</template-arg><template-arg>Domain</template-arg><template-arg>tag::terminal</template-arg></specialization><purpose>extends&lt;&gt; class template for adding behaviors to a proto expression template </purpose><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><struct name="result"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>Derived</template-arg><template-arg>Domain</template-arg><template-arg>tag::terminal</template-arg></specialization><purpose>extends&lt;&gt; class template for adding behaviors to a Proto expression template </purpose><struct name="result"><template>
       <template-type-parameter name="Sig"/>
- </template><typedef name="type"><type>boost::mpl::apply_wrap1&lt; Domain, typename boost::proto::result_of::funop&lt; Sig, Derived &gt;::type &gt;::type</type></typedef></struct><typedef name="proto_base_expr"><type>Expr</type></typedef><typedef name="proto_domain"><type>Domain</type></typedef><typedef name="proto_derived_expr"><type>Derived</type></typedef><typedef name="proto_tag"><type>Expr::proto_tag</type></typedef><typedef name="proto_args"><type>Expr::proto_args</type></typedef><typedef name="proto_arity"><type>Expr::proto_arity</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="fusion_tag"><type>boost::proto::tag::proto_expr</type></typedef><typedef name="proto_arg0"><type>Expr::proto_arg0</type></typedef><typedef name="proto_arg1"><type>Expr::proto_arg1</type></typedef><typedef name="proto_arg2"><type>Expr::proto_arg2</type></typedef><typedef name="proto_arg3"><type>Expr::proto_arg3</type></typedef><typedef name="proto_arg4"><type>Expr::proto_arg4</type></t
ypedef><method-group name="public member functions"><method name="extends" cv=""><type/></method><method name="extends" cv=""><type/><parameter name="that"><paramtype><classname>extends</classname> const &amp;</paramtype></parameter></method><method name="extends" cv=""><type/><parameter name="expr_"><paramtype>Expr const &amp;</paramtype></parameter></method><method name="proto_base" cv=""><type>Expr &amp;</type></method><method name="proto_base" cv="const"><type>Expr const &amp;</type></method><method name="operator[]" cv="const"><type>boost::mpl::apply_wrap1&lt; Domain, boost::proto::expr&lt; <classname>boost::proto::tag::subscript</classname>, <classname>boost::proto::args2</classname>&lt; boost::proto::ref_&lt; Derived const &gt;, typename <classname>boost::proto::result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; &gt;::type const</type><template>
+ </template><typedef name="type"><type>boost::mpl::apply_wrap1&lt; Domain, typename boost::proto::result_of::funop&lt; Sig, Derived &gt;::type &gt;::type</type></typedef></struct><data-member name="expr"><type>Expr</type></data-member><typedef name="proto_base_expr"><type>Expr</type></typedef><typedef name="proto_domain"><type>Domain</type></typedef><typedef name="proto_derived_expr"><type>Derived</type></typedef><typedef name="proto_tag"><type>Expr::proto_tag</type></typedef><typedef name="proto_args"><type>Expr::proto_args</type></typedef><typedef name="proto_arity"><type>Expr::proto_arity</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="fusion_tag"><type>boost::proto::tag::proto_expr</type></typedef><typedef name="proto_arg0"><type>Expr::proto_arg0</type></typedef><typedef name="proto_arg1"><type>Expr::proto_arg1</type></typedef><typedef name="proto_arg2"><type>Expr::proto_arg2</type></typedef><typedef name="proto_arg3"><type>Expr::proto_arg3</type></typedef><ty
pedef name="proto_arg4"><type>Expr::proto_arg4</type></typedef><method-group name="public member functions"><method name="extends" cv=""><type/></method><method name="extends" cv=""><type/><parameter name="that"><paramtype><classname>extends</classname> const &amp;</paramtype></parameter></method><method name="extends" cv=""><type/><parameter name="expr_"><paramtype>Expr const &amp;</paramtype></parameter></method><method name="proto_base" cv=""><type>Expr &amp;</type></method><method name="proto_base" cv="const"><type>Expr const &amp;</type></method><method name="operator[]" cv="const"><type>boost::mpl::apply_wrap1&lt; Domain, boost::proto::expr&lt; <classname>boost::proto::tag::subscript</classname>, <classname>boost::proto::args2</classname>&lt; boost::proto::ref_&lt; Derived const &gt;, typename <classname>boost::proto::result_of::as_arg</classname>&lt; A &gt;::type &gt; &gt; &gt;::type const</type><template>
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter></method><method name="operator[]" cv="const"><type>boost::mpl::apply_wrap1&lt; Domain, boost::proto::expr&lt; <classname>boost::proto::tag::subscript</classname>, <classname>boost::proto::args2</classname>&lt; boost::proto::ref_&lt; Derived const &gt;, typename <classname>boost::proto::result_of::as_arg</classname>&lt; A const &gt;::type &gt; &gt; &gt;::type const</type><template>
           <template-type-parameter name="A"/>
@@ -743,174 +713,118 @@
           <template-type-parameter name="A"/>
         </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter></copy-assignment><copy-assignment><template>
           <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter></copy-assignment><data-member name="expr"><type>Expr</type></data-member><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method><method name="make" cv=""><type>static Derived const</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/fusion.hpp"><para>Make any Proto parse tree a valid Fusion sequence </para><namespace name="boost"><namespace name="fusion"><namespace name="extension"><struct name="as_element"><template>
- <template-type-parameter name="Tag"/>
- </template><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter></copy-assignment><method-group name="public static functions"><method name="make" cv=""><type>static Derived const</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/fusion.hpp"><para>Make any Proto expression a valid Fusion sequence </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="flatten"><purpose>A PolymorphicFunctionObject type that returns a "flattened" view of a Proto expression tree. </purpose><description><para>A PolymorphicFunctionObject type that returns a "flattened" view of a Proto expression tree. For a tree with a top-most node tag of type <computeroutput>T</computeroutput>, the elements of the flattened sequence are determined by recursing into each child node with the same tag type and returning those
nodes of different type. So for instance, the Proto expression tree corresponding to the expression <computeroutput>a | b | c</computeroutput> has a flattened view with elements [a, b, c], even though the tree is grouped as <computeroutput>((a | b) | c)</computeroutput>. </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>This(Expr)</template-arg></specialization></struct-specialization></struct><struct-specialization name="is_view_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- </template></struct></struct-specialization><struct-specialization name="is_view_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_expr</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- </template></struct></struct-specialization><struct-specialization name="value_of_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref_iterator</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- </template><inherit access="public">boost::proto::result_of::arg&lt; Iterator::expr_type, Iterator::index &gt;</inherit></struct></struct-specialization><struct-specialization name="deref_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref_iterator</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- </template><typedef name="type"><type><classname>proto::result_of::arg</classname>&lt; typename Iterator::expr_type, typename Iterator::index &gt;::type const &amp;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type</type><parameter name="iter"><paramtype>Iterator const &amp;</paramtype></parameter></method></method-group></struct></struct-specialization><struct-specialization name="advance_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref_iterator</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- <template-type-parameter name="N"/>
- </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static <classname>type</classname></type><parameter name="iter"><paramtype>Iterator const &amp;</paramtype></parameter></method></method-group></struct></struct-specialization><struct-specialization name="distance_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref_iterator</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="IteratorFrom"/>
- <template-type-parameter name="IteratorTo"/>
- </template></struct></struct-specialization><struct-specialization name="next_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref_iterator</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- </template></struct></struct-specialization><struct-specialization name="prior_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref_iterator</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- </template></struct></struct-specialization><struct-specialization name="category_of_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template><typedef name="type"><type>random_access_traversal_tag</type></typedef></struct></struct-specialization><struct-specialization name="size_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template></struct></struct-specialization><struct-specialization name="begin_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static <classname>type</classname></type><parameter name="seq"><paramtype>Sequence &amp;</paramtype></parameter></method></method-group></struct></struct-specialization><struct-specialization name="end_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static <classname>type</classname></type><parameter name="seq"><paramtype>Sequence &amp;</paramtype></parameter></method></method-group></struct></struct-specialization><struct-specialization name="value_at_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- <template-type-parameter name="N"/>
- </template><typedef name="type"><type><classname>proto::result_of::arg</classname>&lt; Sequence, N &gt;::type</type></typedef></struct></struct-specialization><struct-specialization name="at_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_ref</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- <template-type-parameter name="N"/>
- </template><typedef name="type"><type><classname>proto::result_of::arg</classname>&lt; Sequence, N &gt;::type const &amp;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type</type><parameter name="seq"><paramtype>Sequence &amp;</paramtype></parameter></method></method-group></struct></struct-specialization><struct-specialization name="is_segmented_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_expr</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Iterator"/>
- </template></struct></struct-specialization><struct-specialization name="segments_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_expr</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template><typedef name="proto_tag"><type>Sequence::proto_tag</type></typedef><typedef name="type"><type>fusion::transform_view&lt; proto::ref_&lt; Sequence &gt;, <classname>as_element</classname>&lt; proto_tag &gt;&gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type</type><parameter name="sequence"><paramtype>Sequence &amp;</paramtype></parameter></method></method-group></struct></struct-specialization><struct-specialization name="category_of_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_expr</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template><typedef name="type"><type>forward_traversal_tag</type></typedef></struct></struct-specialization><struct-specialization name="begin_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_expr</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template></struct></struct-specialization><struct-specialization name="end_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_expr</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template></struct></struct-specialization><struct-specialization name="size_impl"><template>
- </template><specialization><template-arg>proto::tag::proto_expr</template-arg></specialization><struct name="apply"><template>
- <template-type-parameter name="Sequence"/>
- </template></struct></struct-specialization></namespace></namespace><namespace name="proto"><struct name="children"><template>
+ </template><specialization><template-arg>This(Expr)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type><emphasis>unspecified</emphasis></type><template>
+ <template-type-parameter name="Expr"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="pop_front"><purpose>A PolymorphicFunctionObject type that invokes the <computeroutput>fusion::pop_front()</computeroutput> algorithm on its argument. </purpose><description><para>A PolymorphicFunctionObject type that invokes the <computeroutput>fusion::pop_front()</computeroutput> algorithm on its argument. This is useful for defining a CallableTransform like <computeroutput>pop_front(_)</computeroutput> which removes the first child from a Proto expression node. Such a transform might be used as the first argument to the <computeroutput>proto::transform::fold&lt;&gt;</computeroutput> transform; that is, fold all but the first child. </para></description><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
- </template><method-group name="public member functions"/><constructor><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></constructor></struct><struct name="eval_fun"><template>
- <template-type-parameter name="Context"/>
- </template><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><specialization><template-arg>This(Expr)</template-arg></specialization><typedef name="type"><type>fusion::result_of::pop_front&lt; typename boost::remove_reference&lt; Expr &gt;::type const &gt;::type</type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>fusion::result_of::pop_front&lt; Expr const &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="reverse"><purpose>A PolymorphicFunctionObject type that invokes the <computeroutput>fusion::reverse()</computeroutput> algorithm on its argument. </purpose><description><para>A PolymorphicFunctionObject type that invokes the <computeroutput>fusion::reverse()</computeroutput> algorithm on its argument. This is useful for defining a CallableTransform like <computeroutput>reverse(_)</computeroutput> which reverses the order of the children of a Proto expression node. </para></description><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>This(Expr)</template-arg></specialization><typedef name="type"><type>Context::template eval&lt; typename remove_reference&lt; Expr &gt;::type &gt;::result_type</type></typedef></struct-specialization><method-group name="public member functions"/><constructor><parameter name="ctx"><paramtype>Context &amp;</paramtype></parameter></constructor></struct><function name="children_of"><type><classname>children</classname>&lt; Expr &gt;</type><template>
+ </template><specialization><template-arg>This(Expr)</template-arg></specialization><typedef name="type"><type>fusion::result_of::reverse&lt; typename boost::remove_reference&lt; Expr &gt;::type const &gt;::type</type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>fusion::result_of::reverse&lt; Expr const &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></function></namespace></namespace></header><header name="boost/xpressive/proto/generate.hpp"><para>Contains definition of generate&lt;&gt; class template, which end users can specialize for generating domain-specific expression wrappers. </para><namespace name="boost"><namespace name="proto"><namespace name="generatorns_"><struct name="default_generator"><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct></namespace><data-member name="flatten"><type><classname>functional::flatten</classname> const</type><purpose>A PolymorphicFunctionObject type that returns a "flattened" view of a Proto expression tree. </purpose><description><para><para>boost::proto::functional::flatten </para>
+</para></description></data-member></namespace></namespace></header><header name="boost/xpressive/proto/generate.hpp"><para>Contains definition of generate&lt;&gt; class template, which end users can specialize for generating domain-specific expression wrappers. </para><namespace name="boost"><namespace name="proto"><namespace name="generatorns_"><struct name="default_generator"><purpose>A simple generator that passes an expression through unchanged. </purpose><description><para>Generators are intended for use as the first template parameter to the <computeroutput>domain&lt;&gt;</computeroutput> class template and control if and how expressions within that domain are to be customized. The <computeroutput>default_generator</computeroutput> makes no modifications to the expressions passed to it. </para></description><struct name="apply"><template>
       <template-type-parameter name="Expr"/>
     </template><typedef name="type"><type>Expr</type></typedef></struct><method-group name="public static functions"><method name="make" cv=""><type>static Expr const &amp;</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="generator"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>A Proto expression </para></description></parameter><description><para>
+
+</para></description><returns><para>expr </para></returns></method></method-group></struct><struct name="generator"><template>
       <template-nontype-parameter name="Extends"><type>template&lt; typename &gt; class</type></template-nontype-parameter>
- </template><struct name="apply"><template>
+ </template><purpose>A generator that wraps expressions passed to it in the specified extension wrapper. </purpose><description><para>Generators are intended for use as the first template parameter to the <computeroutput>domain&lt;&gt;</computeroutput> class template and control if and how expressions within that domain are to be customized. <computeroutput>generator&lt;&gt;</computeroutput> wraps each expression passed to it in the <computeroutput>Extends&lt;&gt;</computeroutput> wrapper. </para></description><struct name="apply"><template>
       <template-type-parameter name="Expr"/>
     </template><typedef name="type"><type>Extends&lt; Expr &gt;</type></typedef></struct><method-group name="public static functions"><method name="make" cv=""><type>static Extends&lt; Expr &gt;</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="pod_generator"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>A Proto expression </para></description></parameter><description><para>
+
+</para></description><returns><para>Extends&lt;Expr&gt;(expr) </para></returns></method></method-group></struct><struct name="pod_generator"><template>
       <template-nontype-parameter name="Extends"><type>template&lt; typename &gt; class</type></template-nontype-parameter>
- </template><struct name="apply"><template>
+ </template><purpose>A generator that wraps expressions passed to it in the specified extension wrapper and uses aggregate initialization for the wrapper. </purpose><description><para>Generators are intended for use as the first template parameter to the <computeroutput>domain&lt;&gt;</computeroutput> class template and control if and how expressions within that domain are to be customized. <computeroutput>pod_generator&lt;&gt;</computeroutput> wraps each expression passed to it in the <computeroutput>Extends&lt;&gt;</computeroutput> wrapper, and uses aggregate initialzation for the wrapped object. </para></description><struct name="apply"><template>
       <template-type-parameter name="Expr"/>
     </template><typedef name="type"><type>Extends&lt; Expr &gt;</type></typedef></struct><method-group name="public static functions"><method name="make" cv=""><type>static Extends&lt; Expr &gt;</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/literal.hpp"><para>The literal&lt;&gt; terminal wrapper, and the proto::lit() function for creating literal&lt;&gt; wrappers. </para><namespace name="boost"><namespace name="proto"><namespace name="utility"><struct name="literal"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The expression to wrap </para></description></parameter><description><para>
+
+</para></description><returns><para>Extends&lt;Expr&gt; that = {expr}; return that; </para></returns></method></method-group></struct><struct name="by_value_generator"><template>
+ <template-type-parameter name="Generator"/>
+ </template><purpose>A composite generator that first replaces child nodes held by reference with ones held by value and then forwards the result on to another generator. </purpose><description><para>Generators are intended for use as the first template parameter to the <computeroutput>domain&lt;&gt;</computeroutput> class template and control if and how expressions within that domain are to be customized. <computeroutput>by_value_generator&lt;&gt;</computeroutput> ensures all children nodes are held by value before forwarding the expression on to another generator for further processing. The <computeroutput>Generator</computeroutput> parameter defaults to <computeroutput>default_generator</computeroutput>. </para></description><struct name="apply"><template>
+ <template-type-parameter name="Expr"/>
+ </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct><method-group name="public static functions"><method name="make" cv=""><type>static <classname>apply</classname>&lt; Expr &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>The expression to modify. </para></description></parameter><description><para>
+
+</para></description><returns><para>Generator::make(deep_copy(expr)) </para></returns></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/literal.hpp"><para>The literal&lt;&gt; terminal wrapper, and the proto::lit() function for creating literal&lt;&gt; wrappers. </para><namespace name="boost"><namespace name="proto"><namespace name="utility"><struct name="literal"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="Domain"/>
- </template><inherit access="public">boost::proto::exprns_::extends&lt; Expr, Derived, Domain, Tag &gt;</inherit><typedef name="terminal_type"><type><classname>terminal</classname>&lt; T &gt;::type</type></typedef><typedef name="base_type"><type><classname>extends</classname>&lt; terminal_type, <classname>literal</classname>&lt; T, Domain &gt;, Domain &gt;</type></typedef><method-group name="public member functions"/><constructor><template>
+ </template><purpose>A simple wrapper for a terminal, provided for ease of use. </purpose><description><para>A simple wrapper for a terminal, provided for ease of use. In all cases, <computeroutput>literal&lt;X&gt; l(x);</computeroutput> is equivalent to <computeroutput>terminal&lt;X&gt;type l = {x};</computeroutput>.</para><para>The <computeroutput>Domain</computeroutput> template parameter defaults to <computeroutput>proto::default_domain</computeroutput>. </para></description><typedef name="value_type"><type><classname>proto::result_of::arg</classname>&lt; terminal_type &gt;::type</type></typedef><typedef name="reference"><type><classname>proto::result_of::arg</classname>&lt; terminal_type &gt;::reference</type></typedef><typedef name="const_reference"><type><classname>proto::result_of::arg</classname>&lt; terminal_type &gt;::const_reference</type></typedef><method-group name="public member functions"><method name="get" cv=""><type>reference</type></method><method name="get" cv="const"><type>const_ref
erence</type></method></method-group><constructor><template>
           <template-type-parameter name="U"/>
         </template><parameter name="u"><paramtype>U &amp;</paramtype></parameter></constructor><constructor><template>
           <template-type-parameter name="U"/>
         </template><parameter name="u"><paramtype>U const &amp;</paramtype></parameter></constructor><constructor><template>
           <template-type-parameter name="U"/>
- </template><parameter name="u"><paramtype><classname>literal</classname>&lt; U, Domain &gt; const &amp;</paramtype></parameter></constructor></struct></namespace><overloaded-function name="lit"><signature><type><classname>literal</classname>&lt; T &amp; &gt;</type><template>
+ </template><parameter name="u"><paramtype><classname>literal</classname>&lt; U, Domain &gt; const &amp;</paramtype></parameter></constructor></struct></namespace><overloaded-function name="lit"><signature><type>literal&lt; T &amp; &gt;</type><template>
           <template-type-parameter name="T"/>
- </template><parameter name="t"><paramtype>T &amp;</paramtype></parameter></signature><signature><type><classname>literal</classname>&lt; T const &amp; &gt;</type><template>
+ </template><parameter name="t"><paramtype>T &amp;</paramtype><description><para>The object to wrap. </para></description></parameter></signature><signature><type>literal&lt; T const &amp; &gt;</type><template>
           <template-type-parameter name="T"/>
- </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></signature><description><para>lit </para></description></overloaded-function></namespace></namespace></header><header name="boost/xpressive/proto/make_expr.hpp"><para>Given a Fusion sequence of arguments and the type of a proto Expression, unpacks the sequence into the Expression. </para><namespace name="boost"><namespace name="fusion"/><namespace name="proto"><namespace name="functional"><struct name="make_expr"><template>
+ </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></signature><purpose>A helper function for creating a <computeroutput>literal&lt;&gt;</computeroutput> wrapper. </purpose><description><para>
+
+
+
+</para></description><returns><para>literal&lt;T &amp;&gt;(t) </para></returns><throws><simpara>Will not throw.</simpara></throws><notes><para>The returned value holds the argument by reference. </para></notes></overloaded-function></namespace></namespace></header><header name="boost/xpressive/proto/make_expr.hpp"><para>Definition of the <computeroutput>make_expr()</computeroutput> and <computeroutput>unpack_expr()</computeroutput> utilities for building Proto expression nodes from children nodes or from a Fusion sequence of children nodes, respectively. </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="make_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Domain"/>
- </template><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="A0"/>
- </template><specialization><template-arg>This(A0)</template-arg></specialization><inherit access="public">boost::proto::result_of::make_expr&lt; Tag, Domain, remove_reference&lt; A0 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="result"><template>
+ </template><specialization><template-arg>This(A0)</template-arg></specialization><typedef name="type"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, A0 &gt;::type</type></typedef></struct-specialization><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
- </template><specialization><template-arg>This(A0</template-arg><template-arg>A1)</template-arg></specialization><inherit access="public">boost::proto::result_of::make_expr&lt; Tag, Domain, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="result"><template>
+ </template><specialization><template-arg>This(A0</template-arg><template-arg>A1)</template-arg></specialization><typedef name="type"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, A0, A1 &gt;::type</type></typedef></struct-specialization><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
- </template><specialization><template-arg>This(A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg></specialization><inherit access="public">boost::proto::result_of::make_expr&lt; Tag, Domain, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="result"><template>
+ </template><specialization><template-arg>This(A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg></specialization><typedef name="type"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, A0, A1, A2 &gt;::type</type></typedef></struct-specialization><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
- </template><specialization><template-arg>This(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg></specialization><inherit access="public">boost::proto::result_of::make_expr&lt; Tag, Domain, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type, remove_reference&lt; A3 &gt;::type &gt;</inherit></struct-specialization><struct-specialization name="result"><template>
+ </template><specialization><template-arg>This(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg></specialization><typedef name="type"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, A0, A1, A2, A3 &gt;::type</type></typedef></struct-specialization><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
       <template-type-parameter name="A4"/>
- </template><specialization><template-arg>This(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4)</template-arg></specialization><inherit access="public">boost::proto::result_of::make_expr&lt; Tag, Domain, remove_reference&lt; A0 &gt;::type, remove_reference&lt; A1 &gt;::type, remove_reference&lt; A2 &gt;::type, remove_reference&lt; A3 &gt;::type, remove_reference&lt; A4 &gt;::type &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, A &gt;::type const</type><template>
- <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0 &gt;::type const</type><template>
+ </template><specialization><template-arg>This(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4)</template-arg></specialization><typedef name="type"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, A0, A1, A2, A3, A4 &gt;::type</type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, A0 const &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
- </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1 &gt;::type const</type><template>
+ </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><description><para>Construct an expression node with tag type <computeroutput>Tag</computeroutput> and in the domain <computeroutput>Domain</computeroutput>. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
- </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1, const A2 &gt;::type const</type><template>
+ </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1, const A2 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
           <template-type-parameter name="A2"/>
- </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>const A2 &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1, const A2, const A3 &gt;::type const</type><template>
+ </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>const A2 &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1, const A2, const A3 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
           <template-type-parameter name="A2"/>
           <template-type-parameter name="A3"/>
- </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>const A2 &amp;</paramtype></parameter><parameter name="a3"><paramtype>const A3 &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1, const A2, const A3, const A4 &gt;::type const</type><template>
+ </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>const A2 &amp;</paramtype></parameter><parameter name="a3"><paramtype>const A3 &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const A0, const A1, const A2, const A3, const A4 &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
           <template-type-parameter name="A2"/>
           <template-type-parameter name="A3"/>
           <template-type-parameter name="A4"/>
- </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>const A2 &amp;</paramtype></parameter><parameter name="a3"><paramtype>const A3 &amp;</paramtype></parameter><parameter name="a4"><paramtype>const A4 &amp;</paramtype></parameter></method></method-group></struct><struct name="unpack_expr"><template>
+ </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>const A2 &amp;</paramtype></parameter><parameter name="a3"><paramtype>const A3 &amp;</paramtype></parameter><parameter name="a4"><paramtype>const A4 &amp;</paramtype></parameter><description><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></method></method-group></struct><struct name="unpack_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Domain"/>
     </template><struct name="result"><template>
@@ -918,55 +832,27 @@
     </template></struct><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Sequence"/>
- </template><specialization><template-arg>This(Sequence)</template-arg></specialization></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::unpack_expr</classname>&lt; Tag, Domain, Sequence &gt;::type</type><template>
+ </template><specialization><template-arg>This(Sequence)</template-arg></specialization><typedef name="type"><type><classname>result_of::unpack_expr</classname>&lt; Tag, Domain, typename remove_reference&lt; Sequence &gt;::type &gt;::type</type></typedef></struct-specialization><typedef name="proto_is_callable_"><type>void</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::unpack_expr</classname>&lt; Tag, Domain, Sequence const &gt;::type const</type><template>
           <template-type-parameter name="Sequence"/>
- </template><parameter name="sequence"><paramtype>Sequence const &amp;</paramtype></parameter></method></method-group></struct><struct name="unfused_expr_fun"><template>
+ </template><parameter name="sequence"><paramtype>Sequence const &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="result_of"><struct name="unpack_expr"><template>
       <template-type-parameter name="Tag"/>
- <template-type-parameter name="Domain"/>
- </template><struct name="result"><template>
       <template-type-parameter name="Sequence"/>
- </template><inherit access="public">boost::proto::result_of::unpack_expr&lt; Tag, Domain, Sequence &gt;</inherit></struct><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>proto::result_of::unpack_expr</classname>&lt; Tag, Domain, Sequence &gt;::type</type><template>
- <template-type-parameter name="Sequence"/>
- </template><parameter name="sequence"><paramtype>Sequence const &amp;</paramtype></parameter></method></method-group></struct><struct name="unfused_expr"><template>
+ <template-type-parameter name="EnableIf1"/>
+ <template-type-parameter name="EnableIf2"/>
+ </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct><struct-specialization name="unpack_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Domain"/>
- </template></struct><struct-specialization name="make_expr"><template>
- <template-type-parameter name="Domain"/>
- </template><specialization><template-arg>tag::terminal</template-arg><template-arg>Domain</template-arg></specialization><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
- <template-type-parameter name="This"/>
- <template-type-parameter name="A"/>
- </template><specialization><template-arg>This(A)</template-arg></specialization><inherit access="public">boost::proto::result_of::make_expr&lt; tag::terminal, Domain, A &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; <classname>tag::terminal</classname>, Domain, A &gt;::type</type><template>
- <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::make_expr</classname>&lt; <classname>tag::terminal</classname>, Domain, A const &gt;::type</type><template>
- <template-type-parameter name="A"/>
- </template><parameter name="a"><paramtype>A const &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace><namespace name="result_of"><struct name="unpack_expr"><template>
- <template-type-parameter name="Tag"/>
       <template-type-parameter name="Sequence"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template></struct><struct name="make_expr"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Domain</template-arg><template-arg>Sequence</template-arg><template-arg>typename Domain::proto_is_domain_</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct name="make_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
       <template-type-parameter name="A4"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template></struct><struct-specialization name="make_expr"><template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="A0"/>
- <template-type-parameter name="A1"/>
- <template-type-parameter name="A2"/>
- <template-type-parameter name="A3"/>
- <template-type-parameter name="A4"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>deduce_domain</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4</template-arg><template-arg>void</template-arg></specialization></struct-specialization><struct-specialization name="unpack_expr"><template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="Domain"/>
- <template-type-parameter name="Sequence"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Domain</template-arg><template-arg>Sequence</template-arg><template-arg>typename Domain::proto_is_domain_</template-arg></specialization></struct-specialization><struct-specialization name="make_expr"><template>
+ <template-type-parameter name="EnableIf1"/>
+ <template-type-parameter name="EnableIf2"/>
+ </template><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct><struct-specialization name="make_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="Domain"/>
       <template-type-parameter name="A0"/>
@@ -974,28 +860,21 @@
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
       <template-type-parameter name="A4"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>Domain</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4</template-arg><template-arg>typename Domain::proto_is_domain_</template-arg></specialization></struct-specialization></namespace><overloaded-function name="unpack_expr"><signature><type>lazy_disable_if&lt; <classname>is_domain</classname>&lt; Sequence &gt;, <classname>result_of::unpack_expr</classname>&lt; Tag, Sequence &gt;&gt;::type const</type><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>Domain</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4</template-arg><template-arg>typename Domain::proto_is_domain_</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization></namespace><overloaded-function name="unpack_expr"><signature><type>lazy_disable_if&lt; is_domain&lt; Sequence &gt;, <classname>result_of::unpack_expr</classname>&lt; Tag, Sequence const &gt;&gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="Sequence"/>
- </template><parameter name="sequence"><paramtype>Sequence const &amp;</paramtype></parameter></signature><signature><type><classname>result_of::unpack_expr</classname>&lt; Tag, Domain, Sequence2 &gt;::type const</type><template>
+ </template><parameter name="sequence"><paramtype>Sequence const &amp;</paramtype></parameter></signature><signature><type><classname>result_of::unpack_expr</classname>&lt; Tag, Domain, Sequence2 const &gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="Domain"/>
           <template-type-parameter name="Sequence2"/>
- </template><parameter name="sequence2"><paramtype>Sequence2 const &amp;</paramtype></parameter></signature><description><para>unpack_expr </para></description></overloaded-function><overloaded-function name="make_expr"><signature><type>lazy_disable_if&lt; <classname>is_domain</classname>&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, A0 &gt;&gt;::type const</type><template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="A0"/>
- </template><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter></signature><signature><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, B0 &gt;::type const</type><template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="Domain"/>
- <template-type-parameter name="B0"/>
- </template><parameter name="b0"><paramtype>B0 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; <classname>is_domain</classname>&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0 &gt;&gt;::type const</type><template>
+ </template><parameter name="sequence2"><paramtype>Sequence2 const &amp;</paramtype></parameter></signature><description><para>unpack_expr </para></description></overloaded-function><overloaded-function name="make_expr"><signature><type>lazy_disable_if&lt; is_domain&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, A0 const &gt;&gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="A0"/>
- </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter></signature><signature><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, const B0 &gt;::type const</type><template>
+ </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter></signature><signature><type><classname>result_of::make_expr</classname>&lt; Tag, Domain, B0 const &gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="Domain"/>
           <template-type-parameter name="B0"/>
- </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; <classname>is_domain</classname>&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1 &gt;&gt;::type const</type><template>
+ </template><parameter name="b0"><paramtype>B0 const &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; is_domain&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1 &gt;&gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
@@ -1004,7 +883,7 @@
           <template-type-parameter name="Domain"/>
           <template-type-parameter name="B0"/>
           <template-type-parameter name="B1"/>
- </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; <classname>is_domain</classname>&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1, const A2 &gt;&gt;::type const</type><template>
+ </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; is_domain&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1, const A2 &gt;&gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
@@ -1015,7 +894,7 @@
           <template-type-parameter name="B0"/>
           <template-type-parameter name="B1"/>
           <template-type-parameter name="B2"/>
- </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter><parameter name="b2"><paramtype>const B2 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; <classname>is_domain</classname>&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1, const A2, const A3 &gt;&gt;::type const</type><template>
+ </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter><parameter name="b2"><paramtype>const B2 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; is_domain&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1, const A2, const A3 &gt;&gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
@@ -1028,7 +907,7 @@
           <template-type-parameter name="B1"/>
           <template-type-parameter name="B2"/>
           <template-type-parameter name="B3"/>
- </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter><parameter name="b2"><paramtype>const B2 &amp;</paramtype></parameter><parameter name="b3"><paramtype>const B3 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; <classname>is_domain</classname>&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1, const A2, const A3, const A4 &gt;&gt;::type const</type><template>
+ </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter><parameter name="b2"><paramtype>const B2 &amp;</paramtype></parameter><parameter name="b3"><paramtype>const B3 &amp;</paramtype></parameter></signature><signature><type>lazy_disable_if&lt; is_domain&lt; A0 &gt;, <classname>result_of::make_expr</classname>&lt; Tag, const A0, const A1, const A2, const A3, const A4 &gt;&gt;::type const</type><template>
           <template-type-parameter name="Tag"/>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
@@ -1045,16 +924,54 @@
           <template-type-parameter name="B4"/>
         </template><parameter name="b0"><paramtype>const B0 &amp;</paramtype></parameter><parameter name="b1"><paramtype>const B1 &amp;</paramtype></parameter><parameter name="b2"><paramtype>const B2 &amp;</paramtype></parameter><parameter name="b3"><paramtype>const B3 &amp;</paramtype></parameter><parameter name="b4"><paramtype>const B4 &amp;</paramtype></parameter></signature><description><para>make_expr </para></description></overloaded-function></namespace></namespace></header><header name="boost/xpressive/proto/matches.hpp"><para>Contains definition of matches&lt;&gt; metafunction for determining if a given expression matches a given pattern. </para><namespace name="boost"><namespace name="proto"><namespace name="control"><struct name="not_"><template>
       <template-type-parameter name="Grammar"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_identity_transform</inherit><typedef name="proto_base_expr"><type><classname>not_</classname></type></typedef></struct><struct name="if_"><template>
- <template-type-parameter name="Condition"/>
+ </template><purpose>Inverts the set of expressions matched by a grammar. When used as a transform, <computeroutput>not_&lt;&gt;</computeroutput> returns the current expression unchanged. </purpose><description><para>If an expression type <computeroutput>E</computeroutput> does not match a grammar <computeroutput>G</computeroutput>, then <computeroutput>E</computeroutput> does match <computeroutput>not_&lt;G&gt;</computeroutput>. For example, <computeroutput>not_&lt;terminal&lt;_&gt; &gt;</computeroutput> will match any non-terminal. </para></description><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>Expr</type></typedef></struct-specialization><typedef name="proto_base_expr"><type><classname>not_</classname></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>Expr const &amp;</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter><description><para>
+
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,not_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>expr</computeroutput> </para></returns></method></method-group></struct><struct name="if_"><template>
+ <template-type-parameter name="If"/>
       <template-type-parameter name="Then"/>
       <template-type-parameter name="Else"/>
- </template><inherit access="public">boost::proto::control::or_&lt; and_&lt; if_&lt; Condition &gt;, Then &gt;, and_&lt; not_&lt; if_&lt; Condition &gt; &gt;, Else &gt; &gt;</inherit></struct><struct-specialization name="if_"><template>
- <template-type-parameter name="Condition"/>
- <template-type-parameter name="Then"/>
- </template><specialization><template-arg>Condition</template-arg><template-arg>Then</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::control::and_&lt; if_&lt; Condition &gt;, Then &gt;</inherit></struct-specialization><struct-specialization name="if_"><template>
- <template-type-parameter name="Condition"/>
- </template><specialization><template-arg>Condition</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_identity_transform</inherit><typedef name="proto_base_expr"><type><classname>if_</classname></type></typedef></struct-specialization><struct name="or_"><template>
+ </template><purpose>Used to select one grammar or another based on the result of a compile-time Boolean. When used as a transform, <computeroutput>if_&lt;&gt;</computeroutput> selects between two transforms based on a compile-time Boolean. </purpose><description><para>When <computeroutput>if_&lt;If,Then,Else&gt;</computeroutput> is used as a grammar, <computeroutput>If</computeroutput> must be a Proto transform and <computeroutput>Then</computeroutput> and <computeroutput>Else</computeroutput> must be grammars. An expression type <computeroutput>E</computeroutput> matches <computeroutput>if_&lt;If,Then,Else&gt;</computeroutput> if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput> and <computeroutput>E</computeroutput> matches <computeroutput>U</computeroutput>; or, if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>false</computeroutput> and <computeroutpu
t>E</computeroutput> matches <computeroutput>V</computeroutput>.</para><para>The template parameter <computeroutput>Then</computeroutput> defaults to <computeroutput>_</computeroutput> and <computeroutput>Else</computeroutput> defaults to <computeroutput>not&lt;_&gt;</computeroutput>, so an expression type <computeroutput>E</computeroutput> will match <computeroutput>if_&lt;If&gt;</computeroutput> if and only if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput>.</para><para><programlisting> // A grammar that only matches integral terminals,
+ // using is_integral&lt;&gt; from Boost.Type_traits.
+ struct IsIntegral
+ : and_&lt;
+ terminal&lt;_&gt;
+ , if_&lt; is_integral&lt;_arg&gt;() &gt;
+ &gt;
+ {};
+</programlisting></para><para>When <computeroutput>if_&lt;If,Then,Else&gt;</computeroutput> is used as a transform, <computeroutput>If</computeroutput>, <computeroutput>Then</computeroutput> and <computeroutput>Else</computeroutput> must be Proto transforms. When applying the transform to an expression <computeroutput>E</computeroutput>, state <computeroutput>S</computeroutput> and visitor <computeroutput>V</computeroutput>, if <computeroutput>when&lt;_,If&gt;::result&lt;void(E,S,V)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput> then the <computeroutput>Then</computeroutput> transform is applied; otherwise the <computeroutput>Else</computeroutput> transform is applied.</para><para><programlisting> // Match a terminal. If the terminal is integral, return
+ // mpl::true_; otherwise, return mpl::false_.
+ struct IsIntegral2
+ : when&lt;
+ terminal&lt;_&gt;
+ , if_&lt;
+ is_integral&lt;_arg&gt;()
+ , mpl::true_()
+ , mpl::false_()
+ &gt;
+ &gt;
+ {};
+</programlisting> </para></description><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="condition"><type>when&lt; _, If &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef><typedef name="which"><type>mpl::if_&lt; condition, when&lt; _, Then &gt;, when&lt; _, Else &gt;&gt;::type</type></typedef><typedef name="type"><type>which::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type><classname>if_</classname></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
+
+</para></description><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="or_"><template>
       <template-type-parameter name="G0"/>
       <template-type-parameter name="G1"/>
       <template-type-parameter name="G2"/>
@@ -1063,15 +980,19 @@
       <template-type-parameter name="G5"/>
       <template-type-parameter name="G6"/>
       <template-type-parameter name="G7"/>
- </template><struct name="apply"><template>
+ </template><purpose>For matching one of a set of alternate grammars. Alternates tried in order to avoid ambiguity. When used as a transform, <computeroutput>or_&lt;&gt;</computeroutput> applies the transform associated with the first grammar that matches the expression. </purpose><description><para>An expression type <computeroutput>E</computeroutput> matches <computeroutput>or_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches any <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>.</para><para>When applying <computeroutput>or_&lt;B0,B1,...Bn&gt;</computeroutput> as a transform with an expression <computeroutput>e</computeroutput> of type <computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> and visitor <computeroutput>v</computeroutput>, it is equivalent to <computeroutput>Bx()(e, s, v)</computeroutput>, where <computeroutput>x</computeroutput> is the lowest number such that <compute
routput>matches&lt;E,Bx&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></description><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><typedef name="which"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="type"><type>which::template <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type></typedef></struct><typedef name="proto_base_expr"><type><classname>or_</classname></type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="which"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="type"><type>which::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type><classname>or_</classname></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="and_"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
+
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,or_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="and_"><template>
       <template-type-parameter name="G0"/>
       <template-type-parameter name="G1"/>
       <template-type-parameter name="G2"/>
@@ -1080,38 +1001,109 @@
       <template-type-parameter name="G5"/>
       <template-type-parameter name="G6"/>
       <template-type-parameter name="G7"/>
- </template><struct name="apply"><template>
+ </template><purpose>For matching all of a set of grammars. When used as a transform, <computeroutput>and_&lt;&gt;</computeroutput> applies the transform associated with the last grammar in the set. </purpose><description><para>An expression type <computeroutput>E</computeroutput> matches <computeroutput>and_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches all <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>.</para><para>When applying <computeroutput>and_&lt;B0,B1,...Bn&gt;</computeroutput> as a transform with an expression <computeroutput>e</computeroutput>, state <computeroutput>s</computeroutput> and visitor <computeroutput>v</computeroutput>, it is equivalent to <computeroutput>Bn()(e, s, v)</computeroutput>. </para></description><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><typedef name="which"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="type"><type>which::template <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type></typedef></struct><typedef name="proto_base_expr"><type><classname>and_</classname></type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="which"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="type"><type>which::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type><classname>and_</classname></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="switch_"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
+
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,and_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="switch_"><template>
       <template-type-parameter name="Cases"/>
- </template><struct name="apply"><template>
+ </template><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, <computeroutput>switch_&lt;&gt;</computeroutput> applies the transform associated with the grammar that matches the expression. </purpose><description><para>
+An expression type <computeroutput>E</computeroutput> matches <computeroutput>switch_&lt;C&gt;</computeroutput> if <computeroutput>E</computeroutput> matches <computeroutput>C::case_&lt;E::proto_tag&gt;</computeroutput>.</para><para>When applying <computeroutput>switch_&lt;C&gt;</computeroutput> as a transform with an expression <computeroutput>e</computeroutput> of type <computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> and visitor <computeroutput>v</computeroutput>, it is equivalent to <computeroutput>C::case_&lt;E::proto_tag&gt;()(e, s, v)</computeroutput>. </para></description><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><typedef name="proto_base_expr"><type><classname>switch_</classname></type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="which"><type>Cases::template case_&lt; typename Expr::proto_tag &gt;</type></typedef><typedef name="type"><type>which::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type><classname>switch_</classname></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="exact"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name="state"><paramtype>State const &amp;</paramtype><description><para>The current state </para></description></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype><description><para>A visitor of arbitrary type </para></description></parameter><description><para>
+
+
+</para></description><requires><para><computeroutput>matches&lt;Expr,switch_&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></requires><returns><para><computeroutput>result&lt;void(Expr, State, Visitor)&gt;::which()(expr, state, visitor)</computeroutput> </para></returns></method></method-group></struct><struct name="exact"><template>
       <template-type-parameter name="T"/>
- </template></struct><struct name="convertible_to"><template>
+ </template><purpose>For forcing exact matches of terminal types. </purpose><description><para>By default, matching terminals ignores references and cv-qualifiers. For instance, a terminal expression of type <computeroutput>terminal&lt;int const &amp;&gt;type</computeroutput> will match the grammar <computeroutput>terminal&lt;int&gt;</computeroutput>. If that is not desired, you can force an exact match with <computeroutput>terminal&lt;exact&lt;int&gt; &gt;</computeroutput>. This will only match integer terminals where the terminal is held by value. </para></description></struct><struct name="convertible_to"><template>
       <template-type-parameter name="T"/>
- </template></struct><struct name="vararg"><template>
+ </template><purpose>For matching terminals that are convertible to a type. </purpose><description><para>Use <computeroutput>convertible_to&lt;&gt;</computeroutput> to match a terminal that is convertible to some type. For example, the grammar <computeroutput>terminal&lt;convertible_to&lt;int&gt; &gt;</computeroutput> will match any terminal whose argument is convertible to an integer.</para><para>
+</para></description></struct><struct name="vararg"><template>
       <template-type-parameter name="Grammar"/>
- </template><typedef name="proto_is_vararg_"><type>void</type></typedef></struct></namespace><namespace name="result_of"><struct name="matches"><template>
+ </template><purpose>For matching a Grammar to a variable number of sub-expressions. </purpose><description><para>An expression type <computeroutput>expr&lt;AT, argsN&lt;A0,...An,U0,...Um&gt; &gt;</computeroutput> matches a grammar <computeroutput>expr&lt;BT, argsM&lt;B0,...Bn,vararg&lt;V&gt; &gt; &gt;</computeroutput> if <computeroutput>BT</computeroutput> is <computeroutput>_</computeroutput> or <computeroutput>AT</computeroutput>, and if <computeroutput>Ax</computeroutput> matches <computeroutput>Bx</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput> and if <computeroutput>Ux</computeroutput> matches <computeroutput>V</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,m)</computeroutput>.</para><para>For example:</para><para><programlisting> // Match any function call expression, irregardless
+ // of the number of function arguments:
+ struct Function
+ : function&lt; vararg&lt;_&gt; &gt;
+ {};
+</programlisting></para><para>When used as a transform, <computeroutput>vararg&lt;G&gt;</computeroutput> applies <computeroutput>G</computeroutput>'s transform. </para></description><typedef name="proto_is_vararg_"><type>void</type></typedef></struct></namespace><namespace name="result_of"><struct name="matches"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="Grammar"/>
- </template></struct></namespace><namespace name="wildcardns_"><struct name="_"><inherit access="public">boost::proto::has_transformns_::has_identity_transform</inherit><typedef name="proto_base_expr"><type><classname>_</classname></type></typedef><typedef name="proto_is_wildcard_"><type>void</type></typedef></struct><function name="is_wildcard_expression_fun"><type><emphasis>unspecified</emphasis></type><template>
- <template-type-parameter name="T"/>
- </template><parameter name=""><paramtype>T const *</paramtype></parameter></function></namespace></namespace></namespace></header><header name="boost/xpressive/proto/operators.hpp"><para>Contains all the overloaded operators that make it possible to build expression templates using proto components </para><namespace name="boost"><namespace name="proto"><struct name="is_extension"><template>
+ </template><purpose>A Boolean metafunction that evaluates whether a given expression type matches a grammar. </purpose><description><para><computeroutput>matches&lt;Expr,Grammar&gt;</computeroutput> inherits (indirectly) from <computeroutput>mpl::true_</computeroutput> if <computeroutput>Expr::proto_base_expr</computeroutput> matches <computeroutput>Grammar::proto_base_expr</computeroutput>, and from <computeroutput>mpl::false_</computeroutput> otherwise.</para><para>Non-terminal expressions are matched against a grammar according to the following rules:</para><para><itemizedlist>
+<listitem><para>The wildcard pattern, <computeroutput>_</computeroutput>, matches any expression. </para></listitem>
+<listitem><para>An expression <computeroutput>expr&lt;AT, argsN&lt;A0,A1,...An&gt; &gt;</computeroutput> matches a grammar <computeroutput>expr&lt;BT, argsN&lt;B0,B1,...Bn&gt; &gt;</computeroutput> if <computeroutput>BT</computeroutput> is <computeroutput>_</computeroutput> or <computeroutput>AT</computeroutput>, and if <computeroutput>Ax</computeroutput> matches <computeroutput>Bx</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>. </para></listitem>
+<listitem><para>An expression <computeroutput>expr&lt;AT, argsN&lt;A0,...An,U0,...Um&gt; &gt;</computeroutput> matches a grammar <computeroutput>expr&lt;BT, argsM&lt;B0,...Bn,vararg&lt;V&gt; &gt; &gt;</computeroutput> if <computeroutput>BT</computeroutput> is <computeroutput>_</computeroutput> or <computeroutput>AT</computeroutput>, and if <computeroutput>Ax</computeroutput> matches <computeroutput>Bx</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput> and if <computeroutput>Ux</computeroutput> matches <computeroutput>V</computeroutput> for each <computeroutput>x</computeroutput> in <computeroutput>[0,m)</computeroutput>. </para></listitem>
+<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>or_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches some <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>. </para></listitem>
+<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>and_&lt;B0,B1,...Bn&gt;</computeroutput> if <computeroutput>E</computeroutput> matches all <computeroutput>Bx</computeroutput> for <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>. </para></listitem>
+<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>if_&lt;T,U,V&gt;</computeroutput> if <computeroutput>when&lt;_,T&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>true</computeroutput> and <computeroutput>E</computeroutput> matches <computeroutput>U</computeroutput>; or, if <computeroutput>when&lt;_,T&gt;::result&lt;void(E,int,int)&gt;::type::value</computeroutput> is <computeroutput>false</computeroutput> and <computeroutput>E</computeroutput> matches <computeroutput>V</computeroutput>. (Note: <computeroutput>U</computeroutput> defaults to <computeroutput>_</computeroutput> and <computeroutput>V</computeroutput> defaults to <computeroutput>not&lt;_&gt;</computeroutput>.) </para></listitem>
+<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>not_&lt;T&gt;</computeroutput> if <computeroutput>E</computeroutput> does not match <computeroutput>T</computeroutput>. </para></listitem>
+<listitem><para>An expression <computeroutput>E</computeroutput> matches <computeroutput>switch_&lt;C&gt;</computeroutput> if <computeroutput>E</computeroutput> matches <computeroutput>C::case_&lt;E::proto_tag&gt;</computeroutput>.</para></listitem>
+</itemizedlist>
+A terminal expression <computeroutput>expr&lt;tag::terminal,args0&lt;A&gt; &gt;</computeroutput> matches a grammar <computeroutput>expr&lt;BT,args0&lt;B&gt; &gt;</computeroutput> if <computeroutput>BT</computeroutput> is <computeroutput>_</computeroutput> or <computeroutput>tag::terminal</computeroutput> and one of the following is true:</para><para><itemizedlist>
+<listitem><para><computeroutput>B</computeroutput> is the wildcard pattern, <computeroutput>_</computeroutput> </para></listitem>
+<listitem><para><computeroutput>A</computeroutput> is <computeroutput>B</computeroutput> </para></listitem>
+<listitem><para><computeroutput>A</computeroutput> is <computeroutput>B &amp;</computeroutput> </para></listitem>
+<listitem><para><computeroutput>A</computeroutput> is <computeroutput>B const &amp;</computeroutput> </para></listitem>
+<listitem><para><computeroutput>B</computeroutput> is <computeroutput>exact&lt;A&gt;</computeroutput> </para></listitem>
+<listitem><para><computeroutput>B</computeroutput> is <computeroutput>convertible_to&lt;X&gt;</computeroutput> and <computeroutput>is_convertible&lt;A,X&gt;::value</computeroutput> is <computeroutput>true</computeroutput>. </para></listitem>
+<listitem><para><computeroutput>A</computeroutput> is <computeroutput>X[M]</computeroutput> or <computeroutput>X(&amp;)[M]</computeroutput> and <computeroutput>B</computeroutput> is <computeroutput>X[proto::N]</computeroutput>. </para></listitem>
+<listitem><para><computeroutput>A</computeroutput> is <computeroutput>X(&amp;)[M]</computeroutput> and <computeroutput>B</computeroutput> is <computeroutput>X(&amp;)[proto::N]</computeroutput>. </para></listitem>
+<listitem><para><computeroutput>A</computeroutput> is <computeroutput>X[M]</computeroutput> or <computeroutput>X(&amp;)[M]</computeroutput> and <computeroutput>B</computeroutput> is <computeroutput>X*</computeroutput>. </para></listitem>
+<listitem><para><computeroutput>B</computeroutput> lambda-matches <computeroutput>A</computeroutput> (see below).</para></listitem>
+</itemizedlist>
+A type <computeroutput>B</computeroutput> lambda-matches <computeroutput>A</computeroutput> if one of the following is true:</para><para><itemizedlist>
+<listitem><para><computeroutput>B</computeroutput> is <computeroutput>A</computeroutput> </para></listitem>
+<listitem><para><computeroutput>B</computeroutput> is the wildcard pattern, <computeroutput>_</computeroutput> </para></listitem>
+<listitem><para><computeroutput>B</computeroutput> is <computeroutput>T&lt;B0,B1,...Bn&gt;</computeroutput> and <computeroutput>A</computeroutput> is <computeroutput>T&lt;A0,A1,...An&gt;</computeroutput> and for each <computeroutput>x</computeroutput> in <computeroutput>[0,n)</computeroutput>, <computeroutput>Ax</computeroutput> and <computeroutput>Bx</computeroutput> are types such that <computeroutput>Ax</computeroutput> lambda-matches <computeroutput>Bx</computeroutput> </para></listitem>
+</itemizedlist>
+</para></description></struct></namespace><namespace name="wildcardns_"><struct name="_"><purpose>A wildcard grammar element that matches any expression, and a transform that returns the current expression unchanged. </purpose><description><para>The wildcard type, <computeroutput>_</computeroutput>, is a grammar element such that <computeroutput>matches&lt;E,_&gt;::value</computeroutput> is <computeroutput>true</computeroutput> for any expression type <computeroutput>E</computeroutput>.</para><para>The wildcard can also be used as a stand-in for a template argument when matching terminals. For instance, the following is a grammar that will match any <computeroutput>std::complex&lt;&gt;</computeroutput> terminal:</para><para><programlisting> BOOST_MPL_ASSERT((
+ matches&lt;
+ terminal&lt;std::complex&lt;double&gt; &gt;::type
+ , terminal&lt;std::complex&lt; _ &gt; &gt;
+ &gt;
+ ));
+</programlisting></para><para>When used as a transform, <computeroutput>_</computeroutput> returns the current expression unchanged. For instance, in the following, <computeroutput>_</computeroutput> is used with the <computeroutput>fold&lt;&gt;</computeroutput> transform to fold the children of a node:</para><para><programlisting> struct CountChildren
+ : or_&lt;
+ // Terminals have no children
+ when&lt;terminal&lt;_&gt;, mpl::int_&lt;0&gt;()&gt;
+ // Use fold&lt;&gt; to count the children of non-terminals
+ , otherwise&lt;
+ fold&lt;
+ _ // &lt;-- fold the current expression
+ , mpl::int_&lt;0&gt;()
+ , mpl::plus&lt;_state, mpl::int_&lt;1&gt; &gt;()
+ &gt;
+ &gt;
+ &gt;
+ {};
+</programlisting> </para></description><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>Expr</type></typedef></struct-specialization><typedef name="proto_base_expr"><type><classname>_</classname></type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>Expr const &amp;</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype><description><para>An expression </para></description></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter><description><para>
+
+</para></description><returns><para><computeroutput>expr</computeroutput> </para></returns></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/operators.hpp"><para>Contains all the overloaded operators that make it possible to build Proto expression trees. </para><namespace name="boost"><namespace name="proto"><struct name="is_extension"><template>
       <template-type-parameter name="T"/>
- </template></struct><namespace name="exprns_"><function name="operator+"><type><emphasis>unspecified</emphasis></type><template>
+ </template><inherit access="public">boost::mpl::false_</inherit></struct><namespace name="exprns_"><function name="operator+"><type><emphasis>unspecified</emphasis></type><template>
           <template-type-parameter name="Arg"/>
         </template><parameter name="arg"><paramtype>Arg &amp;</paramtype></parameter></function><function name="operator+"><type><emphasis>unspecified</emphasis></type><template>
           <template-type-parameter name="Arg"/>
@@ -1511,48 +1503,46 @@
         </template><parameter name="left"><paramtype>Left const &amp;</paramtype></parameter><parameter name="right"><paramtype>Right &amp;</paramtype></parameter></function><function name="operator^="><type><emphasis>unspecified</emphasis></type><template>
           <template-type-parameter name="Left"/>
           <template-type-parameter name="Right"/>
- </template><parameter name="left"><paramtype>Left const &amp;</paramtype></parameter><parameter name="right"><paramtype>Right const &amp;</paramtype></parameter></function><function name="if_else"><type><classname>boost::proto::result_of::make_expr</classname>&lt; <classname>tag::if_else_</classname>, <classname>deduce_domain</classname>, const A0, const A1, const A2 &gt;::type const</type><template>
+ </template><parameter name="left"><paramtype>Left const &amp;</paramtype></parameter><parameter name="right"><paramtype>Right const &amp;</paramtype></parameter></function><function name="if_else"><type><classname>boost::proto::result_of::make_expr</classname>&lt; <classname>tag::if_else_</classname>, deduce_domain, A0 const &amp;, A1 const &amp;, A2 const &amp; &gt;::type const</type><template>
           <template-type-parameter name="A0"/>
           <template-type-parameter name="A1"/>
           <template-type-parameter name="A2"/>
- </template><parameter name="a0"><paramtype>const A0 &amp;</paramtype></parameter><parameter name="a1"><paramtype>const A1 &amp;</paramtype></parameter><parameter name="a2"><paramtype>const A2 &amp;</paramtype></parameter><description><para>if_else </para></description></function></namespace></namespace></namespace></header><header name="boost/xpressive/proto/proto.hpp"><para>The proto expression template compiler and supporting utilities. </para></header><header name="boost/xpressive/proto/proto_fwd.hpp"><para>Forward declarations of all of proto's public types and functions. </para><namespace name="boost"><namespace name="proto"><namespace name="context"/><namespace name="control"><data-member name="N"><type>int const</type></data-member></namespace><namespace name="domainns_"/><namespace name="exops"/><namespace name="exprns_"/><namespace name="functional"/><namespace name="generatorns_"/><namespace name="has_transformns_"><struct name="has_identity_transform"><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="op"/><namespace name="refns_"/><namespace name="result_of"/><namespace name="tag"/><namespace name="transform"/><namespace name="utility"/><namespace name="wildcardns_"/></namespace></namespace></header><header name="boost/xpressive/proto/ref.hpp"><para>Utility for storing a sub-expr by reference </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="unref"><struct name="result"><template>
- <template-type-parameter name="T"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><parameter name="a0"><paramtype>A0 const &amp;</paramtype></parameter><parameter name="a1"><paramtype>A1 const &amp;</paramtype></parameter><parameter name="a2"><paramtype>A2 const &amp;</paramtype></parameter><description><para>if_else </para></description></function></namespace></namespace></namespace></header><header name="boost/xpressive/proto/proto.hpp"><para>The proto expression template compiler and supporting utilities. </para></header><header name="boost/xpressive/proto/proto_fwd.hpp"><para>Forward declarations of all of proto's public types and functions. </para><namespace name="boost"><namespace name="proto"><namespace name="context"/><namespace name="control"><data-member name="N"><type>int const</type></data-member></namespace><namespace name="domainns_"/><namespace name="exops"/><namespace name="exprns_"/><namespace name="functional"><typedef name="make_terminal"><type><classname>make_expr</classname>&lt; <classname>tag::terminal</classname> &gt;</type></typedef><typedef nam
e="make_posit"><type><classname>make_expr</classname>&lt; <classname>tag::posit</classname> &gt;</type></typedef><typedef name="make_negate"><type><classname>make_expr</classname>&lt; <classname>tag::negate</classname> &gt;</type></typedef><typedef name="make_dereference"><type><classname>make_expr</classname>&lt; <classname>tag::dereference</classname> &gt;</type></typedef><typedef name="make_complement"><type><classname>make_expr</classname>&lt; <classname>tag::complement</classname> &gt;</type></typedef><typedef name="make_address_of"><type><classname>make_expr</classname>&lt; <classname>tag::address_of</classname> &gt;</type></typedef><typedef name="make_logical_not"><type><classname>make_expr</classname>&lt; <classname>tag::logical_not</classname> &gt;</type></typedef><typedef name="make_pre_inc"><type><classname>make_expr</classname>&lt; <classname>tag::pre_inc</classname> &gt;</type></typedef><typedef name="make_pre_dec"><type><classname>make_expr</classname>&lt; <classname>tag::pre_dec</classname> &g
t;</type></typedef><typedef name="make_post_inc"><type><classname>make_expr</classname>&lt; <classname>tag::post_inc</classname> &gt;</type></typedef><typedef name="make_post_dec"><type><classname>make_expr</classname>&lt; <classname>tag::post_dec</classname> &gt;</type></typedef><typedef name="make_shift_left"><type><classname>make_expr</classname>&lt; <classname>tag::shift_left</classname> &gt;</type></typedef><typedef name="make_shift_right"><type><classname>make_expr</classname>&lt; <classname>tag::shift_right</classname> &gt;</type></typedef><typedef name="make_multiplies"><type><classname>make_expr</classname>&lt; <classname>tag::multiplies</classname> &gt;</type></typedef><typedef name="make_divides"><type><classname>make_expr</classname>&lt; <classname>tag::divides</classname> &gt;</type></typedef><typedef name="make_modulus"><type><classname>make_expr</classname>&lt; <classname>tag::modulus</classname> &gt;</type></typedef><typedef name="make_plus"><type><classname>make_expr</classname>&lt; <classna
me>tag::plus</classname> &gt;</type></typedef><typedef name="make_minus"><type><classname>make_expr</classname>&lt; <classname>tag::minus</classname> &gt;</type></typedef><typedef name="make_less"><type><classname>make_expr</classname>&lt; <classname>tag::less</classname> &gt;</type></typedef><typedef name="make_greater"><type><classname>make_expr</classname>&lt; <classname>tag::greater</classname> &gt;</type></typedef><typedef name="make_less_equal"><type><classname>make_expr</classname>&lt; <classname>tag::less_equal</classname> &gt;</type></typedef><typedef name="make_greater_equal"><type><classname>make_expr</classname>&lt; <classname>tag::greater_equal</classname> &gt;</type></typedef><typedef name="make_equal_to"><type><classname>make_expr</classname>&lt; <classname>tag::equal_to</classname> &gt;</type></typedef><typedef name="make_not_equal_to"><type><classname>make_expr</classname>&lt; <classname>tag::not_equal_to</classname> &gt;</type></typedef><typedef name="make_logical_or"><type><classname>make_
expr</classname>&lt; <classname>tag::logical_or</classname> &gt;</type></typedef><typedef name="make_logical_and"><type><classname>make_expr</classname>&lt; <classname>tag::logical_and</classname> &gt;</type></typedef><typedef name="make_bitwise_and"><type><classname>make_expr</classname>&lt; <classname>tag::bitwise_and</classname> &gt;</type></typedef><typedef name="make_bitwise_or"><type><classname>make_expr</classname>&lt; <classname>tag::bitwise_or</classname> &gt;</type></typedef><typedef name="make_bitwise_xor"><type><classname>make_expr</classname>&lt; <classname>tag::bitwise_xor</classname> &gt;</type></typedef><typedef name="make_comma"><type><classname>make_expr</classname>&lt; <classname>tag::comma</classname> &gt;</type></typedef><typedef name="make_mem_ptr"><type><classname>make_expr</classname>&lt; <classname>tag::mem_ptr</classname> &gt;</type></typedef><typedef name="make_assign"><type><classname>make_expr</classname>&lt; <classname>tag::assign</classname> &gt;</type></typedef><typedef name="
make_shift_left_assign"><type><classname>make_expr</classname>&lt; <classname>tag::shift_left_assign</classname> &gt;</type></typedef><typedef name="make_shift_right_assign"><type><classname>make_expr</classname>&lt; <classname>tag::shift_right_assign</classname> &gt;</type></typedef><typedef name="make_multiplies_assign"><type><classname>make_expr</classname>&lt; <classname>tag::multiplies_assign</classname> &gt;</type></typedef><typedef name="make_divides_assign"><type><classname>make_expr</classname>&lt; <classname>tag::divides_assign</classname> &gt;</type></typedef><typedef name="make_modulus_assign"><type><classname>make_expr</classname>&lt; <classname>tag::modulus_assign</classname> &gt;</type></typedef><typedef name="make_plus_assign"><type><classname>make_expr</classname>&lt; <classname>tag::plus_assign</classname> &gt;</type></typedef><typedef name="make_minus_assign"><type><classname>make_expr</classname>&lt; <classname>tag::minus_assign</classname> &gt;</type></typedef><typedef name="make_bitwise
_and_assign"><type><classname>make_expr</classname>&lt; <classname>tag::bitwise_and_assign</classname> &gt;</type></typedef><typedef name="make_bitwise_or_assign"><type><classname>make_expr</classname>&lt; <classname>tag::bitwise_or_assign</classname> &gt;</type></typedef><typedef name="make_bitwise_xor_assign"><type><classname>make_expr</classname>&lt; <classname>tag::bitwise_xor_assign</classname> &gt;</type></typedef><typedef name="make_subscript"><type><classname>make_expr</classname>&lt; <classname>tag::subscript</classname> &gt;</type></typedef><typedef name="make_if_else"><type><classname>make_expr</classname>&lt; <classname>tag::if_else_</classname> &gt;</type></typedef><typedef name="make_function"><type><classname>make_expr</classname>&lt; <classname>tag::function</classname> &gt;</type></typedef></namespace><namespace name="generatorns_"/><namespace name="op"/><namespace name="refns_"/><namespace name="result_of"/><namespace name="tag"/><namespace name="transform"><struct name="callable"><typedef
name="proto_is_callable_"><type>void</type></typedef></struct><typedef name="arg0"><type><classname>arg_c</classname>&lt; 0 &gt;</type></typedef><typedef name="arg1"><type><classname>arg_c</classname>&lt; 1 &gt;</type></typedef><typedef name="arg2"><type><classname>arg_c</classname>&lt; 2 &gt;</type></typedef><typedef name="arg3"><type><classname>arg_c</classname>&lt; 3 &gt;</type></typedef><typedef name="arg4"><type><classname>arg_c</classname>&lt; 4 &gt;</type></typedef><typedef name="arg5"><type><classname>arg_c</classname>&lt; 5 &gt;</type></typedef><typedef name="arg6"><type><classname>arg_c</classname>&lt; 6 &gt;</type></typedef><typedef name="arg7"><type><classname>arg_c</classname>&lt; 7 &gt;</type></typedef><typedef name="arg8"><type><classname>arg_c</classname>&lt; 8 &gt;</type></typedef><typedef name="arg9"><type><classname>arg_c</classname>&lt; 9 &gt;</type></typedef><typedef name="arg"><type><classname>arg0</classname></type></typedef><typedef name="left"><type><classname>arg0</classname></type>
</typedef><typedef name="right"><type><classname>arg1</classname></type></typedef></namespace><namespace name="utility"/><namespace name="wildcardns_"/><typedef name="_make_terminal"><type><classname>functional::make_terminal</classname></type></typedef><typedef name="_make_posit"><type><classname>functional::make_posit</classname></type></typedef><typedef name="_make_negate"><type><classname>functional::make_negate</classname></type></typedef><typedef name="_make_dereference"><type><classname>functional::make_dereference</classname></type></typedef><typedef name="_make_complement"><type><classname>functional::make_complement</classname></type></typedef><typedef name="_make_address_of"><type><classname>functional::make_address_of</classname></type></typedef><typedef name="_make_logical_not"><type><classname>functional::make_logical_not</classname></type></typedef><typedef name="_make_pre_inc"><type><classname>functional::make_pre_inc</classname></type></typedef><typedef name="_make_pre_dec"><type><classname>
functional::make_pre_dec</classname></type></typedef><typedef name="_make_post_inc"><type><classname>functional::make_post_inc</classname></type></typedef><typedef name="_make_post_dec"><type><classname>functional::make_post_dec</classname></type></typedef><typedef name="_make_shift_left"><type><classname>functional::make_shift_left</classname></type></typedef><typedef name="_make_shift_right"><type><classname>functional::make_shift_right</classname></type></typedef><typedef name="_make_multiplies"><type><classname>functional::make_multiplies</classname></type></typedef><typedef name="_make_divides"><type><classname>functional::make_divides</classname></type></typedef><typedef name="_make_modulus"><type><classname>functional::make_modulus</classname></type></typedef><typedef name="_make_plus"><type><classname>functional::make_plus</classname></type></typedef><typedef name="_make_minus"><type><classname>functional::make_minus</classname></type></typedef><typedef name="_make_less"><type><classname>functional::
make_less</classname></type></typedef><typedef name="_make_greater"><type><classname>functional::make_greater</classname></type></typedef><typedef name="_make_less_equal"><type><classname>functional::make_less_equal</classname></type></typedef><typedef name="_make_greater_equal"><type><classname>functional::make_greater_equal</classname></type></typedef><typedef name="_make_equal_to"><type><classname>functional::make_equal_to</classname></type></typedef><typedef name="_make_not_equal_to"><type><classname>functional::make_not_equal_to</classname></type></typedef><typedef name="_make_logical_or"><type><classname>functional::make_logical_or</classname></type></typedef><typedef name="_make_logical_and"><type><classname>functional::make_logical_and</classname></type></typedef><typedef name="_make_bitwise_and"><type><classname>functional::make_bitwise_and</classname></type></typedef><typedef name="_make_bitwise_or"><type><classname>functional::make_bitwise_or</classname></type></typedef><typedef name="_make_bitwis
e_xor"><type><classname>functional::make_bitwise_xor</classname></type></typedef><typedef name="_make_comma"><type><classname>functional::make_comma</classname></type></typedef><typedef name="_make_mem_ptr"><type><classname>functional::make_mem_ptr</classname></type></typedef><typedef name="_make_assign"><type><classname>functional::make_assign</classname></type></typedef><typedef name="_make_shift_left_assign"><type><classname>functional::make_shift_left_assign</classname></type></typedef><typedef name="_make_shift_right_assign"><type><classname>functional::make_shift_right_assign</classname></type></typedef><typedef name="_make_multiplies_assign"><type><classname>functional::make_multiplies_assign</classname></type></typedef><typedef name="_make_divides_assign"><type><classname>functional::make_divides_assign</classname></type></typedef><typedef name="_make_modulus_assign"><type><classname>functional::make_modulus_assign</classname></type></typedef><typedef name="_make_plus_assign"><type><classname>functio
nal::make_plus_assign</classname></type></typedef><typedef name="_make_minus_assign"><type><classname>functional::make_minus_assign</classname></type></typedef><typedef name="_make_bitwise_and_assign"><type><classname>functional::make_bitwise_and_assign</classname></type></typedef><typedef name="_make_bitwise_or_assign"><type><classname>functional::make_bitwise_or_assign</classname></type></typedef><typedef name="_make_bitwise_xor_assign"><type><classname>functional::make_bitwise_xor_assign</classname></type></typedef><typedef name="_make_subscript"><type><classname>functional::make_subscript</classname></type></typedef><typedef name="_make_if_else"><type><classname>functional::make_if_else</classname></type></typedef><typedef name="_make_function"><type><classname>functional::make_function</classname></type></typedef><typedef name="_flatten"><type><classname>functional::flatten</classname></type></typedef><typedef name="_pop_front"><type><classname>functional::pop_front</classname></type></typedef><typedef
name="_reverse"><type><classname>functional::reverse</classname></type></typedef><typedef name="_eval"><type><classname>functional::deep_copy</classname></type></typedef><typedef name="_deep_copy"><type><classname>functional::deep_copy</classname></type></typedef><typedef name="_expr"><type><classname>transform::expr</classname></type></typedef><typedef name="_state"><type><classname>transform::state</classname></type></typedef><typedef name="_visitor"><type><classname>transform::visitor</classname></type></typedef><typedef name="_arg0"><type><classname>transform::arg0</classname></type></typedef><typedef name="_arg1"><type><classname>transform::arg1</classname></type></typedef><typedef name="_arg2"><type><classname>transform::arg2</classname></type></typedef><typedef name="_arg3"><type><classname>transform::arg3</classname></type></typedef><typedef name="_arg4"><type><classname>transform::arg4</classname></type></typedef><typedef name="_arg5"><type><classname>transform::arg5</classname></type></typedef><typ
edef name="_arg6"><type><classname>transform::arg6</classname></type></typedef><typedef name="_arg7"><type><classname>transform::arg7</classname></type></typedef><typedef name="_arg8"><type><classname>transform::arg8</classname></type></typedef><typedef name="_arg9"><type><classname>transform::arg9</classname></type></typedef><typedef name="_arg"><type><classname>transform::arg</classname></type></typedef><typedef name="_left"><type><classname>transform::left</classname></type></typedef><typedef name="_right"><type><classname>transform::right</classname></type></typedef></namespace></namespace></header><header name="boost/xpressive/proto/ref.hpp"><para>Utility for storing a sub-expr by reference </para><namespace name="boost"><namespace name="proto"><namespace name="functional"><struct name="unref"><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="T"/>
- </template><specialization><template-arg>This(T)</template-arg></specialization></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>T &amp;</type><template>
+ </template><specialization><template-arg>This(T)</template-arg></specialization><inherit access="public">boost::proto::result_of::unref&lt; boost::remove_const&lt; boost::remove_reference&lt; T &gt;::type &gt;::type &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>T &amp;</type><template>
           <template-type-parameter name="T"/>
         </template><parameter name="t"><paramtype>T &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>T const &amp;</type><template>
           <template-type-parameter name="T"/>
         </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>T &amp;</type><template>
           <template-type-parameter name="T"/>
- </template><parameter name="t"><paramtype><classname>ref_</classname>&lt; T &gt; &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>T &amp;</type><template>
+ </template><parameter name="t"><paramtype>ref_&lt; T &gt; &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>T &amp;</type><template>
           <template-type-parameter name="T"/>
- </template><parameter name="t"><paramtype><classname>ref_</classname>&lt; T &gt; const &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="refns_"><struct name="ref_"><template>
+ </template><parameter name="t"><paramtype>ref_&lt; T &gt; const &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="refns_"><struct name="ref_"><template>
       <template-type-parameter name="Expr"/>
- </template><typedef name="proto_base_expr"><type>Expr::proto_base_expr</type></typedef><typedef name="proto_tag"><type>Expr::proto_tag</type></typedef><typedef name="proto_args"><type>Expr::proto_args</type></typedef><typedef name="proto_arity"><type>Expr::proto_arity</type></typedef><typedef name="proto_domain"><type>Expr::proto_domain</type></typedef><typedef name="fusion_tag"><type>tag::proto_ref</type></typedef><typedef name="proto_is_ref_"><type>void</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>Expr</type></typedef><typedef name="proto_arg0"><type>Expr::proto_arg0</type></typedef><typedef name="proto_arg1"><type>Expr::proto_arg1</type></typedef><typedef name="proto_arg2"><type>Expr::proto_arg2</type></typedef><typedef name="proto_arg3"><type>Expr::proto_arg3</type></typedef><typedef name="proto_arg4"><type>Expr::proto_arg4</type></typedef><method-group name="public member functions"><method name="proto_base" cv="const"><type>mpl:
:if_&lt; is_const &lt; Expr &gt;, proto_base_expr const &amp;, proto_base_expr &amp; &gt;::type</type></method></method-group><data-member name="expr"><type>Expr &amp;</type></data-member><method-group name="public static functions"><method name="make" cv=""><type>static <classname>ref_</classname>&lt; Expr &gt;</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="ref_"><template>
+ </template><typedef name="proto_base_expr"><type>Expr::proto_base_expr</type></typedef><typedef name="proto_tag"><type>Expr::proto_tag</type></typedef><typedef name="proto_args"><type>Expr::proto_args</type></typedef><typedef name="proto_arity"><type>Expr::proto_arity</type></typedef><typedef name="proto_domain"><type>Expr::proto_domain</type></typedef><typedef name="proto_is_ref_"><type>void</type></typedef><typedef name="proto_is_expr_"><type>void</type></typedef><typedef name="proto_derived_expr"><type>Expr</type></typedef><typedef name="proto_arg0"><type>Expr::proto_arg0</type></typedef><typedef name="proto_arg1"><type>Expr::proto_arg1</type></typedef><typedef name="proto_arg2"><type>Expr::proto_arg2</type></typedef><typedef name="proto_arg3"><type>Expr::proto_arg3</type></typedef><typedef name="proto_arg4"><type>Expr::proto_arg4</type></typedef><data-member name="expr"><type>Expr &amp;</type></data-member><method-group name="public member functions"><method name="proto_base" cv="const"><type>mpl::i
f_&lt; is_const&lt; Expr &gt;, proto_base_expr const &amp;, proto_base_expr &amp; &gt;::type</type></method></method-group><method-group name="public static functions"><method name="make" cv=""><type>static <classname>ref_</classname>&lt; Expr &gt;</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="ref_"><template>
       <template-type-parameter name="Expr"/>
     </template><specialization><template-arg>ref_&lt; Expr &gt;</template-arg></specialization></struct-specialization></namespace><namespace name="result_of"><struct name="unref"><template>
       <template-type-parameter name="T"/>
     </template><typedef name="type"><type>T</type></typedef><typedef name="reference"><type>T &amp;</type></typedef><typedef name="const_reference"><type>T const &amp;</type></typedef></struct><struct-specialization name="unref"><template>
       <template-type-parameter name="T"/>
- </template><specialization><template-arg>ref_&lt; T &gt;</template-arg></specialization><typedef name="type"><type>T::proto_derived_expr</type></typedef><typedef name="reference"><type>T &amp;</type></typedef><typedef name="const_reference"><type>T &amp;</type></typedef></struct-specialization><struct-specialization name="unref"><template>
+ </template><specialization><template-arg>ref_&lt; T &gt;</template-arg></specialization><typedef name="type"><type>T</type></typedef><typedef name="reference"><type>T &amp;</type></typedef><typedef name="const_reference"><type>T &amp;</type></typedef></struct-specialization><struct-specialization name="unref"><template>
+ <template-type-parameter name="T"/>
+ </template><specialization><template-arg>ref_&lt; T const &gt;</template-arg></specialization><typedef name="type"><type>T</type></typedef><typedef name="reference"><type>T const &amp;</type></typedef><typedef name="const_reference"><type>T const &amp;</type></typedef></struct-specialization><struct-specialization name="unref"><template>
       <template-type-parameter name="T"/>
     </template><specialization><template-arg>T &amp;</template-arg></specialization><typedef name="type"><type>T</type></typedef><typedef name="reference"><type>T &amp;</type></typedef><typedef name="const_reference"><type>T &amp;</type></typedef></struct-specialization><struct-specialization name="unref"><template>
       <template-type-parameter name="T"/>
- </template><specialization><template-arg>T const &amp;</template-arg></specialization><typedef name="type"><type>T</type></typedef><typedef name="reference"><type>T const &amp;</type></typedef><typedef name="const_reference"><type>T const &amp;</type></typedef></struct-specialization></namespace><data-member name="unref"><type><classname>functional::unref</classname> const</type></data-member></namespace></namespace></header><header name="boost/xpressive/proto/tags.hpp"><para>Contains the tags for all the overloadable operators in C++ </para><namespace name="boost"><namespace name="proto"><namespace name="tag"><struct name="terminal"><purpose>Tag type for terminals; aka, leaves in the expression tree. </purpose></struct><struct name="posit"><purpose>Tag type for the unary + operator. </purpose></struct><struct name="negate"><purpose>Tag type for the unary - operator. </purpose></struct><struct name="dereference"><purpose>Tag type for the unary * operator. </purpose></struct><struct name="complement"><pu
rpose>Tag type for the unary ~ operator. </purpose></struct><struct name="address_of"><purpose>Tag type for the unary &amp; operator. </purpose></struct><struct name="logical_not"><purpose>Tag type for the unary ! operator. </purpose></struct><struct name="pre_inc"><purpose>Tag type for the unary prefix ++ operator. </purpose></struct><struct name="pre_dec"><purpose>Tag type for the unary prefix -- operator. </purpose></struct><struct name="post_inc"><purpose>Tag type for the unary postfix ++ operator. </purpose></struct><struct name="post_dec"><purpose>Tag type for the unary postfix -- operator. </purpose></struct><struct name="shift_left"><purpose>Tag type for the binary &lt;&lt; operator. </purpose></struct><struct name="shift_right"><purpose>Tag type for the binary &gt;&gt; operator. </purpose></struct><struct name="multiplies"><purpose>Tag type for the binary * operator. </purpose></struct><struct name="divides"><purpose>Tag type for the binary / operator. </purpose></struct><struct name="modulus"><purp
ose>Tag type for the binary % operator. </purpose></struct><struct name="plus"><purpose>Tag type for the binary + operator. </purpose></struct><struct name="minus"><purpose>Tag type for the binary - operator. </purpose></struct><struct name="less"><purpose>Tag type for the binary &lt; operator. </purpose></struct><struct name="greater"><purpose>Tag type for the binary &gt; operator. </purpose></struct><struct name="less_equal"><purpose>Tag type for the binary &lt;= operator. </purpose></struct><struct name="greater_equal"><purpose>Tag type for the binary &gt;= operator. </purpose></struct><struct name="equal_to"><purpose>Tag type for the binary == operator. </purpose></struct><struct name="not_equal_to"><purpose>Tag type for the binary != operator. </purpose></struct><struct name="logical_or"><purpose>Tag type for the binary || operator. </purpose></struct><struct name="logical_and"><purpose>Tag type for the binary &amp;&amp; operator. </purpose></struct><struct name="bitwise_and"><purpose>Tag type for the b
inary &amp; operator. </purpose></struct><struct name="bitwise_or"><purpose>Tag type for the binary | operator. </purpose></struct><struct name="bitwise_xor"><purpose>Tag type for the binary ^ operator. </purpose></struct><struct name="comma"><purpose>Tag type for the binary , operator. </purpose></struct><struct name="mem_ptr"><purpose>Tag type for the binary -&gt;* operator. </purpose></struct><struct name="assign"><purpose>Tag type for the binary = operator. </purpose></struct><struct name="shift_left_assign"><purpose>Tag type for the binary &lt;&lt;= operator. </purpose></struct><struct name="shift_right_assign"><purpose>Tag type for the binary &gt;&gt;= operator. </purpose></struct><struct name="multilpies_assign"><purpose>Tag type for the binary *= operator. </purpose></struct><struct name="divides_assign"><purpose>Tag type for the binary /= operator. </purpose></struct><struct name="modulus_assign"><purpose>Tag type for the binary = operator. </purpose></struct><struct name="plus_assign"><purpose>Tag
type for the binary += operator. </purpose></struct><struct name="minus_assign"><purpose>Tag type for the binary -= operator. </purpose></struct><struct name="bitwise_and_assign"><purpose>Tag type for the binary &amp;= operator. </purpose></struct><struct name="bitwise_or_assign"><purpose>Tag type for the binary |= operator. </purpose></struct><struct name="bitwise_xor_assign"><purpose>Tag type for the binary ^= operator. </purpose></struct><struct name="subscript"><purpose>Tag type for the binary subscript operator. </purpose></struct><struct name="if_else_"><purpose>Tag type for the ternary ?: conditional operator. </purpose></struct><struct name="function"><purpose>Tag type for the nary function call operator. </purpose></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/traits.hpp"><para>Contains definitions for arg&lt;&gt;, arg_c&lt;&gt;, left&lt;&gt;, right&lt;&gt;, tag&lt;&gt;, and the helper functions arg(), arg_c(), left() and right(). </para><namespace name="bo
ost"><namespace name="proto"><namespace name="functional"><struct name="as_expr"><template>
+ </template><specialization><template-arg>T const &amp;</template-arg></specialization><typedef name="type"><type>T</type></typedef><typedef name="reference"><type>T const &amp;</type></typedef><typedef name="const_reference"><type>T const &amp;</type></typedef></struct-specialization></namespace><data-member name="unref"><type><classname>functional::unref</classname> const</type></data-member></namespace></namespace></header><header name="boost/xpressive/proto/tags.hpp"><para>Contains the tags for all the overloadable operators in C++ </para><namespace name="boost"><namespace name="proto"><namespace name="tag"><struct name="terminal"><purpose>Tag type for terminals; aka, leaves in the expression tree. </purpose></struct><struct name="posit"><purpose>Tag type for the unary + operator. </purpose></struct><struct name="negate"><purpose>Tag type for the unary - operator. </purpose></struct><struct name="dereference"><purpose>Tag type for the unary * operator. </purpose></struct><struct name="complement"><pu
rpose>Tag type for the unary ~ operator. </purpose></struct><struct name="address_of"><purpose>Tag type for the unary &amp; operator. </purpose></struct><struct name="logical_not"><purpose>Tag type for the unary ! operator. </purpose></struct><struct name="pre_inc"><purpose>Tag type for the unary prefix ++ operator. </purpose></struct><struct name="pre_dec"><purpose>Tag type for the unary prefix -- operator. </purpose></struct><struct name="post_inc"><purpose>Tag type for the unary postfix ++ operator. </purpose></struct><struct name="post_dec"><purpose>Tag type for the unary postfix -- operator. </purpose></struct><struct name="shift_left"><purpose>Tag type for the binary &lt;&lt; operator. </purpose></struct><struct name="shift_right"><purpose>Tag type for the binary &gt;&gt; operator. </purpose></struct><struct name="multiplies"><purpose>Tag type for the binary * operator. </purpose></struct><struct name="divides"><purpose>Tag type for the binary / operator. </purpose></struct><struct name="modulus"><purp
ose>Tag type for the binary % operator. </purpose></struct><struct name="plus"><purpose>Tag type for the binary + operator. </purpose></struct><struct name="minus"><purpose>Tag type for the binary - operator. </purpose></struct><struct name="less"><purpose>Tag type for the binary &lt; operator. </purpose></struct><struct name="greater"><purpose>Tag type for the binary &gt; operator. </purpose></struct><struct name="less_equal"><purpose>Tag type for the binary &lt;= operator. </purpose></struct><struct name="greater_equal"><purpose>Tag type for the binary &gt;= operator. </purpose></struct><struct name="equal_to"><purpose>Tag type for the binary == operator. </purpose></struct><struct name="not_equal_to"><purpose>Tag type for the binary != operator. </purpose></struct><struct name="logical_or"><purpose>Tag type for the binary || operator. </purpose></struct><struct name="logical_and"><purpose>Tag type for the binary &amp;&amp; operator. </purpose></struct><struct name="bitwise_and"><purpose>Tag type for the b
inary &amp; operator. </purpose></struct><struct name="bitwise_or"><purpose>Tag type for the binary | operator. </purpose></struct><struct name="bitwise_xor"><purpose>Tag type for the binary ^ operator. </purpose></struct><struct name="comma"><purpose>Tag type for the binary , operator. </purpose></struct><struct name="mem_ptr"><purpose>Tag type for the binary -&gt;* operator. </purpose></struct><struct name="assign"><purpose>Tag type for the binary = operator. </purpose></struct><struct name="shift_left_assign"><purpose>Tag type for the binary &lt;&lt;= operator. </purpose></struct><struct name="shift_right_assign"><purpose>Tag type for the binary &gt;&gt;= operator. </purpose></struct><struct name="multiplies_assign"><purpose>Tag type for the binary *= operator. </purpose></struct><struct name="divides_assign"><purpose>Tag type for the binary /= operator. </purpose></struct><struct name="modulus_assign"><purpose>Tag type for the binary = operator. </purpose></struct><struct name="plus_assign"><purpose>Tag
type for the binary += operator. </purpose></struct><struct name="minus_assign"><purpose>Tag type for the binary -= operator. </purpose></struct><struct name="bitwise_and_assign"><purpose>Tag type for the binary &amp;= operator. </purpose></struct><struct name="bitwise_or_assign"><purpose>Tag type for the binary |= operator. </purpose></struct><struct name="bitwise_xor_assign"><purpose>Tag type for the binary ^= operator. </purpose></struct><struct name="subscript"><purpose>Tag type for the binary subscript operator. </purpose></struct><struct name="if_else_"><purpose>Tag type for the ternary ?: conditional operator. </purpose></struct><struct name="function"><purpose>Tag type for the nary function call operator. </purpose></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/traits.hpp"><para>Contains definitions for arg&lt;&gt;, arg_c&lt;&gt;, left&lt;&gt;, right&lt;&gt;, tag&lt;&gt;, and the helper functions arg(), arg_c(), left() and right(). </para><namespace name="bo
ost"><namespace name="proto"><struct name="is_callable"><template>
+ <template-type-parameter name="T"/>
+ </template></struct><struct name="is_aggregate"><template>
+ <template-type-parameter name="T"/>
+ </template><description><para>is_aggregate </para></description></struct><struct-specialization name="is_aggregate"><template>
+ <template-type-parameter name="Tag"/>
+ <template-type-parameter name="Args"/>
+ <template-nontype-parameter name="N"><type>long</type></template-nontype-parameter>
+ </template><specialization><template-arg>proto::expr&lt; Tag</template-arg><template-arg>Args</template-arg><template-arg>N &gt;</template-arg></specialization><inherit access="public">boost::mpl::true_</inherit></struct-specialization><namespace name="functional"><struct name="as_expr"><template>
       <template-type-parameter name="Domain"/>
- </template><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="T"/>
     </template><specialization><template-arg>This(T)</template-arg></specialization><inherit access="public">boost::proto::result_of::as_expr&lt; remove_reference&lt; T &gt;::type, Domain &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::as_expr</classname>&lt; T, Domain &gt;::result_type</type><template>
@@ -1561,9 +1551,7 @@
           <template-type-parameter name="T"/>
         </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></method></method-group></struct><struct name="as_arg"><template>
       <template-type-parameter name="Domain"/>
- </template><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="T"/>
     </template><specialization><template-arg>This(T)</template-arg></specialization><inherit access="public">boost::proto::result_of::as_arg&lt; remove_reference&lt; T &gt;::type, Domain &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::as_arg</classname>&lt; T, Domain &gt;::type</type><template>
@@ -1572,9 +1560,7 @@
           <template-type-parameter name="T"/>
         </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></method></method-group></struct><struct name="arg_c"><template>
       <template-nontype-parameter name="N"><type>long</type></template-nontype-parameter>
- </template><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
     </template><specialization><template-arg>This(Expr)</template-arg></specialization></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result_of::arg_c&lt; Expr, N &gt;::reference</type><template>
@@ -1583,230 +1569,245 @@
           <template-type-parameter name="Expr"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="arg"><template>
       <template-type-parameter name="N"/>
- </template><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>This(Expr)</template-arg></specialization></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::arg</classname>&lt; Expr, N &gt;::reference</type><template>
+ </template><specialization><template-arg>This(Expr)</template-arg></specialization><inherit access="public">boost::proto::result_of::arg&lt; boost::remove_const&lt; boost::remove_reference&lt; Expr &gt;::type &gt;::type, N &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::arg</classname>&lt; Expr, N &gt;::reference</type><template>
           <template-type-parameter name="Expr"/>
         </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::arg</classname>&lt; Expr, N &gt;::const_reference</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="left"><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="left"><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>This(Expr)</template-arg></specialization></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::left</classname>&lt; Expr &gt;::reference</type><template>
+ </template><specialization><template-arg>This(Expr)</template-arg></specialization><inherit access="public">boost::proto::result_of::left&lt; boost::remove_const&lt; boost::remove_reference&lt; Expr &gt;::type &gt;::type &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::left</classname>&lt; Expr &gt;::reference</type><template>
           <template-type-parameter name="Expr"/>
         </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::left</classname>&lt; Expr &gt;::const_reference</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="right"><struct name="result"><template>
- <template-type-parameter name="Sig"/>
- </template></struct><struct-specialization name="result"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct><struct name="right"><struct-specialization name="result"><template>
       <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>This(Expr)</template-arg></specialization></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::right</classname>&lt; Expr &gt;::reference</type><template>
+ </template><specialization><template-arg>This(Expr)</template-arg></specialization><inherit access="public">boost::proto::result_of::right&lt; boost::remove_const&lt; boost::remove_reference&lt; Expr &gt;::type &gt;::type &gt;</inherit></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type><classname>result_of::right</classname>&lt; Expr &gt;::reference</type><template>
           <template-type-parameter name="Expr"/>
         </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type><classname>result_of::right</classname>&lt; Expr &gt;::const_reference</type><template>
           <template-type-parameter name="Expr"/>
         </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="op"><struct name="terminal"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_identity_transform</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::terminal</classname>, <classname>args0</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::terminal</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="if_else_"><template>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>Expr</type></typedef></struct-specialization><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::terminal</classname>, <classname>args0</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::terminal</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>Expr const &amp;</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="if_else_"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
       <template-type-parameter name="V"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::if_else_</classname>, <classname>args3</classname>&lt; T, U, V &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::if_else_</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><typedef name="proto_arg2"><type>V</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="unary_expr"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::if_else_</classname>, <classname>args3</classname>&lt; T, U, V &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::if_else_</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><typedef name="proto_arg2"><type>V</type></typedef></struct><struct name="unary_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; Tag, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="binary_expr"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; Tag, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="binary_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; Tag, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="posit"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; Tag, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="posit"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::posit</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::posit</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="negate"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::posit</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::posit</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="negate"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::negate</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::negate</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="dereference"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::negate</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::negate</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="dereference"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::dereference</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::dereference</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="complement"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::dereference</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::dereference</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="complement"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::complement</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::complement</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="address_of"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::complement</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::complement</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="address_of"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::address_of</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::address_of</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="logical_not"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::address_of</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::address_of</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="logical_not"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::logical_not</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::logical_not</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="pre_inc"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::logical_not</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::logical_not</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="pre_inc"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::pre_inc</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::pre_inc</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="pre_dec"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::pre_inc</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::pre_inc</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="pre_dec"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::pre_dec</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::pre_dec</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="post_inc"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::pre_dec</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::pre_dec</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="post_inc"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::post_inc</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::post_inc</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="post_dec"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::post_inc</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::post_inc</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="post_dec"><template>
       <template-type-parameter name="T"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::post_dec</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::post_dec</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="shift_left"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::post_dec</classname>, <classname>args1</classname>&lt; T &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::post_dec</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef></struct><struct name="shift_left"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::shift_left</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_left</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="shift_right"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::shift_left</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_left</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="shift_right"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::shift_right</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_right</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="multiplies"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::shift_right</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_right</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="multiplies"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::multiplies</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::multiplies</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="divides"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::multiplies</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::multiplies</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="divides"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::divides</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::divides</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="modulus"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::divides</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::divides</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="modulus"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::modulus</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::modulus</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="plus"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::modulus</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::modulus</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="plus"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::plus</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::plus</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="minus"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::plus</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::plus</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="minus"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::minus</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::minus</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="less"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::minus</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::minus</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="less"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::less</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::less</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="greater"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::less</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::less</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="greater"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::greater</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::greater</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="less_equal"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::greater</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::greater</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="less_equal"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::less_equal</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::less_equal</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="greater_equal"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::less_equal</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::less_equal</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="greater_equal"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::greater_equal</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::greater_equal</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="equal_to"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::greater_equal</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::greater_equal</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="equal_to"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::equal_to</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::equal_to</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="not_equal_to"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::equal_to</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::equal_to</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="not_equal_to"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::not_equal_to</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::not_equal_to</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="logical_or"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::not_equal_to</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::not_equal_to</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="logical_or"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::logical_or</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::logical_or</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="logical_and"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::logical_or</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::logical_or</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="logical_and"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::logical_and</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::logical_and</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="bitwise_and"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::logical_and</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::logical_and</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="bitwise_and"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::bitwise_and</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_and</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="bitwise_or"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::bitwise_and</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_and</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="bitwise_or"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::bitwise_or</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_or</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="bitwise_xor"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::bitwise_or</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_or</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="bitwise_xor"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::bitwise_xor</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_xor</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="comma"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::bitwise_xor</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_xor</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="comma"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::comma</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::comma</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="mem_ptr"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::comma</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::comma</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="mem_ptr"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::mem_ptr</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::mem_ptr</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::mem_ptr</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::mem_ptr</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="shift_left_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="shift_left_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::shift_left_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_left_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="shift_right_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::shift_left_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_left_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="shift_right_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::shift_right_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_right_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="multilpies_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::shift_right_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::shift_right_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="multiplies_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::multilpies_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::multilpies_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="divides_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::multiplies_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::multiplies_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="divides_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::divides_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::divides_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="modulus_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::divides_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::divides_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="modulus_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::modulus_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::modulus_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="plus_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::modulus_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::modulus_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="plus_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::plus_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::plus_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="minus_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::plus_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::plus_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="minus_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::minus_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::minus_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="bitwise_and_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::minus_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::minus_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="bitwise_and_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::bitwise_and_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_and_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="bitwise_or_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::bitwise_and_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_and_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="bitwise_or_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::bitwise_or_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_or_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="bitwise_xor_assign"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::bitwise_or_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_or_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="bitwise_xor_assign"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::bitwise_xor_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_xor_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct name="subscript"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::bitwise_xor_assign</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::bitwise_xor_assign</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct name="subscript"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="U"/>
- </template><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::subscript</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef><method-group name="public member functions"/><constructor/></struct><struct-specialization name="function"><template>
+ </template><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::subscript</classname>, <classname>args2</classname>&lt; T, U &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::subscript</classname></type></typedef><typedef name="proto_arg0"><type>T</type></typedef><typedef name="proto_arg1"><type>U</type></typedef></struct><struct-specialization name="function"><template>
       <template-type-parameter name="A0"/>
- </template><specialization><template-arg>A0</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; A0 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></ty
pedef></struct-specialization><struct-specialization name="nary_expr"><template>
+ </template><specialization><template-arg>A0</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args1</classname>&lt; A0 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-spec
ialization name="nary_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="A0"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; Tag, <classname>args1</classname>&lt; A0 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specializa
tion name="function"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; Tag, <classname>args1</classname>&lt; A0 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="function"><template>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
- </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::function</classname>, <classname>args2</classname>&lt; A0, A1 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specializatio
n><struct-specialization name="nary_expr"><template>
+ </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args2</classname>&lt; A0, A1 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="nary_expr">
<template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; Tag, <classname>args2</classname>&lt; A0, A1 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="function"><templa
te>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; Tag, <classname>args2</classname>&lt; A0, A1 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="function"><template>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
- </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::function</classname>, <classname>args3</classname>&lt; A0, A1, A2 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization nam
e="nary_expr"><template>
+ </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args3</classname>&lt; A0, A1, A2 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="nary_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; Tag, <classname>args3</classname>&lt; A0, A1, A2 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="function"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>void</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; Tag, <classname>args3</classname>&lt; A0, A1, A2 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="function"><template>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
- </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::function</classname>, <classname>args4</classname>&lt; A0, A1, A2, A3 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="nary_expr"><template>
+ </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args4</classname>&lt; A0, A1, A2, A3 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="nary_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; Tag, <classname>args4</classname>&lt; A0, A1, A2, A3 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="function"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>void</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; Tag, <classname>args4</classname>&lt; A0, A1, A2, A3 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><struct-specialization name="function"><template>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
       <template-type-parameter name="A4"/>
- </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; <classname>proto::tag::function</classname>, <classname>args5</classname>&lt; A0, A1, A2, A3, A4 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type>A4</type></typedef></struct-specialization><struct-specialization name="nary_expr"><template>
+ </template><specialization><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; <classname>proto::tag::function</classname>, <classname>args5</classname>&lt; A0, A1, A2, A3, A4 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type><classname>proto::tag::function</classname></type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type>A4</type></typedef></struct-specialization><struct-specialization name="nary_expr"><template>
       <template-type-parameter name="Tag"/>
       <template-type-parameter name="A0"/>
       <template-type-parameter name="A1"/>
       <template-type-parameter name="A2"/>
       <template-type-parameter name="A3"/>
       <template-type-parameter name="A4"/>
- </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4</template-arg><template-arg>void</template-arg></specialization><inherit access="public">boost::proto::has_transformns_::has_pass_through_transform&lt; Grammar &gt;</inherit><typedef name="type"><type>expr&lt; Tag, <classname>args5</classname>&lt; A0, A1, A2, A3, A4 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type>A4</type></typedef></struct-specialization></namespace><namespace name="result_of"><struct name="is_ref"><template>
+ </template><specialization><template-arg>Tag</template-arg><template-arg>A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4</template-arg><template-arg>void</template-arg></specialization><typedef name="proto_is_callable_"><type>int</type></typedef><typedef name="type"><type>proto::expr&lt; Tag, <classname>args5</classname>&lt; A0, A1, A2, A3, A4 &gt; &gt;</type></typedef><typedef name="proto_base_expr"><type>type</type></typedef><typedef name="proto_tag"><type>Tag</type></typedef><typedef name="proto_arg0"><type>A0</type></typedef><typedef name="proto_arg1"><type>A1</type></typedef><typedef name="proto_arg2"><type>A2</type></typedef><typedef name="proto_arg3"><type>A3</type></typedef><typedef name="proto_arg4"><type>A4</type></typedef></struct-specialization></namespace><namespace name="result_of"><struct name="is_ref"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="EnableIf"/>
- </template></struct><struct name="is_expr"><template>
+ </template><inherit access="public">boost::mpl::false_</inherit></struct><struct-specialization name="is_ref"><template>
+ <template-type-parameter name="T"/>
+ </template><specialization><template-arg>T</template-arg><template-arg>typename T::proto_is_ref_</template-arg></specialization><inherit access="public">boost::mpl::true_</inherit></struct-specialization><struct name="is_expr"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="EnableIf"/>
- </template></struct><struct name="tag_of"><template>
- <template-type-parameter name="Expr"/>
- </template><typedef name="type"><type>Expr::proto_tag</type></typedef></struct><struct name="id"><template>
+ </template><inherit access="public">boost::mpl::false_</inherit></struct><struct-specialization name="is_expr"><template>
+ <template-type-parameter name="T"/>
+ </template><specialization><template-arg>T</template-arg><template-arg>typename T::proto_is_expr_</template-arg></specialization><inherit access="public">boost::mpl::true_</inherit></struct-specialization><struct name="tag_of"><template>
       <template-type-parameter name="Expr"/>
- </template><inherit access="public">boost::proto::result_of::deep_copy&lt; Expr &gt;</inherit></struct><struct name="as_expr"><template>
+ </template><typedef name="type"><type>Expr::proto_tag</type></typedef></struct><struct name="as_expr"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="Domain"/>
       <template-type-parameter name="EnableIf"/>
- </template><typedef name="proto_arg0"><type>mpl::eval_if&lt; mpl::or_&lt; boost::is_array&lt; T &gt;, is_function&lt; T &gt; &gt;, add_reference&lt; T &gt;, remove_cv&lt; T &gt;&gt;::type</type></typedef><typedef name="expr_type"><type>expr&lt; <classname>proto::tag::terminal</classname>, <classname>args0</classname>&lt; proto_arg0 &gt; &gt;</type></typedef><typedef name="type"><type>Domain::template apply&lt; expr_type &gt;::type</type></typedef><typedef name="result_type"><type>type const</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static result_type</type><template>
+ </template><typedef name="proto_arg0"><type>mpl::eval_if&lt; mpl::or_&lt; boost::is_array&lt; T &gt;, is_function&lt; T &gt; &gt;, add_reference&lt; T &gt;, remove_cv&lt; T &gt;&gt;::type</type></typedef><typedef name="expr_type"><type>proto::expr&lt; <classname>proto::tag::terminal</classname>, <classname>args0</classname>&lt; proto_arg0 &gt; &gt;</type></typedef><typedef name="type"><type>Domain::template apply&lt; expr_type &gt;::type</type></typedef><typedef name="result_type"><type>type const</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static result_type</type><template>
           <template-type-parameter name="T2"/>
- </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct><struct name="as_arg"><template>
+ </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="as_expr"><template>
+ <template-type-parameter name="T"/>
+ <template-type-parameter name="Domain"/>
+ </template><specialization><template-arg>T</template-arg><template-arg>Domain</template-arg><template-arg>typename T::proto_is_expr_</template-arg></specialization><typedef name="type"><type>T::proto_derived_expr</type></typedef><typedef name="result_type"><type>T &amp;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static result_type</type><template>
+ <template-type-parameter name="T2"/>
+ </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct-specialization><struct name="as_arg"><template>
       <template-type-parameter name="T"/>
       <template-type-parameter name="Domain"/>
       <template-type-parameter name="EnableIf"/>
- </template><typedef name="expr_type"><type>expr&lt; <classname>proto::tag::terminal</classname>, <classname>args0</classname>&lt; T &amp; &gt; &gt;</type></typedef><typedef name="type"><type>Domain::template apply&lt; expr_type &gt;::type</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type</type><template>
+ </template><typedef name="expr_type"><type>proto::expr&lt; <classname>proto::tag::terminal</classname>, <classname>args0</classname>&lt; T &amp; &gt; &gt;</type></typedef><typedef name="type"><type>Domain::template apply&lt; expr_type &gt;::type</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type</type><template>
+ <template-type-parameter name="T2"/>
+ </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="as_arg"><template>
+ <template-type-parameter name="T"/>
+ <template-type-parameter name="Domain"/>
+ </template><specialization><template-arg>T</template-arg><template-arg>Domain</template-arg><template-arg>typename T::proto_is_expr_</template-arg></specialization><typedef name="type"><type>ref_&lt; T &gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static type</type><template>
           <template-type-parameter name="T2"/>
- </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct><struct name="arg"><template>
+ </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct-specialization><struct name="arg"><template>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="N"/>
     </template></struct><struct name="left"><template>
@@ -1815,43 +1816,29 @@
       <template-type-parameter name="Expr"/>
     </template><inherit access="public">boost::proto::result_of::unref&lt; Expr::proto_arg1 &gt;</inherit></struct><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>0</template-arg></specialization><inherit access="public">boost::proto::result_of::unref&lt; Expr::proto_arg0 &gt;</inherit><method-group name="public static functions"><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 0 &gt;::reference</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 0 &gt;::const_reference</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="arg_c"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>0</template-arg></specialization><typedef name="wrapped_type"><type>Expr::proto_arg0</type></typedef><typedef name="type"><type><classname>unref</classname>&lt; wrapped_type &gt;::type</type></typedef><typedef name="reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::reference</type></typedef><typedef name="const_reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::const_reference</type></typedef><method-group name="public static functions"/></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
     </template><specialization><template-arg>Expr const</template-arg><template-arg>0</template-arg></specialization><inherit access="public">boost::proto::result_of::arg_c&lt; Expr, 0 &gt;</inherit></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>1</template-arg></specialization><inherit access="public">boost::proto::result_of::unref&lt; Expr::proto_arg1 &gt;</inherit><method-group name="public static functions"><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 1 &gt;::reference</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 1 &gt;::const_reference</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="arg_c"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>1</template-arg></specialization><typedef name="wrapped_type"><type>Expr::proto_arg1</type></typedef><typedef name="type"><type><classname>unref</classname>&lt; wrapped_type &gt;::type</type></typedef><typedef name="reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::reference</type></typedef><typedef name="const_reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::const_reference</type></typedef><method-group name="public static functions"/></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
     </template><specialization><template-arg>Expr const</template-arg><template-arg>1</template-arg></specialization><inherit access="public">boost::proto::result_of::arg_c&lt; Expr, 1 &gt;</inherit></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>2</template-arg></specialization><inherit access="public">boost::proto::result_of::unref&lt; Expr::proto_arg2 &gt;</inherit><method-group name="public static functions"><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 2 &gt;::reference</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 2 &gt;::const_reference</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="arg_c"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>2</template-arg></specialization><typedef name="wrapped_type"><type>Expr::proto_arg2</type></typedef><typedef name="type"><type><classname>unref</classname>&lt; wrapped_type &gt;::type</type></typedef><typedef name="reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::reference</type></typedef><typedef name="const_reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::const_reference</type></typedef><method-group name="public static functions"/></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
     </template><specialization><template-arg>Expr const</template-arg><template-arg>2</template-arg></specialization><inherit access="public">boost::proto::result_of::arg_c&lt; Expr, 2 &gt;</inherit></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>3</template-arg></specialization><inherit access="public">boost::proto::result_of::unref&lt; Expr::proto_arg3 &gt;</inherit><method-group name="public static functions"><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 3 &gt;::reference</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 3 &gt;::const_reference</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="arg_c"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>3</template-arg></specialization><typedef name="wrapped_type"><type>Expr::proto_arg3</type></typedef><typedef name="type"><type><classname>unref</classname>&lt; wrapped_type &gt;::type</type></typedef><typedef name="reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::reference</type></typedef><typedef name="const_reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::const_reference</type></typedef><method-group name="public static functions"/></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
     </template><specialization><template-arg>Expr const</template-arg><template-arg>3</template-arg></specialization><inherit access="public">boost::proto::result_of::arg_c&lt; Expr, 3 &gt;</inherit></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>4</template-arg></specialization><inherit access="public">boost::proto::result_of::unref&lt; Expr::proto_arg4 &gt;</inherit><method-group name="public static functions"><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 4 &gt;::reference</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 4 &gt;::const_reference</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="arg_c"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>4</template-arg></specialization><typedef name="wrapped_type"><type>Expr::proto_arg4</type></typedef><typedef name="type"><type><classname>unref</classname>&lt; wrapped_type &gt;::type</type></typedef><typedef name="reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::reference</type></typedef><typedef name="const_reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::const_reference</type></typedef><method-group name="public static functions"/></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
     </template><specialization><template-arg>Expr const</template-arg><template-arg>4</template-arg></specialization><inherit access="public">boost::proto::result_of::arg_c&lt; Expr, 4 &gt;</inherit></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>Expr</template-arg><template-arg>5</template-arg></specialization><inherit access="public">boost::proto::result_of::unref&lt; Expr::proto_arg5 &gt;</inherit><method-group name="public static functions"><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 5 &gt;::reference</type><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></method><method name="call" cv=""><type>static <classname>arg_c</classname>&lt; Expr, 5 &gt;::const_reference</type><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="arg_c"><template>
+ </template><specialization><template-arg>Expr</template-arg><template-arg>5</template-arg></specialization><typedef name="wrapped_type"><type>Expr::proto_arg5</type></typedef><typedef name="type"><type><classname>unref</classname>&lt; wrapped_type &gt;::type</type></typedef><typedef name="reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::reference</type></typedef><typedef name="const_reference"><type><classname>unref</classname>&lt; wrapped_type &gt;::const_reference</type></typedef><method-group name="public static functions"/></struct-specialization><struct-specialization name="arg_c"><template>
       <template-type-parameter name="Expr"/>
- </template><specialization><template-arg>Expr const</template-arg><template-arg>5</template-arg></specialization><inherit access="public">boost::proto::result_of::arg_c&lt; Expr, 5 &gt;</inherit></struct-specialization><struct-specialization name="is_ref"><template>
- <template-type-parameter name="T"/>
- </template><specialization><template-arg>T</template-arg><template-arg>typename T::proto_is_ref_</template-arg></specialization></struct-specialization><struct-specialization name="is_expr"><template>
- <template-type-parameter name="T"/>
- </template><specialization><template-arg>T</template-arg><template-arg>typename T::proto_is_expr_</template-arg></specialization></struct-specialization><struct-specialization name="as_expr"><template>
- <template-type-parameter name="T"/>
- <template-type-parameter name="Domain"/>
- </template><specialization><template-arg>T</template-arg><template-arg>Domain</template-arg><template-arg>typename T::proto_is_expr_</template-arg></specialization><typedef name="type"><type>T::proto_derived_expr</type></typedef><typedef name="result_type"><type>T &amp;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static result_type</type><template>
- <template-type-parameter name="T2"/>
- </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="as_arg"><template>
- <template-type-parameter name="T"/>
- <template-type-parameter name="Domain"/>
- </template><specialization><template-arg>T</template-arg><template-arg>Domain</template-arg><template-arg>typename T::proto_is_expr_</template-arg></specialization><typedef name="type"><type><classname>ref_</classname>&lt; T &gt;</type></typedef><method-group name="public static functions"><method name="call" cv=""><type>static <classname>type</classname></type><template>
- <template-type-parameter name="T2"/>
- </template><parameter name="t"><paramtype>T2 &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace><function name="implicit_expr"><type><emphasis>unspecified</emphasis></type><template>
+ </template><specialization><template-arg>Expr const</template-arg><template-arg>5</template-arg></specialization><inherit access="public">boost::proto::result_of::arg_c&lt; Expr, 5 &gt;</inherit></struct-specialization></namespace><data-member name="left"><type><classname>functional::left</classname> const</type></data-member><data-member name="right"><type><classname>functional::right</classname> const</type></data-member><function name="implicit_expr"><type><emphasis>unspecified</emphasis></type><template>
           <template-type-parameter name="A0"/>
         </template><parameter name="a0"><paramtype>A0 &amp;</paramtype></parameter></function><function name="implicit_expr"><type><emphasis>unspecified</emphasis></type><template>
           <template-type-parameter name="A0"/>
@@ -1875,342 +1862,484 @@
           <template-type-parameter name="T"/>
         </template><parameter name="t"><paramtype>T &amp;</paramtype></parameter></signature><signature><type><classname>result_of::as_expr</classname>&lt; T const &gt;::result_type</type><template>
           <template-type-parameter name="T"/>
- </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></signature><description><para>as_expr </para></description></overloaded-function><overloaded-function name="as_arg"><signature><type><classname>result_of::as_arg</classname>&lt; T &gt;::type</type><template>
+ </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></signature><description><para>as_expr</para><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></overloaded-function><overloaded-function name="as_arg"><signature><type><classname>result_of::as_arg</classname>&lt; T &gt;::type</type><template>
           <template-type-parameter name="T"/>
         </template><parameter name="t"><paramtype>T &amp;</paramtype></parameter></signature><signature><type><classname>result_of::as_arg</classname>&lt; T const &gt;::type</type><template>
           <template-type-parameter name="T"/>
- </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></signature><description><para>as_arg </para></description></overloaded-function><overloaded-function name="arg"><signature><type><classname>result_of::unref</classname>&lt; typename Expr::proto_base_expr::proto_arg0 &gt;::reference</type><template>
+ </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></signature><description><para>as_arg</para><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></overloaded-function><overloaded-function name="arg"><signature><type><classname>result_of::unref</classname>&lt; typename Expr::proto_base_expr::proto_arg0 &gt;::reference</type><template>
           <template-type-parameter name="Expr"/>
         </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></signature><signature><type><classname>result_of::unref</classname>&lt; typename Expr::proto_base_expr::proto_arg0 &gt;::const_reference</type><template>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></signature><description><para>arg </para></description></overloaded-function><overloaded-function name="arg_c"><signature><type>result_of::arg_c&lt; Expr, N &gt;::reference</type><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></signature><description><para>arg</para><para>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </para></description></overloaded-function><overloaded-function name="arg_c"><signature><type>result_of::arg_c&lt; Expr, N &gt;::reference</type><template>
           <template-nontype-parameter name="N"><type>long</type></template-nontype-parameter>
           <template-type-parameter name="Expr"/>
         </template><parameter name="expr"><paramtype>Expr &amp;</paramtype></parameter></signature><signature><type>result_of::arg_c&lt; Expr, N &gt;::const_reference</type><template>
           <template-nontype-parameter name="N"><type>long</type></template-nontype-parameter>
           <template-type-parameter name="Expr"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></signature><description><para>arg_c </para></description></overloaded-function><data-member name="left"><type><classname>functional::left</classname> const</type></data-member><data-member name="right"><type><classname>functional::right</classname> const</type></data-member></namespace></namespace></header><header name="boost/xpressive/proto/transform.hpp"><para>Includes all the transforms in the transform/ sub-directory. </para></header><header name="boost/xpressive/proto/transform/apply.hpp"><para>Proto transforms for applying MPL placeholder expressions. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="always"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Always"/>
- <template-type-parameter name="Factory"/>
- </template><struct name="apply"><template>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Always</type></typedef></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static Always</type><template>
- <template-type-parameter name="Expr"/>
- <template-type-parameter name="State"/>
- <template-type-parameter name="Visitor"/>
- </template><parameter name=""><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="apply1"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Lambda"/>
- <template-type-parameter name="Factory"/>
- </template><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter></signature><description><para>arg_c </para></description></overloaded-function></namespace></namespace></header><header name="boost/xpressive/proto/transform.hpp"><para>Includes all the transforms in the transform/ sub-directory. </para></header><header name="boost/xpressive/proto/transform/arg.hpp"><para>Contains definition of the argN transforms. </para><namespace name="boost"><namespace name="proto"><struct name="_arg_c"><template>
+ <template-nontype-parameter name="I"><type>int</type></template-nontype-parameter>
+ </template><inherit access="public">boost::proto::transform::arg_c&lt; I &gt;</inherit></struct><namespace name="transform"><struct name="expr"><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>Expr</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>Expr const &amp;</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="apply2"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Lambda"/>
- <template-type-parameter name="Factory"/>
- </template><struct name="apply"><template>
+ </template><parameter name="expr_"><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="state"><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>State</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>State const &amp;</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="apply3"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Lambda"/>
- <template-type-parameter name="Factory"/>
- </template><struct name="apply"><template>
+ </template><parameter name=""><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state_"><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="visitor"><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>Visitor</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>Visitor &amp;</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/arg.hpp"><para>Proto transforms for extracting arguments from expressions. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="arg"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="N"/>
- </template><struct name="apply"><template>
+ </template><parameter name=""><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor_"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="arg_c"><template>
+ <template-nontype-parameter name="I"><type>int</type></template-nontype-parameter>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><inherit access="public">boost::proto::result_of::arg&lt; Grammar::template apply&lt; Expr, State, Visitor &gt;::type, N &gt;</inherit></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>proto::result_of::arg_c&lt; Expr, I &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>proto::result_of::arg_c&lt; Expr, I &gt;::const_reference</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="arg_c"><template>
- <template-type-parameter name="Grammar"/>
- <template-nontype-parameter name="N"><type>long</type></template-nontype-parameter>
- </template><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="_ref"><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="T"/>
+ </template><specialization><template-arg>This(T &amp;)</template-arg></specialization><typedef name="type"><type>boost::reference_wrapper&lt; T &gt;</type></typedef></struct-specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="T"/>
+ </template><specialization><template-arg>This(T)</template-arg></specialization><typedef name="type"><type>boost::reference_wrapper&lt; T const &gt;</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>boost::reference_wrapper&lt; T &gt;</type><template>
+ <template-type-parameter name="T"/>
+ </template><parameter name="t"><paramtype>T &amp;</paramtype></parameter></method><method name="operator()" cv="const"><type>boost::reference_wrapper&lt; T const &gt;</type><template>
+ <template-type-parameter name="T"/>
+ </template><parameter name="t"><paramtype>T const &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/bind.hpp"><para>Contains definition of the bind&lt;&gt; transform. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="bind"><template>
+ <template-type-parameter name="Fun"/>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><classname>call</classname>&lt; typename <classname>make</classname>&lt; <classname>Fun</classname> &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type &gt;</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="left"><template>
- <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="bind"><template>
+ <template-type-parameter name="Return"/>
+ </template><specialization><template-arg>Return()</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><inherit access="public">boost::proto::result_of::left&lt; Grammar::template apply&lt; Expr, State, Visitor &gt;::type &gt;</inherit></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><classname>call</classname>&lt; typename <classname>make</classname>&lt; Return &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type() &gt;</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="right"><template>
- <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="bind"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ </template><specialization><template-arg>Return(A0)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><inherit access="public">boost::proto::result_of::right&lt; Grammar::template apply&lt; Expr, State, Visitor &gt;::type &gt;</inherit></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><classname>call</classname>&lt; typename <classname>make</classname>&lt; Return &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type(A0) &gt;</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="identity"><template>
- <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>Expr_</type></typedef></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static Expr_ const &amp;</type><template>
- <template-type-parameter name="Expr_"/>
- <template-type-parameter name="State_"/>
- <template-type-parameter name="Visitor_"/>
- </template><parameter name="expr_"><paramtype>Expr_ const &amp;</paramtype></parameter><parameter name=""><paramtype>State_ const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor_ &amp;</paramtype></parameter></method></method-group></struct><struct name="state"><template>
- <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
- <template-type-parameter name=""/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="bind"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
- <template-type-parameter name=""/>
- </template><typedef name="type"><type>State</type></typedef></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static State const &amp;</type><template>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><classname>call</classname>&lt; typename <classname>make</classname>&lt; Return &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type(A0, A1) &gt;</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name=""><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state_"><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="visitor"><template>
- <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
- <template-type-parameter name=""/>
- <template-type-parameter name=""/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="bind"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><typedef name="type"><type>Visitor</type></typedef></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static Visitor &amp;</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><classname>call</classname>&lt; typename <classname>make</classname>&lt; Return &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type(A0, A1, A2) &gt;</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name=""><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor_"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/branch.hpp"><para>A special-purpose proto transform for transforming one branch of the expression tree separately from the rest. Given an expression and a new state, it transforms the expression using the new state. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="branch"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="BranchState"/>
- </template><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="bind"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><classname>call</classname>&lt; typename <classname>make</classname>&lt; Return &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type(A0, A1, A2, A3) &gt;</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/compose.hpp"><para>A special-purpose proto transform for composing two transfomations. Given two Grammars, expressions that match the first grammar are transformed according to that grammar, and the result is forwarded to the second for further transformation. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="compose"><template>
- <template-type-parameter name="Grammar1"/>
- <template-type-parameter name="Grammar2"/>
- </template><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="bind"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ <template-type-parameter name="A4"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><typedef name="type"><type>Grammar2::template <classname>apply</classname>&lt; typename Grammar1::template <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type, State, Visitor &gt;::type</type></typedef></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><classname>call</classname>&lt; typename <classname>make</classname>&lt; Return &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type(A0, A1, A2, A3, A4) &gt;</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/construct.hpp"><para>For constructing an arbitrary type from a bunch of transforms. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct-specialization name="construct"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Result"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>Result()</template-arg></specialization><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/call.hpp"><para>Contains definition of the call&lt;&gt; transform. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="call"><template>
+ <template-type-parameter name="Fun"/>
+ </template><inherit access="public">Fun</inherit><typedef name="proto_is_callable_"><type>void</type></typedef></struct><struct-specialization name="call"><template>
+ <template-type-parameter name="Fun"/>
+ </template><specialization><template-arg>Fun()</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group><method-group name="private static functions"/></struct-specialization><struct-specialization name="construct"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Result"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="call"><template>
+ <template-type-parameter name="Fun"/>
       <template-type-parameter name="Arg0"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>Result(Arg0)</template-arg></specialization><struct name="apply"><template>
+ </template><specialization><template-arg>Fun(Arg0)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group><method-group name="private static functions"/></struct-specialization><struct-specialization name="construct"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Result"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="call"><template>
+ <template-type-parameter name="Fun"/>
       <template-type-parameter name="Arg0"/>
       <template-type-parameter name="Arg1"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>Result(Arg0</template-arg><template-arg>Arg1)</template-arg></specialization><struct name="apply"><template>
+ </template><specialization><template-arg>Fun(Arg0</template-arg><template-arg>Arg1)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group><method-group name="private static functions"/></struct-specialization><struct-specialization name="construct"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Result"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="call"><template>
+ <template-type-parameter name="Fun"/>
       <template-type-parameter name="Arg0"/>
       <template-type-parameter name="Arg1"/>
       <template-type-parameter name="Arg2"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>Result(Arg0</template-arg><template-arg>Arg1</template-arg><template-arg>Arg2)</template-arg></specialization><struct name="apply"><template>
+ </template><specialization><template-arg>Fun(Arg0</template-arg><template-arg>Arg1</template-arg><template-arg>Arg2)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>boost::result_of&lt; <classname>Fun</classname>(typename <classname>when</classname>&lt; _, Arg0 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, Arg1 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, Arg2 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type)&gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group><method-group name="private static functions"/></struct-specialization><struct-specialization name="construct"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Result"/>
- <template-type-parameter name="Arg0"/>
- <template-type-parameter name="Arg1"/>
- <template-type-parameter name="Arg2"/>
- <template-type-parameter name="Arg3"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>Result(Arg0</template-arg><template-arg>Arg1</template-arg><template-arg>Arg2</template-arg><template-arg>Arg3)</template-arg></specialization><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="call"><template>
+ <template-type-parameter name="Fun"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ </template><specialization><template-arg>Fun(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>boost::result_of&lt; <classname>Fun</classname>(typename <classname>when</classname>&lt; _, A0 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, A1 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, A2 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, A3 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type)&gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group><method-group name="private static functions"/></struct-specialization><struct-specialization name="construct"><template>
- <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Result"/>
- <template-type-parameter name="Arg0"/>
- <template-type-parameter name="Arg1"/>
- <template-type-parameter name="Arg2"/>
- <template-type-parameter name="Arg3"/>
- <template-type-parameter name="Arg4"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>Result(Arg0</template-arg><template-arg>Arg1</template-arg><template-arg>Arg2</template-arg><template-arg>Arg3</template-arg><template-arg>Arg4)</template-arg></specialization><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="call"><template>
+ <template-type-parameter name="Fun"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ <template-type-parameter name="A4"/>
+ </template><specialization><template-arg>Fun(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type>boost::result_of&lt; <classname>Fun</classname>(typename <classname>when</classname>&lt; _, A0 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, A1 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, A2 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, A3 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type, typename <classname>when</classname>&lt; _, A4 &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type)&gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group><method-group name="private static functions"/></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/fold.hpp"><para>A special-purpose proto transform for merging sequences of binary operations. It transforms the right operand and passes the result as state while transforming the left. Or, it might do the left first, if you choose. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct-specialization name="fold"><template>
- <template-type-parameter name="Grammar"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>void</template-arg></specialization><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/fold.hpp"><para>Contains definition of the fold&lt;&gt; and reverse_fold&lt;&gt; transforms.</para><para>Contains definition of the fold_tree&lt;&gt; and reverse_fold_tree&lt;&gt; transforms. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="fold"><template>
+ <template-type-parameter name="Sequence"/>
+ <template-type-parameter name="State0"/>
+ <template-type-parameter name="Fun"/>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"><method name="fold" cv=""><type/></method></method-group><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="sequence"><type><classname>when</classname>&lt; _, Sequence &gt;::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="reverse_fold"><template>
- <template-type-parameter name="Grammar"/>
- </template><specialization><template-arg>Grammar</template-arg><template-arg>void</template-arg></specialization><struct name="apply"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="reverse_fold"><template>
+ <template-type-parameter name="Sequence"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Fun"/>
+ </template><inherit access="public">boost::proto::transform::fold&lt; Sequence, State0, Fun &gt;</inherit></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/fold_tree.hpp"><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="fold_tree"><template>
+ <template-type-parameter name="Sequence"/>
+ <template-type-parameter name="State0"/>
+ <template-type-parameter name="Fun"/>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"><method name="reverse_fold" cv=""><type/></method></method-group><method-group name="public static functions"><method name="call" cv=""><type>static apply&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/fold_tree.hpp"><para>A higher-level transform that uses the fold, and branch transforms to recursively fold a tree. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="fold_tree"><template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="Grammar"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="reverse_fold_tree"><template>
+ <template-type-parameter name="Sequence"/>
+ <template-type-parameter name="State0"/>
+ <template-type-parameter name="Fun"/>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
- </template><description><para>fold_tree </para></description></struct><struct name="reverse_fold_tree"><template>
- <template-type-parameter name="Tag"/>
- <template-type-parameter name="Grammar"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type><emphasis>unspecified</emphasis></type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/make.hpp"><para>Contains definition of the make&lt;&gt; transform. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="make"><template>
+ <template-type-parameter name="Fun"/>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name=""><paramtype>Expr const &amp;</paramtype></parameter><parameter name=""><paramtype>State const &amp;</paramtype></parameter><parameter name=""><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct-specialization name="make"><template>
+ <template-type-parameter name="Return"/>
+ </template><specialization><template-arg>Return()</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="make"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ </template><specialization><template-arg>Return(A0)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="make"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="make"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="make"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
- </template><description><para>reverse_fold_tree </para></description></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/function.hpp"><para>Proto transforms for applying a function object. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="function1"><template>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization><struct-specialization name="make"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ <template-type-parameter name="A4"/>
+ </template><specialization><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
+ <template-type-parameter name="Expr"/>
+ <template-type-parameter name="State"/>
+ <template-type-parameter name="Visitor"/>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct-specialization></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/pass_through.hpp"><para>TODO </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="pass_through"><template>
       <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Function1"/>
- </template><struct name="apply"><template>
+ </template><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="function2"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/when.hpp"><para>Definition of when transform. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="when"><template>
+ <template-type-parameter name="Grammar"/>
+ <template-type-parameter name="Fun"/>
+ </template><inherit access="public">Fun</inherit><typedef name="proto_base_expr"><type>Grammar::proto_base_expr</type></typedef></struct><struct-specialization name="when"><template>
       <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Function2"/>
- </template><struct name="apply"><template>
+ <template-type-parameter name="Fun"/>
+ </template><specialization><template-arg>Grammar</template-arg><template-arg>Fun *</template-arg></specialization><inherit access="public">boost::proto::transform::when&lt; Grammar, Fun &gt;</inherit></struct-specialization><struct name="otherwise"><template>
+ <template-type-parameter name="Fun"/>
+ </template><inherit access="public">boost::proto::transform::when&lt; _, Fun &gt;</inherit></struct><struct-specialization name="when"><template>
+ <template-type-parameter name="Grammar"/>
+ <template-type-parameter name="Return"/>
+ </template><specialization><template-arg>Grammar</template-arg><template-arg>Return()</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type>mpl::if_&lt; <classname>is_callable</classname>&lt; Return &gt;, <classname>call</classname>&lt; Return() &gt;, <classname>make</classname>&lt; Return() &gt; &gt;::type</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type>Grammar::proto_base_expr</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="function3"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter><description><para>Function call operator </para></description></method></method-group></struct-specialization><struct-specialization name="when"><template>
       <template-type-parameter name="Grammar"/>
- <template-type-parameter name="Function3"/>
- </template><struct name="apply"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ </template><specialization><template-arg>Grammar</template-arg><template-arg>Return(A0)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type>mpl::if_&lt; <classname>is_callable</classname>&lt; Return &gt;, <classname>call</classname>&lt; Return(A0) &gt;, <classname>make</classname>&lt; Return(A0) &gt; &gt;::type</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type>Grammar::proto_base_expr</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/list.hpp"><para>A special-purpose proto transform for putting things into a fusion::cons&lt;&gt; list. </para><namespace name="boost"><namespace name="proto"><namespace name="transform"><struct name="list"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter><description><para>Function call operator </para></description></method></method-group></struct-specialization><struct-specialization name="when"><template>
       <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ </template><specialization><template-arg>Grammar</template-arg><template-arg>Return(A0</template-arg><template-arg>A1)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><typedef name="type"><type>fusion::cons&lt; typename Grammar::template <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type, State &gt;</type></typedef></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type>mpl::if_&lt; <classname>is_callable</classname>&lt; Return &gt;, <classname>call</classname>&lt; Return(A0, A1) &gt;, <classname>make</classname>&lt; Return(A0, A1) &gt; &gt;::type</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type>Grammar::proto_base_expr</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct><struct name="tail"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter><description><para>Function call operator </para></description></method></method-group></struct-specialization><struct-specialization name="when"><template>
       <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ </template><specialization><template-arg>Grammar</template-arg><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template><typedef name="type"><type>Grammar::template <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type::cdr_type</type></typedef></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type>mpl::if_&lt; <classname>is_callable</classname>&lt; Return &gt;, <classname>call</classname>&lt; Return(A0, A1, A2) &gt;, <classname>make</classname>&lt; Return(A0, A1, A2) &gt; &gt;::type</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type>Grammar::proto_base_expr</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header><header name="boost/xpressive/proto/transform/pass_through.hpp"><para>TODO </para><namespace name="boost"><namespace name="proto"><namespace name="has_transformns_"><struct name="has_pass_through_transform"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter><description><para>Function call operator </para></description></method></method-group></struct-specialization><struct-specialization name="when"><template>
       <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ </template><specialization><template-arg>Grammar</template-arg><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type>mpl::if_&lt; <classname>is_callable</classname>&lt; Return &gt;, <classname>call</classname>&lt; Return(A0, A1, A2, A3) &gt;, <classname>make</classname>&lt; Return(A0, A1, A2, A3) &gt; &gt;::type</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type>Grammar::proto_base_expr</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace><namespace name="transform"><struct name="pass_through"><template>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter><description><para>Function call operator </para></description></method></method-group></struct-specialization><struct-specialization name="when"><template>
       <template-type-parameter name="Grammar"/>
- </template><struct name="apply"><template>
+ <template-type-parameter name="Return"/>
+ <template-type-parameter name="A0"/>
+ <template-type-parameter name="A1"/>
+ <template-type-parameter name="A2"/>
+ <template-type-parameter name="A3"/>
+ <template-type-parameter name="A4"/>
+ </template><specialization><template-arg>Grammar</template-arg><template-arg>Return(A0</template-arg><template-arg>A1</template-arg><template-arg>A2</template-arg><template-arg>A3</template-arg><template-arg>A4)</template-arg></specialization><struct-specialization name="result"><template>
+ <template-type-parameter name="This"/>
       <template-type-parameter name="Expr"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Visitor"/>
- </template></struct><method-group name="public member functions"/><constructor/><method-group name="public static functions"><method name="call" cv=""><type>static <classname>apply</classname>&lt; Expr, State, Visitor &gt;::type</type><template>
+ </template><specialization><template-arg>This(Expr</template-arg><template-arg>State</template-arg><template-arg>Visitor)</template-arg></specialization><typedef name="impl"><type>mpl::if_&lt; <classname>is_callable</classname>&lt; Return &gt;, <classname>call</classname>&lt; Return(A0, A1, A2, A3, A4) &gt;, <classname>make</classname>&lt; Return(A0, A1, A2, A3, A4) &gt; &gt;::type</type></typedef><typedef name="type"><type>impl::template result&lt; void(Expr, State, Visitor) &gt;::type</type></typedef></struct-specialization><typedef name="proto_base_expr"><type>Grammar::proto_base_expr</type></typedef><method-group name="public member functions"><method name="operator()" cv="const"><type>result&lt; void(Expr, State, Visitor) &gt;::type</type><template>
           <template-type-parameter name="Expr"/>
           <template-type-parameter name="State"/>
           <template-type-parameter name="Visitor"/>
- </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter></method></method-group></struct></namespace></namespace></namespace></header></library-reference>
+ </template><parameter name="expr"><paramtype>Expr const &amp;</paramtype></parameter><parameter name="state"><paramtype>State const &amp;</paramtype></parameter><parameter name="visitor"><paramtype>Visitor &amp;</paramtype></parameter><description><para>Function call operator </para></description></method></method-group></struct-specialization></namespace></namespace></namespace></header></library-reference>

Modified: branches/CMake/release/libs/xpressive/proto/doc/quick_start.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/quick_start.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/quick_start.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Modified: branches/CMake/release/libs/xpressive/proto/doc/rationale.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/rationale.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/rationale.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 [/
- / Copyright (c) 2006 Eric Niebler
+ / Copyright (c) 2008 Eric Niebler
  /
  / Distributed under the Boost Software License, Version 1.0. (See accompanying
  / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -7,7 +7,9 @@
 
 [section:rationale Appendix B: Rationale]
 
+[/==================================================]
 [section:static_initialization Static Initialization]
+[/==================================================]
 
 Proto expression types are PODs (Plain Old Data), and do not have constructors.
 They are brace-initialized, as follows:
@@ -17,11 +19,81 @@
 The reason is so that expression objects like `_i` above can be ['statically
 initialized]. Why is static initialization important? The terminals of many
 domain-specific embedded languages are likely to be global const objects, like
-`_1` and `_2` from the Boost.Lambda library. Were these object to require
+`_1` and `_2` from the Boost Lambda Library. Were these object to require
 run-time initialization, it might be possible to use these objects before they
 are initialized. That would be bad. Statically initialized objects cannot be
 misused that way.
 
 [endsect]
 
+[/======================================================================]
+[section:result_of Proto Transforms and the Restricted ResultOf Protocol]
+[/======================================================================]
+
+All Proto primitive transforms make use of a variant of the TR1 ResultOf
+protocol for computing the type of the transform's return value. Such
+transforms must have a nested `result<>` template (not a nested `result_type`
+typedef) which takes exactly three parameter types. That is, it must be
+defined as:
+
+ template<typename Sig> struct result {};
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef ... type;
+ };
+
+In the above, `Expr`, `State`, and `Visitor` are assumed by Proto to be
+non-cv-qualified non-reference types. The implication is that for some
+Proto transform `Tr`, some `result_of<>` instantiations work while others
+don't. See below.
+
+ // ERROR, doesn't work:
+ boost::result_of<Tr(Expr const &, State const &, Visitor &)>::type
+
+ // OK, works:
+ boost::result_of<Tr(Expr, State, Visitor)>::type
+
+It is done this way largely for compile-time performance. Full
+compliance with the TR1 ResultOf protocol incurs a not insignificant penalty
+at compile time. Metaprogramming tricks are needed to first detect a nested
+`result_type` typedef if it exists. And each nested `result<>` template
+would need to be coded specially to handle references and cv-qualifiers, which
+incurs many instantiations of `remove_reference<>` and `remove_cv<>`. In
+private testing, this was found to have a measurable impact on compile-time
+performance in the order of 10-15%, which was deemed unacceptable.
+
+The restricted protocol improves compile times while remaining largely
+compatible with TR1's `result_of<>`. As a side benefit, it makes
+Proto's primitive transforms easier to implement, since the user need not
+worry about stripping references and cv-qualification in their nested
+`result<>` templates.
+
+[endsect]
+
+[/=========================================================]
+[section:preprocessor Why Not Reuse MPL, Fusion, et cetera?]
+[/=========================================================]
+
+Anyone who has peeked at Proto's source code has probably wondered,
+"Why all the dirty preprocessor gunk? Couldn't this have been all
+implemented cleanly on top of libraries like MPL and Fusion?" The
+answer is that Proto could have been implemented this way, and in fact
+was at one point. The problem is that template metaprogramming (TMP)
+makes for very long compile times. As a foundation upon which other
+TMP-heavy libraries will be built, Proto itself should be as lightweight
+as possible. That is achieved by prefering preprocessor metaprogramming
+to template metaprogramming. Expanding a macro is far more efficient
+than instantiating a template. In some cases, the "clean" version takes
+10x longer to compile than the "dirty" version.
+
+The "clean and slow" version of Proto can still be found at
+http://svn.boost.org/svn/boost/branches/proto/v3. Anyone who is interested
+can download it and verify that it is, in fact, unusably slow to compile.
+Note that this branch's development was abandoned, and it does not
+conform exactly with Proto's current interface.
+
+[endsect]
+
 [endsect]

Modified: branches/CMake/release/libs/xpressive/proto/doc/transforms.qbk
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/doc/transforms.qbk (original)
+++ branches/CMake/release/libs/xpressive/proto/doc/transforms.qbk 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -28,30 +28,50 @@
 are to be transformed. Just as the grammar is defined recursively, so too
 is the tree transformation.
 
-A grammar decorated with transforms has a static member function named
-`call()` which takes three parameters:
-
-* `expr` -- the expression to transform
-* `state` -- the state of the transformation so far
-* `visitor` -- any optional auxiliary mutable state information
-
-It also has a nested `apply<>` template which is used to calculate the return
-type of the `call()` member function.
-
-Let's say we have a grammar called `Grammar`, an expression template
-object called `expr` that matches the grammar, and `state` and `visitor`
-objects of your choosing. What happens when you call
-`Grammar::call(expr, state, visitor)`? Well, if `Grammar` were defined as
-`shift_right< Rule1, Rule2 >`, for instance, it might transform the left
-child of `expr` according to `Rule1`'s transform, do the same thing to the
-right child using `Rule2`, and combine the results somehow. Of course, `Rule1`
-and `Rule2` might be defined in terms of other rules with other transforms, so
-the process executes recursively. Some transforms, the `fold<>` in particular,
-use the result of transforming one child as the `state` parameter when
-transforming the other child. In this way, the results of the recursive
-transformations can be accumulated bottom-up.
-
-That's it, in a nutshell. Now let's crack this nut and peek inside.
+You associate transforms with your grammar rules using _when_. For instance,
+you might want to promote all `int` terminals to `long`. You would say
+`when< terminal<int>, terminal<long>::type(_arg) >`. Here,
+`terminal<long>::type(_arg)` is an example of a Proto transform. It says to
+create an object of type `terminal<long>::type` and initialize it with the
+result of the `_arg` transform. `_arg` is a transform defined by Proto which
+essentially calls `proto::arg()` on the current expression.
+
+[note The transform above might look a little strange at first. It appears
+to be constructing a temporary object in place. In fact, it is a
+/function type/. Since `terminal<long>::type` and `_arg` are types,
+`terminal<long>::type(_arg)` is actually the type of a function that takes
+`_arg` as a parameter and returns `terminal<long>::type`. That is immaterial;
+there is no such function in reality. Rather, Proto interprets this function
+type as a transform, the effect of which is described above. The resemblance
+to an in-place construction of a temporary object is intentional. It is a
+concise and natural notation for specifying transforms. Proto transforms use
+function types extensively, as we'll see.]
+
+A grammar decorated with transforms is a function object that takes three
+parameters:
+
+* `expr` -- the Proto expression to transform
+* `state` -- the initial state of the transformation
+* `visitor` -- any optional mutable state information
+
+Grammars with transforms are proper function objects, so you can use
+`boost::result_of<>` to calculate their return types. So, applying a
+transform typically looks like this:
+
+ // Assuming we have an expression to transform,
+ // an initial state, and a visitor ...
+ Expr expr;
+ State state;
+ Visitor visitor;
+
+ // ... calculate the result type of applying
+ // Grammar's transform ...
+ typedef typename
+ boost::result_of<Grammar(Expr, State, Visitor)>::type
+ result_type;
+
+ // ... and apply Grammar's transform:
+ result_type result = Grammar()(expr, state, visitor);
 
 [/==========================================]
 [section Example: Calculator Arity Transform]
@@ -87,14 +107,14 @@
 
 We can immediately write the calculator grammar as follows:
 
-[CalculatorGrammar]
+[CalcGrammar]
 
 We can read this as follows: a calculator expression is either placeholder 1,
 placeholder 2, some other terminal, or some unary or binary operator whose
 operands are calculator expressions. Recall that `proto::_` is a wildcard which
 matches anything. So `terminal< _ >` will match any terminal, and
-`unary_expr< _, CalculatorGrammar >` will match any unary expression
-for which the operand matches CalculatorGrammar (the `_` matches any operator
+`unary_expr< _, CalcArity >` will match any unary expression
+for which the operand matches CalcArity (the `_` matches any operator
 tag).
 
 [/============================]
@@ -117,129 +137,151 @@
 The total arity of a calculator expression is found by recursively evaluating
 the arity of all of the sub-expressions and taking the maximum.
 
-Let's look at the sub-expression for placeholder 1. It is matched by this part
-of our grammar: `terminal< placeholder1 >`. We want to associate this
+Let's look at the sub-expression for the placeholder `_1`. It is matched by this
+part of our grammar: `terminal< placeholder1 >`. We want to associate this
 part of our grammar with an arity of `1`. We do that by attaching a transform.
 Since the arity of an expression can be evaluated at compile time, let's use
 `mpl::int_<1>` to represent the arity of the first placeholder. The following
 attaches a transform that always evaluates to `mpl::int_<1>`:
 
- transform::always< terminal< placeholder1 >, mpl::int_<1> >
+ when< terminal< placeholder1 >, mpl::int_<1>() >
 
 This grammar rule will match any `placeholder1` terminal, and will transform it
-to `mpl::int_<1>`. Likewise, we will use the `transform::always<>` transform to
-transform `placeholder2` terminals into `mpl::int_<2>`, and other terminals
-into `mpl::int_<0>`.
+to a (default-constructed) `mpl::int_<1>` object. As described previously,
+`mpl::int_<1>()` is a function type, but Proto interprets it as an object to
+construct. We will have a similar transform to convert `placeholder2` terminals
+into `mpl::int_<2>`, and other terminals into `mpl::int_<0>`.
 
 Next, let's write a transform for unary operators that returns the arity of the
 operand. It is simply:
 
- transform::arg< unary_expr< _, CalculatorGrammar > >
-
-As you might expect, the `transform::arg<>` transform returns the argument of the
-unary expression. This looks simple, but there is quite a lot going on here.
-
-First, you should know that transforms are written so that they can be chained.
-So `transform::arg<>` invokes the transform associated with
-`unary_expr< _, CalculatorGrammar >` before it does anything else.
-
-That begs the question, what does `unary_expr<>`'s transform do? Well,
-`unary_expr< _, CalculatorGrammar >` has a default transform
-associated with it. It is a /pass-through/ transform. When an expression
-of the form `expr< T, arg1< X > >` is passed to the transform, its `apply<>`
-member template will invoke the `CalculatorGrammar` transform (which we haven't
-completely defined yet -- patience) on `X` resulting in `Y`, and then
-reassemble the expression as `expr< T, arg1< Y > >`.
+ when< unary_expr< _, CalcArity >, CalcArity(_arg) >
 
-[note You may have noticed that Proto types like `unary_expr<>` serve several
-different but related roles. In particular, `unary_expr<>` is ...
+The transform `CalcArity(_arg)` recursively applies the `CalcArity`
+transform to the child node of the unary expression. As you might have noticed,
+`CalcArity(_arg)` is another function type, but Proto interprets this one
+differently. Rather than trying to construct a `CalcArity` object, Proto
+knows this is a function object and invokes it instead.
+
+[note When using function types as Proto transforms, they can either represent
+an object to construct or a function to call. It is similar to C++ where the
+syntax `foo(x)` can either be interpreted as an object to construct or a
+function to call, depending on whether `foo` is a type or a function. Proto
+can't know in general which is the case, so it uses a trait, `proto::is_callable<>`,
+to differentiate. `is_callable< mpl::int_<1> >::value` is false so `mpl::int_<1>()`
+is an object to construct, but `is_callable< CalcArity >::value` is true so
+`CalcArity(_arg)` is a function to call. (`is_callable< CalcArity >::value` is true
+because `CalcArity` inherits from `proto::or_<>`, which is callable.)]
+
+[/
+ That begs the question, what does `unary_expr<>`'s transform do? Well,
+ `unary_expr< _, CalcArity >` has a default transform
+ associated with it. It is a /pass-through/ transform. When an expression
+ of the form `expr< T, arg1< X > >` is passed to the transform, its `apply<>`
+ member template will invoke the `CalcArity` transform (which we haven't
+ completely defined yet -- patience) on `X` resulting in `Y`, and then
+ reassemble the expression as `expr< T, arg1< Y > >`.
+
+ [note You may have noticed that Proto types like `unary_expr<>` serve several
+ different but related roles. In particular, `unary_expr<>` is ...
+
+ ... [*a meta-function]: `unary_expr<T, X>::type` is a typedef for
+ `expr<T, args1<X> >`.
+
+ ... [*a grammar]: `unary_expr<U, Y>` is a simle grammar that matches
+ `expr<T, args1<X> >` if an only if `U` is `T` or `proto::_`, and `Y` is a
+ grammar that matches `X`.
+
+ ... [*a transform]: `unary_expr<U, Y>::apply<expr<T, args1<X> >, S, V>::type`
+ applies `unary_expr<>`'s pass-through transform to `expr<T, args1<X> >` with
+ state `S` and visitor `V`. The result is
+ `expr<T, args1< Y::apply<X, S, V>::type > >`.
+ ]
+
+ So, putting a few things together, consider the calculator expression `+_1`,
+ which would have the following type:
+
+ expr< tag::posit, arg1<
+ expr< tag::terminal, arg0< placeholder1 > >
+ > >
+
+ If we executed the `unary_expr< _, CalcArity >` transform on this
+ expression, we would expect to get:
+
+ expr< tag::posit, arg1<
+ mpl::int_<1>
+ > >
+
+ And if we added the `transform::arg<>` transform also, as in
+ `transform::arg< unary_expr< _, CalcArity > >`, we expect the result
+ to be:
 
-... [*a meta-function]: `unary_expr<T, X>::type` is a typedef for
-`expr<T, args1<X> >`.
-
-... [*a grammar]: `unary_expr<U, Y>` is a simle grammar that matches
-`expr<T, args1<X> >` if an only if `U` is `T` or `proto::_`, and `Y` is a
-grammar that matches `X`.
-
-... [*a transform]: `unary_expr<U, Y>::apply<expr<T, args1<X> >, S, V>::type`
-applies `unary_expr<>`'s pass-through transform to `expr<T, args1<X> >` with
-state `S` and visitor `V`. The result is
-`expr<T, args1< Y::apply<X, S, V>::type > >`.
-]
-
-So, putting a few things together, consider the calculator expression `+_1`,
-which would have the following type:
-
- expr< tag::posit, arg1<
- expr< tag::terminal, arg0< placeholder1 > >
- > >
+ mpl::int_<1>
 
-If we executed the `unary_expr< _, CalculatorGrammar >` transform on this
-expression, we would expect to get:
+ Which is exactly what we want.
 
- expr< tag::posit, arg1<
- mpl::int_<1>
- > >
+ [note *Default Transforms*
 
-And if we added the `transform::arg<>` transform also, as in
-`transform::arg< unary_expr< _, CalculatorGrammar > >`, we expect the result
-to be:
-
- mpl::int_<1>
-
-Which is exactly what we want.
-
-[note *Default Transforms*
-
-All the tools Proto provides for defining grammar rules have default transforms
-associated with them. Just as `unary_expr<>` has a pass-through transform,
-so too does `binary_expr<>`, `shift_right<>`, and all the others.
-`proto::or_<>` has a default transform which evaluates the transform of the
-branch that matched. `proto::and_<>`'s default transform evaluates the
-transform of the last branch. Even `proto::expr<>`, `proto::if_<>`,
-`proto::not_<>`, and `proto::_` have no-op default transforms that simply return
-unmodified the expressions passed to them.
+ All the tools Proto provides for defining grammar rules have default transforms
+ associated with them. Just as `unary_expr<>` has a pass-through transform,
+ so too does `binary_expr<>`, `shift_right<>`, and all the others.
+ `proto::or_<>` has a default transform which evaluates the transform of the
+ branch that matched. `proto::and_<>`'s default transform evaluates the
+ transform of the last branch. Even `proto::expr<>`, `proto::if_<>`,
+ `proto::not_<>`, and `proto::_` have no-op default transforms that simply return
+ unmodified the expressions passed to them.
+ ]
 ]
 
 The arity of a binary operator is the maximum of the arity of the left and
-right operands. Proto does not provide a transform that can help us directly,
-but we can easily write our own. This is what it looks like, and we'll describe
-it below:
-
-[binary_max]
-
-This transform will be used as follows:
-`binary_max< binary_expr< _, CalculatorGrammar, CalculatorGrammar > >`.
-First, note that the transform is a template that takes a Grammar as a template
-parameter. It inherits from the Grammar, as all transforms must. Next, we
-define a nested `apply<>` template which calculates the return type. The first
-thing it does is invoke `Grammar`'s transform. Recall that `binary_expr<>`
-has a pass-through transform. Given an expression like
-`expr< T, arg2< A, B > >`, it transforms it to `expr< T, arg2< X, Y > >`, where
-`X` and `Y` are the results of transforming `A` and `B` according to
-`CalculatorGrammar`.
-
-Next, we extract from this transformed binary expression the left and right
-argument types. As the arguments were transformed in the previous step, we
-expect them to already be of the form `mpl::int_<N>`. Then we use `mpl::max<>`
-to find the maximum, and we're done.
-
-The static `call()` member function is needed to complete the transform
-interface. It simply returns a default-constructed object, which will be an
-instantiation of `mpl::int_<>`.
+right operands. We can specify this with the help of `mpl::max<>`, which is a
+so-called meta-function that computes the maximum of two compile-time integers.
+The transform is described below:
+
+ when<
+ binary_expr< _, CalcArity, CalcArity >
+ , mpl::max< CalcArity(_left), CalcArity(_right) >()
+ >
 
-Piecing it all together, the complete `CalculatorGrammar` looks like this:
+The above says to match binary calculator expressions and compute their
+arity by first computing the arity of the left and right children and then
+taking their maximum.
+
+There's a lot going on in the above transform, so let's take it one piece
+at a time, starting with the parts we know. `CalcArity(_left)`
+will calculate the arity of the left child, returning a compile-time integer.
+Likewise for `CalcArity(_right)`. What is new is that these two
+transforms are nested within another: `mpl::max<...>()`. Proto notices that
+`mpl::max<...>` is not callable, so this transform is interpreted as an
+object to construct rather than a function to invoke. Using meta-programming
+tricks, Proto disassembles the `mpl::max<...>` template looking for nested
+Proto transforms to apply. It finds two and applies them, resulting in
+`mpl::max< mpl::int_<X>, mpl::int_<Y> >`.
+
+Having first applied any nested transforms, Proto then looks to see if
+`mpl::max<X, Y>` has a nested `::type` typedef. This is a common convention
+used by meta-functions. In this case, `mpl::max<>::type` is a typedef
+for `mpl::int_< Z >` where `Z` is the maximum of `X` and `Y`. The trailing
+`()` on the transform indicates that the result should be default-constructed,
+so this transform returns `mpl::int_<Z>()`. And we're done.
+
+[note Had `mpl::max<>` not had a nested `::type` typedef, the transform
+would have created and returned a default-constructed `mpl::max<>` object
+instead. That is, the result of substituting nested transforms need not
+of necessity have a nested `::type` typedef, but it is used if it is there.]
 
-[CalculatorArityGrammar]
+Piecing it all together, the complete `CalcArity` looks like this:
 
-We can use our CalculatorGrammar transform to calculate the arity of any
+[CalcArity]
+
+We can use our `CalcArity` transform to calculate the arity of any
 calculator expression:
 
     int i = 0; // not used, dummy state and visitor parameter
 
- std::cout << CalculatorGrammar::call( lit(100) * 200, i, i) << '\n';
- std::cout << CalculatorGrammar::call( (_1 - _1) / _1 * 100, i, i) << '\n';
- std::cout << CalculatorGrammar::call( (_2 - _1) / _2 * 100, i, i) << '\n';
+ std::cout << CalcArity()( lit(100) * 200, i, i) << '\n';
+ std::cout << CalcArity()( (_1 - _1) / _1 * 100, i, i) << '\n';
+ std::cout << CalcArity()( (_2 - _1) / _2 * 100, i, i) << '\n';
 
 This displays the following:
 
@@ -257,67 +299,91 @@
 [section Canned Transforms]
 [/========================]
 
-Some transforms are generally useful, so Proto provides them. They are
-described below. Each is of the form:
-
- boost::proto::transform::``[~transform-name]``< Grammar ``[~\[, additional args ...\]]`` >
+So far, we've seen how to write custom transforms using function types.
+These were implemented in terms of more primitive transforms provided by
+Proto, such as `_arg`, `_left`, and `_right`. This section describes those
+transforms and others in detail.
 
-They each inherit from their `Grammar` parameter; therefore, they themselves
-match the same expressions as `Grammar` does. As transforms, they all have
-nested static `call()` member functions that accept `expr`, `state`, and
-`visitor` parameters, as well as `apply<>` member templates for calculating
-the return type of `call()`. The tables below show what `call()` and `apply<>`
-do for each of the transforms that Proto provides.
+All the transforms defined in this section are of the following form:
 
-[section:arg_c_and_friends [^arg<>], [^arc_c<>], [^left<>] and [^right<>]]
-
- namespace boost { namespace proto { namespace transform
+ struct some_transform : callable
     {
- template<typename Grammar, typename N = mpl::long_<0> >
- struct arg;
+ template<typename Sig>
+ struct result;
 
- template<typename Grammar, long N>
- struct arg_c;
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ {
+ typedef ... type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ typename result<void(Expr, State, Visitor)>::type
+ operator()(Expr const &expr, State const &state, Visitor &visitor) const
+ {
+ return ...;
+ }
+ };
+
+So defined, `some_transform` is a transform "in the raw". It can be used
+without needing to explicitly specify any arguments to the transform. These
+are the building blocks from which you can compose larger transforms using
+function types.
 
- template<typename Grammar>
- struct left;
+[section:arg_c_and_friends [^_arg], [^_left], and [^_right]]
 
- template<typename Grammar>
- struct right;
- }}}
+ namespace boost { namespace proto
+ {
+ namespace transform
+ {
+ template<long N>
+ struct arg_c;
+
+ typedef arg_c<0> arg0;
+ typedef arg_c<1> arg1;
+ ...
+ typedef arg_c<9> arg9;
+
+ typedef arg_c<0> arg;
+ typedef arg_c<0> left;
+ typedef arg_c<1> right;
+ }
+
+ typedef transform::arg0 _arg0;
+ typedef transform::arg1 _arg1;
+ ...
+ typedef transform::arg9 _arg9;
+
+ typedef transform::arg _arg;
+ typedef transform::left _left;
+ typedef transform::right _right;
+ }}
 
 These transforms are useful for extracting the ['[^N]]th argument from an
-expression. The `left<Grammar>` transform is equivalent to the
-`arg_c<Grammar, 0>` transform, and the `right<Grammar>` transform is equivalent
-to the `arg_c<Grammar, 1>` transform.
+expression. The `_left` transform is equivalent to the `arg_c<0>` transform,
+and the `_right` transform is equivalent to the `arg_c<1>` transform.
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::arg<Grammar, N>::apply<Expr, State, Visitor>::type`]
- [`proto::result_of::arg<typename Grammar::apply<Expr, State, Visitor>::type, N>::type`]
- ]
- [ [`transform::arg<Grammar, N>::call(expr, state, visitor)`]
- [`proto::arg<N>(Grammar::call(expr, state, visitor))`]
- ]
- [ [`transform::arg_c<Grammar, N>::apply<Expr, State, Visitor>::type`]
- [`proto::result_of::arg_c<typename Grammar::apply<Expr, State, Visitor>::type, N>::type`]
+ [ [`transform::arg_c<N>::result<void(Expr, State, Visitor)>::type`]
+ [`proto::result_of::arg_c<Expr, N>::type`]
     ]
- [ [`transform::arg_c<Grammar, N>::call(expr, state, visitor)`]
- [`proto::arg_c<N>(Grammar::call(expr, state, visitor))`]
+ [ [`transform::arg_c<N>()(expr, state, visitor)`]
+ [`proto::arg_c<N>(expr)`]
     ]
- [ [`transform::left<Grammar>::apply<Expr, State, Visitor>::type`]
- [`proto::result_of::left<typename Grammar::apply<Expr, State, Visitor>::type>::type`]
+ [ [`transform::left::result<void(Expr, State, Visitor)>::type`]
+ [`proto::result_of::left<Expr>::type`]
     ]
- [ [`transform::left<Grammar>::call(expr, state, visitor)`]
- [`proto::left(Grammar::call(expr, state, visitor))`]
+ [ [`transform::left()(expr, state, visitor)`]
+ [`proto::left(expr)`]
     ]
- [ [`transform::right<Grammar>::apply<Expr, State, Visitor>::type`]
- [`proto::result_of::right<typename Grammar::apply<Expr, State, Visitor>::type>::type`]
+ [ [`transform::right::result<void(Expr, State, Visitor)>::type`]
+ [`proto::result_of::right<Expr>::type`]
     ]
- [ [`transform::right<Grammar>::call(expr, state, visitor)`]
- [`proto::right(Grammar::call(expr, state, visitor))`]
+ [ [`transform::right()(expr, state, visitor)`]
+ [`proto::right(expr)`]
     ]
 ]
 
@@ -325,391 +391,649 @@
 
     // Matches an integer terminal and extracts the int.
     struct Int
- : transform::arg< terminal<int> >
+ : when< terminal<int>, _arg >
     {};
 
 [endsect]
 
-[section:identity_and_friends [^identity<>], [^state<>] and [^visitor<>]]
+[section:identity_and_friends [^_expr], [^_state] and [^_visitor]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar>
- struct identity;
-
- template<typename Grammar>
- struct state;
-
- template<typename Grammar>
- struct visitor;
- }}}
-
-The `identity<>`, `state<>` and `visitor<>` transforms merely return the
-`expr`, `state` and `visitor` arguments, respectively.
+ namespace transform
+ {
+ struct expr;
+ struct state;
+ struct visitor;
+ }
+
+ typedef transform::expr _expr;
+ typedef transform::state _state;
+ typedef transform::visitor _visitor;
+ }}
+
+The `expr`, `state` and `visitor` transforms merely return the
+`expr`, `state` and `visitor` arguments, respectively. Proto's
+wildcard pattern, `_`, behaves like `transform::expr` when used
+as a transform.
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::identity<Grammar>::apply<Expr, State, Visitor>::type`]
+ [ [`_::result<void(Expr, State, Visitor)>::type`]
         [`Expr`]
     ]
- [ [`transform::identity<Grammar>::call(expr, state, visitor)`]
- [`expr`]
+ [ [`_()(expr_, state, visitor)`]
+ [`expr_`]
     ]
- [ [`transform::state<Grammar>::apply<Expr, State, Visitor>::type`]
+ [ [`transform::expr::result<void(Expr, State, Visitor)>::type`]
+ [`Expr`]
+ ]
+ [ [`transform::expr()(expr_, state, visitor)`]
+ [`expr_`]
+ ]
+ [ [`transform::state::result<void(Expr, State, Visitor)>::type`]
         [`State`]
     ]
- [ [`transform::state<Grammar>::call(expr, state, visitor)`]
- [`state`]
+ [ [`transform::state()(expr, state_, visitor)`]
+ [`state_`]
     ]
- [ [`transform::visitor<Grammar>::apply<Expr, State, Visitor>::type`]
+ [ [`transform::visitor::result<void(Expr, State, Visitor)>::type`]
         [`Visitor`]
     ]
- [ [`transform::visitor<Grammar>::call(expr, state, visitor)`]
- [`visitor`]
+ [ [`transform::visitor()(expr, state, visitor_)`]
+ [`visitor_`]
     ]
 ]
 
 Example:
 
     // Matches a subscript expression where the left- and right-hand operands
- // match MyGrammar, returns the expression unmodified; that is, without
- // applying MyGrammar's transforms to the left and right operands, as would
- // happen by default.
+ // match MyGrammar, returns the expression unmodified
     struct Subscript
- : transform::identity< subscript<MyGrammar, MyGrammar> >
+ : when< subscript<MyGrammar, MyGrammar>, _expr >
     {};
 
 [endsect]
 
-[section:always [^always<>]]
+[section:if [^if_<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar, typename Always, typename Factory = ``[~default-factory]``>
- struct always;
- }}}
+ namespace control
+ {
+ template<
+ typename If
+ , typename Then = _
+ , typename Else = not_<_>
+ >
+ struct if_;
+ }
 
-The `always<>` transform always returns a certain type. By default, its
-`call()` member returns a default constructed object of that type, but you can
-configure this with the optional `Factory` parameter.
+ using control::if_;
+ }}
+
+We've already seen the _if_ template in the context of grammars, but
+_if_ can also be used as a transform. It can be used to conditionally
+apply one transform or another based on some condition. The three
+template parameters are Proto transforms. The result of applying the
+first transform should be a compile-time Boolean. If it is true, then
+the first transform is applied. The second is applied otherwise.
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::always<Grammar, Type, Factory>::apply<Expr, State, Visitor>::type`]
- [`Type`]
+ [ [``control::if_<If, Then, Else>
+ ::result<void(Expr, State, Visitor)>::type``]
+ [``typedef
+ mpl::if_<
+ when<_, If>::result<void(Expr, State, Visitor)>::type
+ , when<_, Then>
+ , when<_, Else>
+ >::type
+branch;
+
+typedef branch::result<void(Expr, State, Visitor)>::type type;``]
     ]
- [ [`transform::always<Grammar, Type, Factory>::call(expr, state, visitor)`]
- [`Factory()()`]
+ [ [`control::if_<If, Then, Else>()(expr, state, visitor)`]
+ [``typedef ... branch; // Same as above
+branch()(expr, state, visitor);``]
     ]
 ]
 
 Example:
 
- // Match a placeholder terminal and return the arity of the
- // placeholder.
- struct PlaceholderArity
- : transform::always< terminal<placeholder1>, mpl::int_<1> >
+ // Match a terminal. If size of the terminal
+ // argument is less than or equal to 4, make
+ // a new terminal that stores the argument by
+ // value. Otherwise, store the argument by
+ // reference.
+ struct ByValOrRef
+ : when<
+ terminal<_>
+ , if_<
+ mpl::less_equal<
+ mpl::sizeof_<_arg>
+ , mpl::size_t<4>
+ >()
+ , _make_terminal(_arg)
+ , _make_terminal(_ref(_arg))
+ >
+ >
     {};
 
 [endsect]
 
-[section:applyn [^apply1<>], [^apply2<>] and [^apply3<>]]
+[section:and_or_not [^and_<>], [^or_<>], and [^not_<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar, typename Lambda, typename Factory = ``[~default-factory]``>
- struct apply1;
-
- template<typename Grammar, typename Lambda, typename Factory = ``[~default-factory]``>
- struct apply2;
-
- template<typename Grammar, typename Lambda, typename Factory = ``[~default-factory]``>
- struct apply3;
- }}}
+ namespace control
+ {
+ template<typename... T>
+ struct and_;
+
+ template<typename... T>
+ struct or_;
+
+ template<typename T>
+ struct not_;
+ }
+
+ using control::and_;
+ using control::or_;
+ using control::not_;
+ }}
+
+As with _if_, the grammar elements _and_, _or_, and _not_ can
+also be used as transforms. At a high level, here is what the
+transforms do:
+
+[variablelist
+[ [`and_<T0,T1,...,Tn>`]
+ [Apply the transform `Tn`.] ]
+[ [`or_<T0,T1,...,Tn>`]
+ [Apply the transform `Tx` where `x` is the lowest number
+ such that `matches<Expr,Tx>::value` is `true`.] ]
+[ [`not_<T>`] [Return the current expression unchanged.] ]
+]
 
-The `apply1<>` transform invokes an MPL lambda expression with the Proto
-expression as the argument, `apply2<>` uses the expression and the state
-as arguments and `apply3<>` uses the expression, state and visitor.
+The following table specifies the behaviors described above more
+precisely.
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::apply1<Grammar, Lambda, Factory>::apply<Expr, State, Visitor>::type`]
- [`mpl::apply1<Lambda, typename Grammar::apply<Expr, State, Visitor>::type>::type`]
- ]
- [ [`transform::apply1<Grammar, Lambda, Factory>::call(expr, state, visitor)`]
- [`Factory()(Grammar::call(expr, state, visitor))`]
- ]
- [ [`transform::apply2<Grammar, Lambda, Factory>::apply<Expr, State, Visitor>::type`]
- [`mpl::apply2<Lambda, typename Grammar::apply<Expr, State, Visitor>::type, State>::type`]
+ [ [``control::and_<A,B,C>
+ ::result<void(Expr, State, Visitor)>::type``]
+ [`C::result<void(Expr, State, Visitor)>::type`]
+ ]
+ [ [`control::and_<A,B,C>()(expr, state, visitor)`]
+ [`C()(expr, state, visitor)`]
+ ]
+ [ [``control::or_<A,B,C>
+ ::result<void(Expr, State, Visitor)>::type``]
+ [``typedef mpl::if_<
+ matches<Expr, A>
+ , A
+ , mpl::if_<
+ matches<Expr, B>
+ , B
+ , C
+ >::type
+>::type which;
+
+typedef which::result<void(Expr, State, Visitor)>::type type;``]
     ]
- [ [`transform::apply2<Grammar, Lambda, Factory>::call(expr, state, visitor)`]
- [`Factory()(Grammar::call(expr, state, visitor), state)`]
+ [ [`control::or_<A,B,C>()(expr, state, visitor)`]
+ [``typedef ... which; // Same as above
+which()(expr, state, visitor);``]
     ]
- [ [`transform::apply3<Grammar, Lambda, Factory>::apply<Expr, State, Visitor>::type`]
- [`mpl::apply3<Lambda, typename Grammar::apply<Expr, State, Visitor>::type, State, Visitor>::type`]
+ [ [``control::not_<A>
+ ::result<void(Expr, State, Visitor)>::type``]
+ [`Expr`]
     ]
- [ [`transform::apply3<Grammar, Lambda, Factory>::call(expr, state, visitor)`]
- [`Factory()(Grammar::call(expr, state, visitor), state, visitor)`]
+ [ [`control::not_<A>()(expr, state, visitor)`]
+ [`expr`]
     ]
 ]
 
-The `call()` member functions of Proto's `applyN<>` transforms simply return a
-default constructed object of the appropriate type by default. If you want a
-different behavior, you can specify a `Factory` type as the third template
-parameter.
-
 Example:
 
- // Another way to implement a transform that calculates the arity of a
- // binary Calculator expression. This code is functionally equivalent to
- // the binary_max<> transform defined above. The mpl::max<...> type below
- // is an MPL Placeholder expression (note the use of mpl::_) that
- // mpl::apply1<> knows how to evaluate. The effect of the
- // BinaryCalculatorArity grammar is to match binary Calculator expressions,
- // evaluate the arity of the left and right sub-expressions and return the
- // maximum of the two.
- struct BinaryCalculatorArity
- : transform::apply1<
- binary_expr<_, CalculatorArity, CalculatorArity>
- , mpl::max<result_of::left<mpl::_>, result_of::right<mpl::_> >
+ // A transform that matches any expression and
+ // unwraps any reference_wrapped terminals it
+ // finds.
+ struct UnwrapReference
+ : or_<
+ // Pass through terminals that are not
+ // reference_wrappers unchanged:
+ and_<
+ terminal<_>
+ , not_<if_<is_reference_wrapper<_arg>()> >
+ >
+ // For other terminals (i.e., reference_wrapper
+ // terminals), unwrap the reference:
+ , when<
+ terminal<_>
+ , terminal<unwrap_reference<_arg> >(_arg)
+ >
+ // Otherwise, match non-terminals and
+ // recurse.
+ , when<
+ nary_expr<_, vararg<UnwrapReference> >
+ >
+ >
+ {};
+
+The above transform serves to illustrate the behaviors of the _and_,
+_or_, and _not_ transforms, but it is admittedly contrived. The
+transform is more easily written as follows:
+
+ // Functionally identical to the UnwrapReference
+ // transform above:
+ struct UnwrapReference
+ : or_<
+ when<
+ terminal<reference_wrapper<_> >
+ , terminal<unwrap_reference<_arg> >(_arg)
+ >
+ , terminal<_>
+ , nary_expr<_, vararg<UnwrapReference> >
>
     {};
 
 [endsect]
 
-[section:branch [^branch<>]]
+[section:call [^call<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar, typename BranchState>
- struct branch;
- }}}
+ namespace transform
+ {
+ template<typename Fun>
+ struct call;
+ }
+
+ using transform::call;
+ }}
+
+The `call<>` transform is used to invoke callable transforms and evaluate
+their arguments. When you use a callable transform as in
+`when< posit<_>, Callable(_arg) >`, the `call<>` transform is used behind
+the scenes to evaluate `Callable(_arg)`. In fact, for any callable
+transform, the following short- and long-forms are equivalent:
+
+[table
+ [ [Short From]
+ [Long Form] ]
+ [ [ `when< Grammar, Callable(Tran1, Tran2...) >` ]
+ [ `when< Grammar, call< Callable(Tran1, Tran2...) > >` ] ]
+]
+
+You might decide to use `call<>` explicitly in cases when Proto
+can't figure out that a given transform is callable. (See the discussion on
+the `is_callable<>` trait TODO LINK.) Rather than specialize
+`proto::is_callable<>` for your transform, you can simply wrap its use in
+`call<>`, instead.
+
+[tip For users of legacy compilers like MSVC 7.1, `call<>` is useful to work
+around compiler bugs. Doubly-nested transforms such as `Callable(_arg1(_arg2))`
+cause older compilers problems, but the equivalent `Callable(call<_arg1(_arg2)>)`
+solves the problem.]
 
-The `branch<>` transform applies `Grammar`'s transform with a new `state`
-parameter. This is useful when you want to compile a branch of the expression
-tree independently of the rest; for example, when you want to fold everything
-under a certain child node into a list.
+The semantics of `call<>` are described in the table below:
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::branch<Grammar, BranchState>::apply<Expr, State, Visitor>::type`]
- [`typename Grammar::template apply<Expr, BranchState, Visitor>::type`]
- ]
- [ [`transform::branch<Grammar, BranchState>::call(expr, state, visitor)`]
- [`Grammar::call(expr, BranchState(), visitor)`]
+ [ [`call<Fun(A0, A1, ... AN)>::result<void(Expr, State, Visitor)>::type`]
+ [``boost::result_of<Fun(
+ when<_, A0>::result<void(Expr, State, Visitor)>::type
+ , when<_, A1>::result<void(Expr, State, Visitor)>::type
+ ...
+ , when<_, AN>::result<void(Expr, State, Visitor)>::type
+)>::type``]
+ ]
+ [ [`call<Fun(A0, A1, ... AN)>()(expr, state, visitor)`]
+ [``Fun()(
+ when<_, A0>()(expr, state, visitor)
+ , when<_, A1>()(expr, state, visitor)
+ ...
+ , when<_, AN>()(expr, state, visitor)
+)``]
     ]
 ]
 
+The target of a callable transform can be any function object that implements
+the Boost.ResultOf protocol. Function objects that take up to
+`BOOST_PROTO_MAX_ARITY` are handled.
+
+For callable transforms that take 0, 1, or 2 arguments, special handling is done
+to see if the transform actually expects 3 arguments, as Proto's primitive
+transforms do. (This can be detected with meta-programming tricks.) So, even
+though a transform like `_arg1` requires three parameters: expression,
+state and visitor; it can be "called" with just one, like `_arg1(_arg2)`. Proto
+treats this as if were `call<_arg1(_arg2, _state, _visitor)>`.
+
+If no transform arguments are specified at all, as in `call<_arg1>`, this is
+the same as `_arg1`. For this reason, `call<_arg1>(_arg2)` is the same as
+`call<_arg1(_arg2)>`.
+
 Example:
 
-See the [link reverse_fold_example [^reverse_fold<>] example].
+[LazyMakePair2]
 
 [endsect]
 
-[section:compose [^compose<>]]
+[section:make [^make<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar1, typename Grammar2>
- struct compose;
- }}}
+ namespace transform
+ {
+ template<typename Fun>
+ struct make;
+ }
+
+ using transform::make;
+ }}
+
+The `make<>` transform is used to construct objects and evaluate
+their constructor arguments. When you use an object transform as in
+`when< posit<_>, Object(_arg) >`, the `make<>` transform is used behind
+the scenes to evaluate `Object(_arg)`. In fact, for any object
+transform, the following short- and long-forms are equivalent:
 
-The `compose<>` transform applies two transformations in succession. It
-inherits from `Grammar1`, so it matches whatever `Grammar1` matches. The
-result of applying `Grammar1`'s transform is passed to `Grammar2`'s transform,
-along with the `state` and `visitor` parameters. It is assumed that the
-result of applying `Grammar1`'s transform is an expression that matches
-the grammar specified by `Grammar2`.
+[table
+ [ [Short From]
+ [Long Form] ]
+ [ [ `when< Grammar, Object(Tran1, Tran2...) >` ]
+ [ `when< Grammar, make< Object(Tran1, Tran2...) > >` ] ]
+]
 
-The `compose<>` transform is useful in situations where you would like to
-preprocess a node in the expression tree before forwarding it on for further
-processing.
+You might decide to use `make<>` to explicitly differentiate object
+transforms from callable transforms. (See `call<>`.)
+
+[tip For users of legacy compilers like MSVC 7.1, `make<>` is useful to work
+around compiler bugs. Doubly-nested transforms such as `Object1(Object2(_arg))`
+cause older compilers problems, but the equivalent `Object1(make<Object2(_arg)>)`
+solves the problem.]
+
+The `make<>` transform checks to see if the resulting object type is a template.
+If it is, the template type is disassembled to find nested transforms. Proto
+considers the following types to represent transforms:
+
+[def __type__ [~type]]
+[def __X__ X\']
+[def __X0__ X0\']
+[def __X1__ X1\']
+
+* Function types
+* Function pointer types
+* Types for which `proto::is_callable<__type__>::value` is `true`
+
+When an object transform with a template type such as
+`Object<X0,X1,...>(Args...)` is evaluated with a given
+`Expr`, `State`, and `Visitor`, the result type is
+`make_<Object<X0,X1,...>, Expr, State, Visitor>::type` which is
+defined as follows. For each `X` in `X0,X1,...`, do:
+
+* If `X` is a template like `Object2<Y0,Y1,...>`, then let `__X__`
+ be `make_<Object2<Y0,Y1,...>, Expr, State, Visitor>::type`
+ (which evaluates this procedure recursively). Note whether any
+ substitutions took place during this operation.
+* Otherwise, if `X` is a transform, then let `__X__` be
+ `when<_, X>::result<void(Expr, State, Visitor)>::type`.
+ Note that a substitution took place.
+* Otherwise, let `__X__` be `X`, and note that no substitution
+ took place.
+* If any substitutions took place in any of the above steps and
+ `Object<__X0__,__X1__,...>` has a nested `::type` typedef, the
+ result type is `Object<__X0__,__X1__,...>::type`.
+* Otherwise, the result type is `Object<__X0__,__X1__,...>`.
+
+Note that `when<>` is implemented in terms of `call<>` and `make<>`,
+so the above procedure is evaluated recursively.
+
+Given the above description of the `make_<>` helper, the semantics
+of the `make<>` transform is described as follows:
+
+[def __AN__ A[~N]]
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::compose<Grammar1, Grammar2>::apply<Expr, State, Visitor>::type`]
- [``typename Grammar2::template apply<
- typename Grammar1::template apply<Expr, State, Visitor>::type
- , State
- , Visitor
->::type``]
+ [ [`make<Object(A0, A1, ... __AN__)>::result<void(Expr, State, Visitor)>::type`]
+ [`make_<Object, Expr, State, Visitor>::type`]
     ]
- [ [`transform::compose<Grammar1, Grammar2>::call(expr, state, visitor)`]
- [``Grammar2::call(
- Grammar1::call(expr, state, visitor), state, visitor)``]
+ [ [`make<Object(A0, A1, ... __AN__)>()(expr, state, visitor)`]
+ [``make_<Object, Expr, State, Visitor>::type(
+ when<_, A0>()(expr, state, visitor)
+ , when<_, A1>()(expr, state, visitor)
+ ...
+ , when<_, __AN__>()(expr, state, visitor)
+)``]
     ]
 ]
 
+Objects with constructors that take up to `BOOST_PROTO_MAX_ARITY` are handled.
+Some types are so-called /aggregates/ that do not have constructors; rather,
+they use /aggregate initialization/. For these types, you can specialize
+`proto::is_aggregate<>` and Proto will use a brace initializer list to
+initialize the object rather than a constructor. Proto knows that `proto::expr<>`
+is such an aggregate, so if you use object transforms to "construct" a
+new node in an expression tree, the right thing happens.
+
+If no transform arguments are specified at all, as in `make<Object>`, this is
+the same as `make<Object()>`.
+
 Example:
 
- // A fragment of a Calculator grammar which uses compose<> to process
- // a node in the expression tree after it has been preprocessed by
- // an arg<> transform.
- struct Calculator
- : or_<
- // ...
- transform::compose<
- // Match anything of the form +X, and
- // extract X, discarding the +.
- transform::arg<posit<_> >
- // Now invoke the Calculator transform on X
- , Calculator
- >
- >
- {};
+[LazyMakePair]
 
 [endsect]
 
-[section:list [^list<>]]
+[section:bind [^bind<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar>
- struct list;
- }}}
+ namespace transform
+ {
+ template<typename Fun>
+ struct bind;
+ }
+
+ using transform::bind;
+ }}
+
+Sometimes you would like a higher-order transform that returns another
+transform to be evaluated. This can happen when you have a transform
+whose behavior needs to be parameterized on the current state of the
+transformation. For these situations, you can use the `bind<>` transform,
+which is essentially an invocation of the `make<>` transform (to evaluate
+any nested transforms and create the higher-order transform) followed
+by an invocation of `call<>` (to actually execute the higher-order
+transform).
 
-`list<>` is a simple transform that builds a fusion cons list, using the
-transformed expression as the list's head, and the state as the list's tail.
+The behavior of `bind<>` is easily specified in terms of `make<>` and
+`call<>`.
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::list<Grammar>::apply<Expr, State, Visitor>::type`]
- [``fusion::cons<
- typename Grammar::template apply<Expr, State, Visitor>::type
- , State
->``]
- ]
- [ [`transform::list<Grammar>::call(expr, state, visitor)`]
- [``fusion::cons<
- typename Grammar::template apply<Expr, State, Visitor>::type
- , State
->(Grammar::call(expr, state, visitor), state)``]
+ [ [`bind<Object(A0, A1, ... __AN__)>::result<void(Expr, State, Visitor)>::type`]
+ [``call<
+ make<Object>::result<void(Expr, State, Visitor)>::type(A0, A1, ... __AN__)
+>::result<void(Expr, State, Visitor)>::type``]
+ ]
+ [ [`bind<Object(A0, A1, ... __AN__)>()(expr, state, visitor)`]
+ [``call<
+ make<Object>::result<void(Expr, State, Visitor)>::type(A0, A1, ... __AN__)
+>()(expr, state, visitor)``]
     ]
 ]
 
-Example:
+If no transform arguments are specified at all, as in `bind<Object>`, this is
+the same as `bind<Object(_expr, _state, _visitor)>`.
+
+[endsect]
 
-See the [link reverse_fold_example [^reverse_fold<>] example].
+[section:when [^when<>]]
+
+ namespace boost { namespace proto
+ {
+ namespace transform
+ {
+ template<typename Grammar, typename Transform = Grammar>
+ struct when;
+ }
+
+ using transform::when;
+ }}
+
+`when<>` associates a grammar rule with a transform. It can be used
+in a grammar in place of the rule; that is, it behaves as a grammar
+rule. Expression tree nodes that match the grammar rule are processed
+with the associated transform; that is, `when<>` also behaves like
+a transform.
+
+When no transform is specified, as with `when< posit<Calculator> >`,
+the grammar is treated as the transform. Every grammar element has
+a default transform. For most, such as `posit<>`, the default transform
+is `pass_through<>`.
+
+The `when<>` transform is easily specified in terms of `call<>`,
+`make<>`, and the `is_callable<>` trait.
+
+[table
+ [ [Expression]
+ [Returns]
+ ]
+ [ [`when<Grammar, R(A0, A1, ... __AN__)>::result<void(Expr, State, Visitor)>::type`]
+ [``mpl::if_<
+ is_callable<R>
+ , call<R(A0, A1, ... __AN__)>
+ , make<R(A0, A1, ... __AN__)>
+>::type::result<void(Expr, State, Visitor)>::type``]
+ ]
+ [ [`when<Grammar, R(A0, A1, ... __AN__)>()(expr, state, visitor)`]
+ [``mpl::if_<
+ is_callable<R>
+ , call<R(A0, A1, ... __AN__)>
+ , make<R(A0, A1, ... __AN__)>
+>::type()(expr, state, visitor)``]
+ ]
+]
+
+If no transform arguments are specified, as in `when<Grammar, _arg>`, the
+transform is assumed to be callable; that is, it is equivalent to
+`when<Grammar, call<_arg> >`.
 
 [endsect]
 
 [section:fold [^fold<>] and [^reverse_fold<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar, typename State = void>
- struct fold;
-
- template<typename Grammar, typename State = void>
- struct reverse_fold;
- }}}
+ namespace transform
+ {
+ template<typename Sequence, typename State0, typename Fun>
+ struct fold;
+
+ template<typename Sequence, typename State0, typename Fun>
+ struct reverse_fold;
+ }
+
+ using transform::fold;
+ using transform::reverse_fold;
+ }}
 
 The transforms `fold<>` and `reverse_fold<>` are akin to the
-`std::accumulate()` algorithm in the STL. They iterate over some sequence and
-accumulate some state at each element. For Proto's `fold<>` and
-`reverse_fold<>`, the "elements" of the sequence are actually pairs consisting
-of the corresponding child grammars and expressions. The state is accumulated
-by applying the child grammar's transform to the corresponding child
-expression. The result of one transform is used as the state of the next
-transform, such that the transforms nest like Russian dolls. The `fold<>`
+`std::accumulate()` algorithm in the STL, or the `fold()` algorithm in
+Boost.Fusion. They iterate over some sequence and
+accumulate some state at each element. The `fold<>`
 transform iterates over the children in order, starting with the 0th child.
 The `reverse_fold<>` transform does it in reverse order, starting with the Nth
 child. (Note that for building things like cons lists, you'll often want to
 built it back-to-front with `reverse_fold<>`.)
 
-[def __arg_N__ proto_arg[~N]]
-[def __arg_N_sub_1__ proto_arg[~N-1]]
+Both `fold<>` and `reverse_fold<>` are implemented in terms of `fusion::fold<>`.
+The three template parameters must each be Proto transforms. The have the following
+meaning:
+
+* `Sequence`: A Proto transform that returns a Fusion sequence.
+* `State`: A Proto transform that returns the initial state of the fold.
+* `Fun`: A Proto transform representing the operation to perform at each
+ iteration of the fold algorithm.
+
+Often, the `Sequence` parameter is `proto::_`, which returns the current node
+in the Proto expression tree. Tree nodes are valid Fusion sequences, where
+the children are the elements of the sequence.
+
+The semantics of the `fold<>` and `reverse_fold<>` transforms can both be
+understood in terms of a helper struct, `as_callable<>`, which binds the
+visitor and the `Fun` transform into a binary function object for use by
+`fusion::fold()`. `as_callable<>` has the following behavior:
 
 [table
     [ [Expression]
         [Returns]
     ]
- [ [`transform::fold<Grammar>::apply<Expr, State, Visitor>::type`]
- [``typename Grammar::__arg_N__::apply<
- typename Expr::__arg_N__::proto_base_expr
- , typename Grammar::__arg_N_sub_1__::apply<
- typename Expr::__arg_N_sub_1__::proto_base_expr
- , // ...
- typename Grammar::proto_arg0::apply<
- typename Expr::proto_arg0::proto_base_expr, State, Visitor>::type
- // ...
- , Visitor
- >::type
- , Visitor
+ [ [`as_callable<Fun, Visitor>::result<void(Expr, State)>::type`]
+ [`when<_, Fun>::result<void(Expr, State, Visitor)>::type`]
+ ]
+ [ [`as_callable<Fun, Visitor>(visitor)(expr, state)`]
+ [`when<_, Fun>()(expr, state, visitor)`]
+ ]
+]
+
+With the above `as_callable<>` adaptor, `fold<>` and `reverse_fold<>`
+can be easily implemented in terms of `fusion::fold<>`:
+
+[table
+ [ [Expression]
+ [Returns]
+ ]
+ [ [`fold<Sequence, State0, Fun>::result<void(Expr, State, Visitor)>::type`]
+ [``fusion::result_of::fold<
+ when<_, Sequence>::result<void(Expr, State, Visitor)>::type
+ , when<_, State0>::result<void(Expr, State, Visitor)>::type
+ , as_callable<Fun, Visitor>
>::type``]
     ]
- [ [`transform::fold<Grammar>::call(expr, state, visitor)`]
- [``Grammar::__arg_N__::call(
- proto::arg_c<N>(expr)
- , Grammar::__arg_N_sub_1__::call(
- proto::arg_c<N-1>(expr)
- , // ...
- Grammar::proto_arg0::call(
- proto::arg_c<0>(expr), state, visitor)
- // ...
- , visitor
- )
- , visitor
+ [ [`fold<Sequence, State0, Fun>()(expr, state, visitor)`]
+ [``fusion::fold(
+ when<_, Sequence>()(expr, state, visitor)
+ , when<_, State0>()(expr, state, visitor)
+ , as_callable<Fun, Visitor>(visitor)
 )``]
     ]
- [ [`transform::reverse_fold<Grammar>::apply<Expr, State, Visitor>::type`]
- [``typename Grammar::proto_arg0::apply<
- typename Expr::proto_arg0::proto_base_expr
- , typename Grammar::proto_arg1::apply<
- typename Expr::proto_arg1::proto_base_expr
- , // ...
- typename Grammar::__arg_N__::apply<
- typename Expr::__arg_N__::proto_base_expr, State, Visitor>::type
- // ...
- , Visitor
+ [ [`reverse_fold<Sequence, State0, Fun>::result<void(Expr, State, Visitor)>::type`]
+ [``fusion::result_of::fold<
+ fusion::result_of::reverse<
+ when<_, Sequence>::result<void(Expr, State, Visitor)>::type
>::type
- , Visitor
+ , when<_, State0>::result<void(Expr, State, Visitor)>::type
+ , as_callable<Fun, Visitor>
>::type``]
     ]
- [ [`transform::reverse_fold<Grammar>::call(expr, state, visitor)`]
- [``Grammar::proto_arg0::call(
- proto::arg_c<0>(expr)
- , Grammar::proto_arg1::call(
- proto::arg_c<1>(expr)
- , // ...
- Grammar::__arg_N__::call(
- proto::arg_c<N>(expr), state, visitor)
- // ...
- , visitor
+ [ [`reverse_fold<Sequence, State0, Fun>()(expr, state, visitor)`]
+ [``fusion::fold(
+ fusion::reverse(
+ when<_, Sequence>()(expr, state, visitor)
     )
- , visitor
+ , when<_, State0>()(expr, state, visitor)
+ , as_callable<Fun, Visitor>(visitor)
 )``]
     ]
 ]
 
-Both the `fold<>` and `reverse_fold<>` transforms take an optional `State`
-template parameter. For non-`void` `State` parameters, the following
-equivalances hold:
-
-[table fold<> and reverse_fold<> Equivalencies
- [[Short-Cut Grammar] [Equivalent Grammar]]
- [[`transform::fold<Grammar, State>`] [``transform::branch<
- transform::fold<Grammar>
- , State
->``]]
- [[`transform::reverse_fold<Grammar, State>`][``transform::branch<
- transform::reverse_fold<Grammar>
- , State
->``]]
-]
-
 [#reverse_fold_example]Example:
 
 [AsArgList]
@@ -718,164 +1042,117 @@
 
 [section:fold_tree [^fold_tree<>] and [^reverse_fold_tree<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Tag, typename Grammar, typename State = void>
- struct fold_tree;
-
- template<typename Tag, typename Grammar, typename State = void>
- struct reverse_fold_tree;
- }}}
+ namespace transform
+ {
+ template<typename Sequence, typename State0, typename Fun>
+ struct fold_tree;
+
+ template<typename Sequence, typename State0, typename Fun>
+ struct reverse_fold_tree;
+ }
+
+ using transform::fold;
+ using transform::reverse_fold;
+ }}
 
 The `fold_tree<>` and `reverse_fold_tree<>` transforms recursively apply the
 `fold<>` and `reverse_fold<>` transforms to sub-trees that all share a common
-`Tag` type. This is useful for flattening trees into lists; for example, you
+tag type. This is useful for flattening trees into lists; for example, you
 might use `reverse_fold_tree<>` to flatten an expression tree like `a | b | c`
 into a Fusion list like `cons(a, cons(b, cons(c)))`.
 
 The `fold_tree<>` and `reverse_fold_tree<>` transforms are unlike the other
 transforms that Proto provides in that they operate on entire sub-trees rather
-than just single nodes within the tree. As a result, their interface is
-different. The `Tag` parameter is the type of the operator tag that behaves
-like a separator. The `Grammar` parameter represents that grammar that the
-separated sub-expressions must match, and the transform that will be applied
-to each. The optional `State` parameter is the initial state of the transform.
+than just single nodes within the tree.
 
 These are higher-level transforms, implemented in terms of the `fold<>`
-transform. They are probably best understood in terms of their definition,
-which is fairly small.
+and `reverse_fold<>` transforms and helper structs `fold_tree_<>` and
+`reverse_fold_tree_<>`, one of which is shown below:
 
- namespace detail
- {
- // fold_tree_ either recurses into the expression, if its Tag
- // matches, or else ends the recursion by matching Grammar and
- // applying its transform.
- template<typename Tag, typename Grammar>
- struct fold_tree_
- : or_<
- transform::fold<
- nary_expr<Tag, vararg<fold_tree_<Tag, Grammar> > >
- >
- , Grammar
- >
- {};
- }
-
- template<typename Tag, typename Grammar, typename State = void>
- struct fold_tree
- : transform::fold<
- nary_expr<Tag, vararg<detail::fold_tree_<Tag, Grammar> > >
- , State
+ // fold_tree_ either recurses into the expression, if its Grammar
+ // matches, or else ends the recursion by matching Grammar and
+ // applying its transform.
+ template<typename Grammar, typename Fun>
+ struct fold_tree_
+ : or_<
+ when<Grammar, fold<_, _state, fold_tree_<Grammar, Fun> > >
+ , when<_, Fun>
>
     {};
+
+The `reverse_fold_tree_<>` helper is specified similarly, only with
+`reverse_fold<>` instead of `fold<>`. With these two helpers, we can
+specify the behavior of `fold_tree<>` and `reverse_fold_tree<>` as
+follows:
 
-The `reverse_fold_tree<>` transform is specified similarly, only with
-`reverse_fold<>` instead of `fold<>`.
-
-Example:
-
-[FoldTreeToList]
-
-[endsect]
-
-[section:construct [^construct<>]]
-
- namespace boost { namespace proto { namespace transform
- {
- template<typename Grammar, typename Constructor>
- struct construct;
- }}}
-
-The `construct<>` transform is a flexible tool for transforming expressions
-into other types of objects. With it, you can specify both the type of the
-object to construct as well as what parameters to pass to its constructor. A
-typical usage of the `construct<>` transform is like this:
-
- transform::construct<
- terminal<float>
- , terminal<double>::type(transform::arg<_>)
+[table
+ [ [Expression]
+ [Returns]
+ ]
+ [ [``fold_tree<Sequence, State0, Fun>
+ ::result<void(Expr, State, Visitor)>::type``]
+ [``fold<
+ Sequence
+ , State0
+ , fold_tree_<
+ nary_expr<Expr::proto_tag, vararg<_> >
+ , Fun
>
-
-The first template parameter is the grammar to match; in this case, terminals
-of type `float`. The second template parameter might look a little strange. It
-is actually a function type, but here we're using it to describe what object to
-construct and how to initialize it. In this case, we will be constructing a
-`double` terminal, using the argument from the `float` terminal. This transform
-effectively promotes a `float` to a `double`.
-
-The `Constructor` template parameter is a function type of the following form:
-
- ResultType(Transform1, Transform2, ...)
-
-where `Transform1`, `Transform2`, etc, are Proto transforms. They specify what
-arguments should be used to construct the `ResultType` object. The way it works
-is as follows. Consider the transform `transform::construct<G, R(T)>`, and an
-expression object `e` of type `E` that matches `G`. Then the result will be an
-object of type `R` constructed like this:
-
- E2 e2 = G::call(e, s, v);
- R(T::call(e2, s, v));
-
-where `s` and `v` are some state and visitor parameters, and `E2` is the return
-type of `G::call(e,s,v)`. Note that `G`'s transform is applied first, followed
-by `T`'s transform.
-
-The result type itself may be specified in terms of Proto transforms. In that
-case, the return type is the result of applying the transforms and substituting
-the transforms with the results. Consider the following code that matches an
-invocation of a lazy `make_pair_` function, and actually returns a
-`std::pair<>` of the correct type.
-
-[LazyMakePair]
-
-Notice that the result type, `std::pair<...>`, is specified in terms of Proto
-transforms. Notice also that Proto transforms are used to specify how to
-construct the `std::pair<>` object. We can now use the `MakePair` transform to
-convert a lazy `make_pair_()` function invocation into an actual `std::pair<>`:
-
-[LazyMakePairTest]
-
-The above code would display the following:
-
-[pre
-1
-3.14
+>::result<void(Expr, State, Visitor)>::type``]
+ ]
+ [ [`fold_tree<Sequence, State0, Fun>()(expr, state, visitor)`]
+ [``fold<
+ Sequence
+ , State0
+ , fold_tree_<
+ nary_expr<Expr::proto_tag, vararg<_> >
+ , Fun
+ >
+>()(expr, state, visitor)``]
+ ]
+ [ [``reverse_fold_tree<Sequence, State0, Fun>
+ ::result<void(Expr, State, Visitor)>::type``]
+ [``reverse_fold<
+ Sequence
+ , State0
+ , reverse_fold_tree_<
+ nary_expr<Expr::proto_tag, vararg<_> >
+ , Fun
+ >
+>::result<void(Expr, State, Visitor)>::type``]
+ ]
+ [ [`reverse_fold_tree<Sequence, State0, Fun>()(expr, state, visitor)`]
+ [``reverse_fold<
+ Sequence
+ , State0
+ , reverse_fold_tree_<
+ nary_expr<Expr::proto_tag, vararg<_> >
+ , Fun
+ >
+>()(expr, state, visitor)``]
+ ]
 ]
 
-When building the result type, if the result of applying a Proto transform is a
-type that has a nested `::type` member typedef, then that type is used instead.
-For instance, here is a transform that matches an integer and negates it lazily
-by wrapping it in a `negate<>` node.
-
-[NegateInt]
-
-The return type is `negate<_>`, but what is actually constructed is
-`negate<terminal<int>::type>::type`. This behavior should seem familiar if you
-have ever used MPL Placeholder expressions.
-
-The `construct<>` transform gives you a simple and convenient syntax for
-creating temporary sub-objects. In the `Constructor` expression
-`ResultType(Transform1, Transform2)`, if the type of `Transform1` is a function
-type, then it is converted into the transform `construct<_, Transform1>`. The
-following example demonstrates how to match an integer, promote it to a long
-integer, and lazily square it.
-
-[SquareAndPromoteInt]
+Example:
 
-The "arguments" to the constructor are `terminal<long>::type(transform::arg<_>)`,
-which is short-cut syntax for a nested `construct<>` transform. [footnote The
-short-cut syntax for nested constructors does not work on MSVC due to compiler
-bugs.]
+[FoldTreeToList]
 
 [endsect]
 
 [section:pass_through [^pass_through<>]]
 
- namespace boost { namespace proto { namespace transform
+ namespace boost { namespace proto
     {
- template<typename Grammar>
- struct pass_through;
- }}}
+ namespace transform
+ {
+ template<typename Grammar>
+ struct pass_through;
+ }
+
+ using transform::pass_through;
+ }}
 
 The `pass_through<>` transform iterates over the pairs of
 children in the grammar and the expression, applying the child grammar's
@@ -895,22 +1172,30 @@
     [ [Expression]
         [Returns]
     ]
- [ [`transform::pass_through<Grammar>::apply<Expr, State, Visitor>::type`]
+ [ [``transform::pass_through<Grammar>
+ ::result<void(Expr, State, Visitor)>::type``]
         [``typename nary_expr<
- typename Expr::proto_tag
- , typename Grammar::proto_arg0::apply<typename Expr::proto_arg0::proto_base_expr, State, Visitor>::type
- , typename Grammar::proto_arg1::apply<typename Expr::proto_arg1::proto_base_expr, State, Visitor>::type
+ Expr::proto_tag
+ , result_of::arg_c<Grammar, 0>::type::result<
+ void(result_of::arg_c<Expr, 0>::type, State, Visitor)>::type
+ , result_of::arg_c<Grammar, 1>::type::result<
+ void(result_of::arg_c<Expr, 1>::type, State, Visitor)>::type
     // ...
- , typename Grammar::__arg_N__::apply<typename Expr::__arg_N__::proto_base_expr, State, Visitor>::type
+ , result_of::arg_c<Grammar, N>::type::result<
+ void(result_of::arg_c<Expr, N>::type, State, Visitor)>::type
>::type``]
     ]
- [ [`transform::pass_through<Grammar>::call(expr, state, visitor)`]
- [``transform::pass_through<Grammar>::apply<Expr, State, Visitor>::type::make(
- Grammar::proto_arg0::call(proto::arg_c<0>(expr), state, visitor)
- , Grammar::proto_arg1::call(proto::arg_c<1>(expr), state, visitor)
- // ...
- , Grammar::__arg_N__::call(proto::arg_c<N>(expr), state, visitor)
-)``]
+ [ [`transform::pass_through<Grammar>()(expr, state, visitor)`]
+ [``transform::pass_through<Grammar>
+ ::result<void(Expr, State, Visitor)>::type::make(
+ result_of::arg_c<Grammar, 0>::type()(
+ proto::arg_c<0>(expr), state, visitor)
+ , result_of::arg_c<Grammar, 1>::type()(
+ proto::arg_c<1>(expr), state, visitor)
+ // ...
+ , result_of::arg_c<Grammar, N>::type()(
+ proto::arg_c<N>(expr), state, visitor)
+ )``]
     ]
 ]
 
@@ -922,4 +1207,210 @@
 
 [endsect]
 
+[/======================================================]
+[section:user_defined_transforms User-Defined Transforms]
+[/======================================================]
+
+In previous sections, we've seen how to compose larger transforms
+out of smaller transforms using function types.
+We've also seen the primitive transforms that Proto provides.
+So-called primitive transforms can be used without specifying
+arguments, like `_arg0` which returns the first child of the
+current node. But primitive transforms are not special in any way.
+They are merely ternary function objects that take the current
+expression, state and visitor as arguments.
+
+You can define your own primitive transforms. You might want to
+do this if your transform is complicated and composing it out
+of primitives becomes unwieldy. You might also do this
+to work around compiler bugs on legacy compilers that makes
+composing transforms using function types problematic. Finally,
+you might also decide to define your own primitive transforms
+to improve compile times. Since Proto can simply invoke a
+primitive transform directly without having to process arguments
+or differentiate callable transforms from object transforms,
+primitive transforms are more efficient.
+
+To define your own primitive transform, merely define a ternary
+function object that accepts an expression, a state and a visitor.
+Here, for example, is how Proto defines the `arg_c<>` transform:
+
+ namespace boost { namespace proto { namespace transform
+ {
+ // A transform that returns the I-th child
+ template<int I>
+ struct arg_c : callable
+ {
+ // Nested "result" template, used by
+ // boost::result_of<> to compute the
+ // return type of the function.
+ template<typename Sig>
+ struct result;
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
+ : proto::result_of::arg_c<Expr, I>
+ {};
+
+ // Function call operator that actually
+ // executes the transform.
+ template<typename Expr, typename State, typename Visitor>
+ typename proto::result_of::arg_c<Expr, I>::const_reference
+ operator ()(Expr const &expr, State const &, Visitor &) const
+ {
+ return proto::arg_c<I>(expr);
+ }
+ };
+ }}}
+
+ namespace boost { namespace proto
+ {
+ // Note that arg_c<I> is callable, so that
+ // it can be used with arguments, as:
+ // arg_c<0>(arg_c<1>)
+ template<int I>
+ struct is_callable<transform::arg_c<I> >
+ : mpl::true_
+ {};
+ }}
+
+There is nothing particularly special about the definition of
+`arg_c<>`. It is just an ordinary polymorphic function object. The
+only interesting bit is the `is_callable<>` specialization, which
+will be described in the section called "Making Your Transform
+Callable".
+
+Once you have defined such a ternary function object, you can use
+it as a transform without any arguments and Proto will automatically
+pass it the current expression, state and visitor parameters.
+
+[endsect]
+
+[/=================================================]
+[section:is_callable Making Your Transform Callable]
+[/=================================================]
+
+Transforms are typically of the form `when< Something, R(A0,A1,...) >`. The
+question is whether `R` represents a function to call or an object to
+construct, and the answer determines how `when<>` evaluates the transform.
+`when<>` uses the `is_callable<>` trait to disambiguate between the two.
+Proto does its best to guess whether a transform is callable or not, but
+it doesn't always get it right. It's best to know the rules Proto uses,
+so that you know when you need to specialize `is_callable<>`.
+
+The first thing to know is that templates are not considered callable
+by default. This is true ['even if the template inherits from
+`proto::callable`]. Consider the following erroneous transform:
+
+ // Proto can't tell this defines a
+ // callable transform!
+ template<typename T>
+ struct times2 : callable
+ {
+ typedef T result_type;
+
+ T operator()(T i) const
+ {
+ return i * 2;
+ }
+ };
+
+ // ERROR! This is not going to
+ // multiply the int by 2.
+ struct IntTimes2
+ : when< terminal<int>, times2<int>(_arg) >
+ {};
+
+The problem is that Proto doesn't know that `times2<int>` is a callable
+transform. Instead, it assumes it's an object transform and will try to
+construct a `times2<int>` object and initialize it will an `int`. That
+will not compile.
+
+[note Why can't Proto tell that `times2<int>` is callable? After all,
+it inherits from `proto::callable`, and that is detectable, right?
+In fact, determining whether some type `X<Y>` inherits from
+`callable` will cause the template `X<Y>` to be instantiated. That's a
+problem for a type like `std::vector<_arg(_arg1)>()`, which is a valid
+transform that default-constructs a particular instantiation of
+`std::vector<>`. But `std::vector<>` will not suffer to be instantiated
+with `_arg(_arg1)` as a template parameter! As a result, Proto has
+to assume that a type `X<Y>` represents an object transform and not
+a callable transform.]
+
+There are a couple of solutions to the `times2<int>` problem. One
+solution is to wrap the transform in `call<>`. This forces Proto to
+treat `times2<int>` as callable:
+
+ // OK, calls times2<int>
+ struct IntTimes2
+ : when< terminal<int>, call<times2<int>(_arg)> >
+ {};
+
+This can be a bit of a pain, because we need to wrap every use of
+`times2<int>`, which can be tedious and error prone, and makes our
+grammar cluttered and harder to read.
+
+Another solution is to specialize `proto::is_callable<>` on our
+`times2<>` template:
+
+ namespace boost { namespace proto
+ {
+ template<typename T>
+ struct is_callable<times2<T> >
+ : mpl::true_
+ {};
+ }}
+
+ // OK, times2<> is callable
+ struct IntTimes2
+ : when< terminal<int>, times2<int>(_arg) >
+ {};
+
+This is better, but still a pain because of the need to open
+Proto's namespace.
+
+You could simply make sure that the transform is not
+a template. Consider the following:
+
+ // No longer a template!
+ struct times2int : times2<int> {};
+
+ // OK, times2int is callable
+ struct IntTimes2
+ : when< terminal<int>, times2int(_arg) >
+ {};
+
+This works because now Proto can tell that `times2int` inherits
+(indirectly) from `proto::callable`. Any non-template types can
+be safely checked for inheritance because, as they are not
+templates, there is no worry about instantiation errors.
+
+There is one last way to tell Proto that `times2<>` is callable.
+You could add an extra dummy template parameter that defaults
+to `proto::callable`:
+
+ // Proto will recognize this as callable
+ template<typename T, typename Dummy = callable>
+ struct times2 : callable
+ {
+ typedef T result_type;
+
+ T operator()(T i) const
+ {
+ return i * 2;
+ }
+ };
+
+ // OK, this works!
+ struct IntTimes2
+ : when< terminal<int>, times2<int>(_arg) >
+ {};
+
+Note that in addition to the extra template parameter, `times2<>`
+still inherits from `callable`. That's not necessary in this example
+but it's good style because any types derived from `times2<>` (as
+`times2int` defined above) will still be considered callable.
+
+[endsect]
+
 [endsect]

Modified: branches/CMake/release/libs/xpressive/proto/example/Jamfile.v2
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/Jamfile.v2 (original)
+++ branches/CMake/release/libs/xpressive/proto/example/Jamfile.v2 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -53,3 +53,18 @@
         mixed.cpp
     ;
 
+exe futures
+ :
+ futures.cpp
+ ;
+
+exe map_assign
+ :
+ map_assign.cpp
+ ;
+
+exe lambda
+ :
+ lambda.cpp
+ ;
+

Modified: branches/CMake/release/libs/xpressive/proto/example/calc1.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/calc1.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/calc1.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,5 +1,5 @@
 //[ Calc1
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -12,11 +12,11 @@
 #include <boost/xpressive/proto/context.hpp>
 using namespace boost;
 
-template<typename I> struct arg {};
+template<int I> struct placeholder {};
 
 // Define some placeholders
-proto::terminal< arg< mpl::int_<1> > >::type const _1 = {{}};
-proto::terminal< arg< mpl::int_<2> > >::type const _2 = {{}};
+proto::terminal< placeholder< 1 > >::type const _1 = {{}};
+proto::terminal< placeholder< 2 > >::type const _2 = {{}};
 
 // Define a calculator context, for evaluating arithmetic expressions
 struct calculator_context
@@ -35,10 +35,10 @@
     }
 
     // Handle the evaluation of the placeholder terminals
- template<typename I>
- double operator()(proto::tag::terminal, arg<I>) const
+ template<int I>
+ double operator ()(proto::tag::terminal, placeholder<I>) const
     {
- return d[ I() - 1 ];
+ return d[ I - 1 ];
     }
 };
 
@@ -60,7 +60,7 @@
     // Displays "6"
     std::cout << evaluate( _1 * _2, 3.0, 2.0 ) << std::endl;
 
- // Displays "1.5"
+ // Displays "0.5"
     std::cout << evaluate( (_1 - _2) / _2, 3.0, 2.0 ) << std::endl;
 
     return 0;

Modified: branches/CMake/release/libs/xpressive/proto/example/calc2.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/calc2.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/calc2.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,11 +1,11 @@
 //[ Calc2
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
 // This example enhances the simple arithmetic expression evaluator
 // in calc1.cpp by using proto::extends to make arithemetic
-// expressions immediately evaluatable with operator(), a-la a
+// expressions immediately evaluatable with operator (), a-la a
 // function object
 
 #include <iostream>
@@ -15,9 +15,9 @@
 using namespace boost;
 
 // Will be used to define the placeholders _1 and _2
-template<typename I> struct arg {};
+template<int I> struct placeholder {};
 
-// For expressions in the calculator domain, operator()
+// For expressions in the calculator domain, operator ()
 // will be special; it will evaluate the expression.
 struct calculator_domain;
 
@@ -39,15 +39,15 @@
     }
 
     // Handle the evaluation of the placeholder terminals
- template<typename I>
- double operator()(proto::tag::terminal, arg<I>) const
+ template<int I>
+ double operator ()(proto::tag::terminal, placeholder<I>) const
     {
- return d[ I() - 1 ];
+ return d[ I - 1 ];
     }
 };
 
 // Wrap all calculator expressions in this type, which defines
-// operator() to evaluate the expression.
+// operator () to evaluate the expression.
 template<typename Expr>
 struct calculator_expression
   : proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
@@ -55,27 +55,27 @@
     typedef
         proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
     base_type;
-
+
     explicit calculator_expression(Expr const &expr = Expr())
       : base_type(expr)
     {}
 
- using base_type::operator=;
+ using base_type::operator =;
 
- // Override operator() to evaluate the expression
- double operator()() const
+ // Override operator () to evaluate the expression
+ double operator ()() const
     {
         calculator_context const ctx;
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1) const
+ double operator ()(double d1) const
     {
         calculator_context const ctx(d1);
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1, double d2) const
+ double operator ()(double d1, double d2) const
     {
         calculator_context const ctx(d1, d2);
         return proto::eval(*this, ctx);
@@ -88,8 +88,8 @@
 {};
 
 // Define some placeholders (notice they're wrapped in calculator_expression<>)
-calculator_expression<proto::terminal< arg< mpl::int_<1> > >::type> const _1;
-calculator_expression<proto::terminal< arg< mpl::int_<2> > >::type> const _2;
+calculator_expression<proto::terminal< placeholder< 1 > >::type> const _1;
+calculator_expression<proto::terminal< placeholder< 2 > >::type> const _2;
 
 // Now, our arithmetic expressions are immediately executable function objects:
 int main()
@@ -100,7 +100,7 @@
     // Displays "6"
     std::cout << ( _1 * _2 )( 3.0, 2.0 ) << std::endl;
 
- // Displays "1.5"
+ // Displays "0.5"
     std::cout << ( (_1 - _2) / _2 )( 3.0, 2.0 ) << std::endl;
 
     return 0;

Modified: branches/CMake/release/libs/xpressive/proto/example/calc3.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/calc3.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/calc3.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,11 +1,11 @@
 //[ Calc3
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
 // This example enhances the arithmetic expression evaluator
 // in calc2.cpp by using a proto transform to calculate the
-// number of arguments an expression requires and using a
+// number of arguments an expression requires and using a
 // compile-time assert to guarantee that the right number of
 // arguments are actually specified.
 
@@ -15,59 +15,11 @@
 #include <boost/mpl/min_max.hpp>
 #include <boost/xpressive/proto/proto.hpp>
 #include <boost/xpressive/proto/context.hpp>
-#include <boost/xpressive/proto/transform/arg.hpp>
-#include <boost/xpressive/proto/transform/fold.hpp>
-#include <boost/xpressive/proto/transform/apply.hpp>
+#include <boost/xpressive/proto/transform.hpp>
 using namespace boost;
 
 // Will be used to define the placeholders _1 and _2
-template<typename I> struct arg { typedef I arity; };
-
-// A meta-function for getting a placeholder terminal's arity.
-template<typename Arg>
-struct arg_arity
-{
- typedef typename Arg::arity type;
-};
-
-// A custom transform that fetches the arity of a placeholder terminal
-template<typename Grammar>
-struct placeholder_arity
- : Grammar
-{
- template<typename Expr, typename, typename>
- struct apply
- : arg_arity<typename proto::result_of::arg<Expr>::type>
- {};
-
- //// If this transform had a runtime counterpart, it would look like this:
- //template<typename Expr, typename State, typename Visitor>
- //static typename apply<Expr, State, Visitor>::type
- //call(Expr const &expr, State const &state, Visitor &visitor)
- //{
- // ... do stuff ...
- //}
-};
-
-// A custom transforms for calculating the max arity of a calculator expression
-template<typename Grammar>
-struct max_arity
- : Grammar
-{
- template<typename Expr, typename State, typename Visitor>
- struct apply
- {
- // Calculate the arity of the current expression.
- typedef typename Grammar::template apply<Expr, State, Visitor>::type arity;
- // The old maximum is passed along in the State parameter by
- // proto::transform::fold<> (see below). The new maximum is the
- // larger of the old maximum and the arity we just calculated.
- typedef typename mpl::max<arity, State>::type type;
- };
-
- // As with placeholder_arity<> above, placeholder_arity<> has no need
- // for a call() member function.
-};
+template<typename I> struct placeholder : I {};
 
 using proto::_;
 
@@ -79,41 +31,18 @@
 // expression arity for each of the three cases.
 struct CalculatorGrammar
   : proto::or_<
- // placeholders have a non-zero arity ...
- placeholder_arity< proto::terminal< arg<_> > >
 
- //// This accomplishes the same thing without the need to
- //// define a separate placeholder_arity<> transform, but
- //// is a little more cryptic.
- //proto::transform::apply1<
- // proto::terminal< arg<_> >
- // , arg_arity< proto::result_of::arg<mpl::_> >
- //>
+ // placeholders have a non-zero arity ...
+ proto::when< proto::terminal< placeholder<_> >, proto::_arg >
 
         // Any other terminals have arity 0 ...
- , proto::transform::always< proto::terminal<_>, mpl::int_<0> >
+ , proto::when< proto::terminal<_>, mpl::int_<0>() >
+
         // For any non-terminals, find the arity of the children and
         // take the maximum. This is recursive.
- , proto::transform::fold<
- // This matches any non-terminal for which the children
- // are themselves calculator expressions.
- proto::nary_expr<_, proto::vararg< max_arity< CalculatorGrammar > > >
-
- //// This accomplishes the same thing without the need to
- //// define a separate max_arity<> transform, but is a little
- //// more cryptic.
- //proto::nary_expr<
- // _
- // , proto::vararg<
- // // Here, mpl::_1 will be replaced with the result of applying
- // // the CalculatorGrammar transform (i.e., the arity of the
- // // child node), and mpl::_2 will be replaced with the State of
- // // the transformation so far (i.e., the maximum arity found so
- // // far).
- // proto::transform::apply2<CalculatorGrammar, mpl::max<mpl::_1, mpl::_2> >
- // >
- //>
- >
+ , proto::when< proto::nary_expr<_, proto::vararg<_> >
+ , proto::fold<_, mpl::int_<0>(), mpl::max<CalculatorGrammar, proto::_state>() > >
+
>
 {};
 
@@ -122,10 +51,10 @@
 // is not used, is mpl::void_.
 template<typename Expr>
 struct calculator_arity
- : CalculatorGrammar::apply<Expr, mpl::int_<0>, mpl::void_>
+ : boost::result_of<CalculatorGrammar(Expr, mpl::int_<0>, mpl::void_)>
 {};
 
-// For expressions in the calculator domain, operator()
+// For expressions in the calculator domain, operator ()
 // will be special; it will evaluate the expression.
 struct calculator_domain;
 
@@ -148,14 +77,14 @@
 
     // Handle the evaluation of the placeholder terminals
     template<typename I>
- double operator()(proto::tag::terminal, arg<I>) const
+ double operator ()(proto::tag::terminal, placeholder<I>) const
     {
         return d[ I() - 1 ];
     }
 };
 
 // Wrap all calculator expressions in this type, which defines
-// operator() to evaluate the expression.
+// operator () to evaluate the expression.
 template<typename Expr>
 struct calculator_expression
   : proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
@@ -163,15 +92,15 @@
     typedef
         proto::extends<Expr, calculator_expression<Expr>, calculator_domain>
     base_type;
-
+
     explicit calculator_expression(Expr const &expr = Expr())
       : base_type(expr)
     {}
 
- using base_type::operator=;
+ using base_type::operator =;
 
- // Override operator() to evaluate the expression
- double operator()() const
+ // Override operator () to evaluate the expression
+ double operator ()() const
     {
         // Assert that the expression has arity 0
         BOOST_MPL_ASSERT_RELATION(0, ==, calculator_arity<Expr>::type::value);
@@ -179,7 +108,7 @@
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1) const
+ double operator ()(double d1) const
     {
         // Assert that the expression has arity 1
         BOOST_MPL_ASSERT_RELATION(1, ==, calculator_arity<Expr>::type::value);
@@ -187,7 +116,7 @@
         return proto::eval(*this, ctx);
     }
 
- double operator()(double d1, double d2) const
+ double operator ()(double d1, double d2) const
     {
         // Assert that the expression has arity 2
         BOOST_MPL_ASSERT_RELATION(2, ==, calculator_arity<Expr>::type::value);
@@ -202,8 +131,8 @@
 {};
 
 // Define some placeholders (notice they're wrapped in calculator_expression<>)
-calculator_expression<proto::terminal< arg< mpl::int_<1> > >::type> const _1;
-calculator_expression<proto::terminal< arg< mpl::int_<2> > >::type> const _2;
+calculator_expression<proto::terminal< placeholder< mpl::int_<1> > >::type> const _1;
+calculator_expression<proto::terminal< placeholder< mpl::int_<2> > >::type> const _2;
 
 // Now, our arithmetic expressions are immediately executable function objects:
 int main()
@@ -214,7 +143,7 @@
     // Displays "6"
     std::cout << ( _1 * _2 )( 3.0, 2.0 ) << std::endl;
 
- // Displays "1.5"
+ // Displays "0.5"
     std::cout << ( (_1 - _2) / _2 )( 3.0, 2.0 ) << std::endl;
 
     // This won't compile because the arity of the

Modified: branches/CMake/release/libs/xpressive/proto/example/hello.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/hello.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/hello.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
 //[ HelloWorld
 ////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -10,7 +10,7 @@
 #include <boost/typeof/std/ostream.hpp>
 using namespace boost;
 
-proto::terminal< std::ostream & >::type cout_ = { std::cout };
+proto::terminal< std::ostream & >::type cout_ = {std::cout};
 
 template< typename Expr >
 void evaluate( Expr const & expr )

Modified: branches/CMake/release/libs/xpressive/proto/example/lazy_vector.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/lazy_vector.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/lazy_vector.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
 //[ LazyVector
 ///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -22,13 +22,13 @@
 using proto::_;
 
 // This grammar describes which lazy vector expressions
-// are allowed; namely, vector terminals and addition
+// are allowed; namely, vector terminals and addition
 // and subtraction of lazy vector expressions.
 struct LazyVectorGrammar
   : proto::or_<
         proto::terminal< std::vector<_> >
- , proto::plus< LazyVectorGrammar, LazyVectorGrammar>
- , proto::minus< LazyVectorGrammar, LazyVectorGrammar>
+ , proto::plus< LazyVectorGrammar, LazyVectorGrammar >
+ , proto::minus< LazyVectorGrammar, LazyVectorGrammar >
>
 {};
 
@@ -57,7 +57,7 @@
     {
         typedef typename proto::result_of::arg<Expr>::type::value_type result_type;
 
- result_type operator()( Expr const & expr, lazy_subscript_context & ctx ) const
+ result_type operator ()( Expr const & expr, lazy_subscript_context & ctx ) const
         {
             return proto::arg( expr )[ ctx.subscript_ ];
         }
@@ -67,7 +67,7 @@
 };
 
 // Here is the domain-specific expression wrapper, which overrides
-// operator[] to evaluate the expression using the lazy_subscript_context.
+// operator [] to evaluate the expression using the lazy_subscript_context.
 template<typename Expr>
 struct lazy_vector_expr
   : proto::extends<Expr, lazy_vector_expr<Expr>, lazy_vector_domain>

Modified: branches/CMake/release/libs/xpressive/proto/example/mixed.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/mixed.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/mixed.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
 //[ Mixed
 ///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -18,12 +18,14 @@
 #include <boost/xpressive/proto/proto.hpp>
 #include <boost/xpressive/proto/debug.hpp>
 #include <boost/xpressive/proto/context.hpp>
+#include <boost/xpressive/proto/transform.hpp>
 #include <boost/typeof/std/list.hpp>
 #include <boost/typeof/std/vector.hpp>
 #include <boost/typeof/std/complex.hpp>
 
-using namespace boost;
-using proto::_;
+namespace proto = boost::proto;
+namespace mpl = boost::mpl;
+using namespace proto;
 
 template<typename Expr>
 struct MixedExpr;
@@ -38,30 +40,24 @@
     Iter it;
 };
 
-template<typename Cont>
-iterator_wrapper<typename Cont::const_iterator> cbegin(Cont const &cont)
+struct begin : proto::callable
 {
- return iterator_wrapper<typename Cont::const_iterator>(cont.begin());
-}
+ template<class Sig>
+ struct result;
 
-template<typename Grammar>
-struct begin
- : Grammar
-{
- template<typename Expr, typename State, typename Visitor>
- struct apply
- : proto::terminal<
- iterator_wrapper<
- typename proto::result_of::arg<Expr>::type::const_iterator
- >
+ template<class This, class Cont>
+ struct result<This(Cont)>
+ : proto::result_of::as_expr<
+ iterator_wrapper<typename boost::remove_reference<Cont>::type::const_iterator>
>
     {};
 
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ template<typename Cont>
+ typename result<begin(Cont const &)>::type
+ operator ()(Cont const &cont) const
     {
- return proto::as_expr(cbegin(proto::arg(expr)));
+ iterator_wrapper<typename Cont::const_iterator> it(cont.begin());
+ return proto::as_expr(it);
     }
 };
 
@@ -69,10 +65,10 @@
 // begin iterators
 struct Begin
   : proto::or_<
- begin< proto::terminal< std::vector<_, _> > >
- , begin< proto::terminal< std::list<_, _> > >
- , proto::terminal<_>
- , proto::nary_expr<_, proto::vararg<Begin> >
+ when< proto::terminal< std::vector<_, _> >, begin(_arg) >
+ , when< proto::terminal< std::list<_, _> >, begin(_arg) >
+ , when< proto::terminal<_> >
+ , when< proto::nary_expr<_, proto::vararg<Begin> > >
>
 {};
 
@@ -80,20 +76,20 @@
 // terminals.
 struct DereferenceCtx
 {
- // Unless this is a vector terminal, use the
+ // Unless this is an iterator terminal, use the
     // default evaluation context
     template<typename Expr, typename Arg = typename proto::result_of::arg<Expr>::type>
     struct eval
       : proto::default_eval<Expr, DereferenceCtx const>
     {};
 
- // Index vector terminals with our subscript.
+ // Dereference iterator terminals.
     template<typename Expr, typename Iter>
     struct eval<Expr, iterator_wrapper<Iter> >
     {
         typedef typename std::iterator_traits<Iter>::reference result_type;
 
- result_type operator()(Expr &expr, DereferenceCtx const &) const
+ result_type operator ()(Expr &expr, DereferenceCtx const &) const
         {
             return *proto::arg(expr).it;
         }
@@ -104,20 +100,20 @@
 // terminals.
 struct IncrementCtx
 {
- // Unless this is a vector terminal, use the
+ // Unless this is an iterator terminal, use the
     // default evaluation context
     template<typename Expr, typename Arg = typename proto::result_of::arg<Expr>::type>
     struct eval
       : proto::null_eval<Expr, IncrementCtx const>
     {};
 
- // Index vector terminals with our subscript.
+ // advance iterator terminals.
     template<typename Expr, typename Iter>
     struct eval<Expr, iterator_wrapper<Iter> >
     {
         typedef void result_type;
 
- result_type operator()(Expr &expr, IncrementCtx const &) const
+ result_type operator ()(Expr &expr, IncrementCtx const &) const
         {
             ++proto::arg(expr).it;
         }
@@ -148,11 +144,14 @@
 };
 
 // A vector grammar is a terminal or some op that is not an
-// assignment op. (Assignment will be handles specially.)
+// assignment op. (Assignment will be handled specially.)
 struct MixedGrammar
   : proto::or_<
         proto::terminal<_>
- , proto::and_<proto::nary_expr<_, proto::vararg<MixedGrammar> >, proto::not_<AssignOps> >
+ , proto::and_<
+ proto::nary_expr<_, proto::vararg<MixedGrammar> >
+ , proto::not_<AssignOps>
+ >
>
 {};
 
@@ -172,7 +171,7 @@
     {}
 private:
     // hide this:
- using proto::extends<Expr, MixedExpr<Expr>, MixedDomain>::operator[];
+ using proto::extends<Expr, MixedExpr<Expr>, MixedDomain>::operator [];
 };
 
 // Define a trait type for detecting vector and list terminals, to
@@ -192,7 +191,7 @@
   : mpl::true_
 {};
 
-namespace VectorOps
+namespace MixedOps
 {
     // This defines all the overloads to make expressions involving
     // std::vector to build expression templates.
@@ -201,7 +200,7 @@
     struct assign_op
     {
         template<typename T, typename U>
- void operator()(T &t, U const &u) const
+ void operator ()(T &t, U const &u) const
         {
             t = u;
         }
@@ -210,7 +209,7 @@
     struct plus_assign_op
     {
         template<typename T, typename U>
- void operator()(T &t, U const &u) const
+ void operator ()(T &t, U const &u) const
         {
             t += u;
         }
@@ -219,7 +218,7 @@
     struct minus_assign_op
     {
         template<typename T, typename U>
- void operator()(T &t, U const &u) const
+ void operator ()(T &t, U const &u) const
         {
             t -= u;
         }
@@ -227,26 +226,31 @@
 
     struct sin_
     {
- template<typename Sig> struct result {};
+ template<typename Sig>
+ struct result;
+
         template<typename This, typename Arg>
         struct result<This(Arg)>
- : remove_const<typename remove_reference<Arg>::type>
+ : boost::remove_const<typename boost::remove_reference<Arg>::type>
         {};
 
         template<typename Arg>
- Arg operator()(Arg const &arg) const
+ Arg operator ()(Arg const &arg) const
         {
             return std::sin(arg);
         }
     };
 
- BOOST_PROTO_DEFINE_FUNCTION_TEMPLATE(
- 1
- , sin
+ template<typename A>
+ typename proto::result_of::make_expr<
+ proto::tag::function
       , MixedDomain
- , (boost::proto::tag::function)
- , ((sin_))
- )
+ , sin_ const
+ , A const &
+ >::type sin(A const &a)
+ {
+ return proto::make_expr<proto::tag::function, MixedDomain>(sin_(), boost::ref(a));
+ }
 
     template<typename FwdIter, typename Expr, typename Op>
     void evaluate(FwdIter begin, FwdIter end, Expr const &expr, Op op)
@@ -254,7 +258,7 @@
         int i = 0;
         IncrementCtx const inc = {};
         DereferenceCtx const deref = {};
- typename Begin::apply<Expr, int, int>::type expr2 = Begin::call(expr, i, i);
+ typename boost::result_of<Begin(Expr, int, int)>::type expr2 = Begin()(expr, i, i);
         for(; begin != end; ++begin)
         {
             op(*begin, proto::eval(expr2, deref));
@@ -313,7 +317,7 @@
 
 int main()
 {
- using namespace VectorOps;
+ using namespace MixedOps;
 
     int n = 10;
     std::vector<int> a,b,c,d;
@@ -331,11 +335,11 @@
         f.push_back(std::complex<double>(1.0, 1.0));
     }
 
- VectorOps::assign(b, 2);
- VectorOps::assign(d, a + b * c);
+ MixedOps::assign(b, 2);
+ MixedOps::assign(d, a + b * c);
     a += if_else(d < 30, b, c);
 
- VectorOps::assign(e, c);
+ MixedOps::assign(e, c);
     e += e - 4 / (c + 1);
 
     f -= sin(0.1 * e * std::complex<double>(0.2, 1.2));

Modified: branches/CMake/release/libs/xpressive/proto/example/rgb.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/rgb.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/rgb.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
 //[ RGB
 ///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -11,9 +11,7 @@
 
 #include <iostream>
 #include <boost/xpressive/proto/proto.hpp>
-#include <boost/xpressive/proto/transform/arg.hpp>
-#include <boost/xpressive/proto/transform/apply.hpp>
-#include <boost/xpressive/proto/transform/compose.hpp>
+#include <boost/xpressive/proto/transform.hpp>
 using namespace boost::proto;
 
 struct RedTag
@@ -40,35 +38,49 @@
     }
 };
 
-typedef terminal<RedTag>::type Red;
-typedef terminal<BlueTag>::type Blue;
-typedef terminal<GreenTag>::type Green;
+typedef terminal<RedTag>::type RedT;
+typedef terminal<BlueTag>::type BlueT;
+typedef terminal<GreenTag>::type GreenT;
+
+struct Red;
+struct Blue;
+struct Green;
 
 ///////////////////////////////////////////////////////////////////////////////
 // A transform that produces new colors according to some arbitrary rules:
 // red & green give blue, red & blue give green, blue and green give red.
+struct Red
+ : or_<
+ plus<Green, Blue>
+ , plus<Blue, Green>
+ , plus<Red, Red>
+ , terminal<RedTag>
+ >
+{};
+
+struct Green
+ : or_<
+ plus<Red, Blue>
+ , plus<Blue, Red>
+ , plus<Green, Green>
+ , terminal<GreenTag>
+ >
+{};
+
+struct Blue
+ : or_<
+ plus<Red, Green>
+ , plus<Green, Red>
+ , plus<Blue, Blue>
+ , terminal<BlueTag>
+ >
+{};
+
 struct RGB
   : or_<
- // leave terminals as they are
- terminal<_>
- , transform::compose<
- // Match binary nodes, convert left and right to terminals
- plus<RGB, RGB>
- // Forward resulting binary expression to the following transform
- , or_<
- // Green + Blue -> Red
- transform::always<plus<Green, Blue>, Red>
- , transform::always<plus<Blue, Green>, Red>
- // Red + Green -> Blue
- , transform::always<plus<Red, Green>, Blue>
- , transform::always<plus<Green, Red>, Blue>
- // Red + Blue -> Green
- , transform::always<plus<Red, Blue>, Green>
- , transform::always<plus<Blue, Red>, Green>
- // else (both same color), select the left operand
- , transform::left<_>
- >
- >
+ when< Red, RedTag() >
+ , when< Blue, BlueTag() >
+ , when< Green, GreenTag() >
>
 {};
 
@@ -76,14 +88,14 @@
 void printColor(Expr const & expr)
 {
     int i = 0; // dummy state and visitor parameter, not used
- std::cout << arg(RGB::call(expr, i, i)) << std::endl;
+ std::cout << RGB()(expr, i, i) << std::endl;
 }
 
 int main()
 {
- printColor(Red() + Green());
- printColor(Red() + Green() + Blue());
- printColor(Red() + (Green() + Blue()));
+ printColor(RedT() + GreenT());
+ printColor(RedT() + GreenT() + BlueT());
+ printColor(RedT() + (GreenT() + BlueT()));
 
     return 0;
 }

Modified: branches/CMake/release/libs/xpressive/proto/example/tarray.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/tarray.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/tarray.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
 //[ TArray
 ///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -52,7 +52,7 @@
 
     // Index array terminals with our subscript. Everything
     // else will be handled by the default evaluation context.
- int operator()(proto::tag::terminal, int const (&data)[3]) const
+ int operator ()(proto::tag::terminal, int const (&data)[3]) const
     {
         return data[this->i_];
     }
@@ -68,43 +68,43 @@
 
     TArrayPrintCtx() {}
 
- std::ostream &operator()(proto::tag::terminal, int i) const
+ std::ostream &operator ()(proto::tag::terminal, int i) const
     {
         return std::cout << i;
     }
 
- std::ostream &operator()(proto::tag::terminal, int const (&arr)[3]) const
+ std::ostream &operator ()(proto::tag::terminal, int const (&arr)[3]) const
     {
         return std::cout << '{' << arr[0] << ", " << arr[1] << ", " << arr[2] << '}';
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::plus, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::plus, L const &l, R const &r) const
     {
         return std::cout << '(' << l << " + " << r << ')';
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::minus, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::minus, L const &l, R const &r) const
     {
         return std::cout << '(' << l << " - " << r << ')';
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::multiplies, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::multiplies, L const &l, R const &r) const
     {
         return std::cout << l << " * " << r;
     }
 
     template<typename L, typename R>
- std::ostream &operator()(proto::tag::divides, L const &l, R const &r) const
+ std::ostream &operator ()(proto::tag::divides, L const &l, R const &r) const
     {
         return std::cout << l << " / " << r;
     }
 };
 
 // Here is the domain-specific expression wrapper, which overrides
-// operator[] to evaluate the expression using the TArraySubscriptCtx.
+// operator [] to evaluate the expression using the TArraySubscriptCtx.
 template<typename Expr>
 struct TArrayExpr
   : proto::extends<Expr, TArrayExpr<Expr>, TArrayDomain>
@@ -143,9 +143,9 @@
         (*this)[2] = k;
     }
 
- // Here we override operator[] to give read/write access to
+ // Here we override operator [] to give read/write access to
     // the elements of the array. (We could use the TArrayExpr
- // operator[] if we made the subscript context smarter about
+ // operator [] if we made the subscript context smarter about
     // returning non-const reference when appropriate.)
     int &operator [](std::ptrdiff_t i)
     {
@@ -157,13 +157,13 @@
         return proto::arg(*this)[i];
     }
 
- // Here we define a operator= for TArray terminals that
+ // Here we define a operator = for TArray terminals that
     // takes a TArray expression.
     template< typename Expr >
     TArray &operator =(Expr const & expr)
     {
         // proto::as_expr<TArrayDomain>(expr) is the same as
- // expr unless expr is an integer, in which case it
+ // expr unless expr is an integer, in which case it
         // is made into a TArrayExpr terminal first.
         return this->assign(proto::as_expr<TArrayDomain>(expr));
     }

Modified: branches/CMake/release/libs/xpressive/proto/example/vec3.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/vec3.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/vec3.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
 //[ Vec3
 ///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -16,12 +16,11 @@
 #include <boost/xpressive/proto/proto.hpp>
 #include <boost/xpressive/proto/context.hpp>
 #include <boost/xpressive/proto/proto_typeof.hpp>
-#include <boost/xpressive/proto/transform/arg.hpp>
-#include <boost/xpressive/proto/transform/fold.hpp>
-#include <boost/xpressive/proto/transform/apply.hpp>
-#include <boost/xpressive/proto/transform/function.hpp>
-using namespace boost::proto;
+#include <boost/xpressive/proto/transform.hpp>
+
 namespace mpl = boost::mpl;
+namespace proto = boost::proto;
+using namespace proto;
 
 // Here is an evaluation context that indexes into a Vec3
 // expression, and combines the result.
@@ -36,7 +35,7 @@
 
     // Index array terminals with our subscript. Everything
     // else will be handled by the default evaluation context.
- int operator()(tag::terminal, int const (&arr)[3]) const
+ int operator ()(tag::terminal, int const (&arr)[3]) const
     {
         return arr[this->i_];
     }
@@ -45,41 +44,40 @@
 };
 
 // Here is an evaluation context that counts the number
-// of Vec3 terminals in an expression.
+// of Vec3 terminals in an expression.
 struct CountLeavesCtx
   : callable_context< CountLeavesCtx, null_context >
 {
     CountLeavesCtx()
       : count(0)
       {}
-
+
       typedef void result_type;
-
- void operator()(tag::terminal, int const(&)[3])
+
+ void operator ()(tag::terminal, int const(&)[3])
       {
           ++this->count;
       }
-
+
       int count;
 };
 
+struct iplus : std::plus<int>, callable {};
+
 // Here is a transform that does the same thing as the above context.
 // It demonstrates the use of the std::plus<> function object
-// with the function2 transform. With minor modifications, this
+// with the fold transform. With minor modifications, this
 // transform could be used to calculate the leaf count at compile
-// time, rather at runtime.
+// time, rather than at runtime.
 struct CountLeaves
   : or_<
         // match a Vec3 terminal, return 1
- transform::always<terminal<int[3]>, mpl::int_<1> >
+ when<terminal<int[3]>, mpl::int_<1>() >
         // match a terminal, return int() (which is 0)
- , transform::always<terminal<_>, int>
+ , when<terminal<_>, int() >
         // fold everything else, using std::plus<> to add
         // the leaf count of each child to the accumulated state.
- , transform::fold<
- nary_expr<_, vararg<transform::function2<CountLeaves, std::plus<int> > > >
- , int // initial state of the fold is int() (which is 0)
- >
+ , otherwise< fold<_, int(), iplus(CountLeaves, _state) > >
>
 {};
 
@@ -94,17 +92,17 @@
         (*this)[2] = k;
     }
 
- int &operator[](int i)
+ int &operator [](int i)
     {
- return arg(*this)[i];
+ return proto::arg(*this)[i];
     }
 
- int const &operator[](int i) const
+ int const &operator [](int i) const
     {
- return arg(*this)[i];
+ return proto::arg(*this)[i];
     }
 
- // Here we define a operator= for Vec3 terminals that
+ // Here we define a operator = for Vec3 terminals that
     // takes a Vec3 expression.
     template< typename Expr >
     Vec3 &operator =(Expr const & expr)
@@ -134,10 +132,10 @@
     // CountLeavesCtx evaluation context.
     CountLeavesCtx ctx;
     eval(expr, ctx);
-
+
     // This is another way to count the leaves using a transform.
     int i = 0;
- assert( CountLeaves::call(expr, i, i) == ctx.count );
+ assert( CountLeaves()(expr, i, i) == ctx.count );
 
     return ctx.count;
 }

Modified: branches/CMake/release/libs/xpressive/proto/example/vector.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/example/vector.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/example/vector.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,6 +1,6 @@
 //[ Vector
 ///////////////////////////////////////////////////////////////////////////////
-// Copyright 2007 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 //
@@ -42,7 +42,7 @@
     {
         typedef T result_type;
 
- T operator()(Expr &expr, VectorSubscriptCtx const &ctx) const
+ T operator ()(Expr &expr, VectorSubscriptCtx const &ctx) const
         {
             return proto::arg(expr)[ctx.i_];
         }
@@ -73,11 +73,11 @@
     {
         typedef void result_type;
 
- result_type operator()(Expr &expr, VectorSizeCtx const &ctx) const
+ result_type operator ()(Expr &expr, VectorSizeCtx const &ctx) const
         {
             if(ctx.size_ != proto::arg(expr).size())
             {
- throw std::invalid_argument("LHS and RHS are not compatible");
+ throw std::runtime_error("LHS and RHS are not compatible");
             }
         }
     };
@@ -109,7 +109,7 @@
 };
 
 // A vector grammar is a terminal or some op that is not an
-// assignment op. (Assignment will be handles specially.)
+// assignment op. (Assignment will be handled specially.)
 struct VectorGrammar
   : proto::or_<
         proto::terminal<_>
@@ -124,7 +124,7 @@
 {};
 
 // Here is VectorExpr, which extends a proto expr type by
-// giving it an operator[] which uses the VectorSubscriptCtx
+// giving it an operator [] which uses the VectorSubscriptCtx
 // to evaluate an expression with a given index.
 template<typename Expr>
 struct VectorExpr

Modified: branches/CMake/release/libs/xpressive/proto/test/Jamfile.v2
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/Jamfile.v2 (original)
+++ branches/CMake/release/libs/xpressive/proto/test/Jamfile.v2 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -19,13 +19,15 @@
 
 test-suite "proto"
     :
+ [ run calculator.cpp ]
+ [ run deep_copy.cpp ]
+ [ run examples.cpp ]
+ [ run lambda.cpp ]
+ [ run make_expr.cpp ]
+ [ run matches.cpp ]
         [ run proto_fusion.cpp : : : <toolset>gcc:<cxxflags>-ftemplate-depth-1024 ]
         [ run proto_fusion_s.cpp ]
         [ run toy_spirit.cpp ]
         [ run toy_spirit2.cpp ]
- [ run calculator.cpp ]
- [ run lambda.cpp ]
- [ run matches.cpp ]
- [ run examples.cpp ]
     ;
 

Modified: branches/CMake/release/libs/xpressive/proto/test/calculator.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/calculator.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/calculator.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // calculator.hpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -22,36 +22,36 @@
       : i_(i)
     {}
 
- int operator()(proto::tag::terminal, placeholder) const
+ int operator ()(proto::tag::terminal, placeholder) const
     {
         return this->i_;
     }
 
- int operator()(proto::tag::terminal, int j) const
+ int operator ()(proto::tag::terminal, int j) const
     {
         return j;
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::plus, Left const &left, Right const &right) const
+ int operator ()(proto::tag::plus, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) + proto::eval(right, *this);
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::minus, Left const &left, Right const &right) const
+ int operator ()(proto::tag::minus, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) - proto::eval(right, *this);
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::multiplies, Left const &left, Right const &right) const
+ int operator ()(proto::tag::multiplies, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) * proto::eval(right, *this);
     }
 
     template<typename Left, typename Right>
- int operator()(proto::tag::divides, Left const &left, Right const &right) const
+ int operator ()(proto::tag::divides, Left const &left, Right const &right) const
     {
         return proto::eval(left, *this) / proto::eval(right, *this);
     }
@@ -70,7 +70,7 @@
     {}
 
     template<typename T>
- result_type operator()(T const &t) const
+ result_type operator ()(T const &t) const
     {
         Fun fun(t);
         return proto::eval(this->expr_, fun);

Modified: branches/CMake/release/libs/xpressive/proto/test/examples.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/examples.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/examples.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
-// matches.hpp
+// examples2.hpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -9,30 +9,36 @@
 #include <boost/config.hpp>
 #include <boost/mpl/min_max.hpp>
 #include <boost/xpressive/proto/proto.hpp>
-#include <boost/xpressive/proto/transform/arg.hpp>
-#include <boost/xpressive/proto/transform/fold.hpp>
-#include <boost/xpressive/proto/transform/branch.hpp>
-#include <boost/xpressive/proto/transform/list.hpp>
-#include <boost/xpressive/proto/transform/apply.hpp>
-#include <boost/xpressive/proto/transform/construct.hpp>
-#include <boost/xpressive/proto/transform/fold_tree.hpp>
+#include <boost/xpressive/proto/transform.hpp>
 #include <boost/utility/result_of.hpp>
+#if BOOST_VERSION < 103500
+# include <boost/spirit/fusion/sequence/cons.hpp>
+#else
+# include <boost/fusion/include/cons.hpp>
+# include <boost/fusion/include/pop_front.hpp>
+#endif
 #include <boost/test/unit_test.hpp>
 
-using namespace boost::proto;
+namespace proto = boost::proto;
 namespace mpl = boost::mpl;
 namespace fusion = boost::fusion;
 
+using namespace proto;
+using namespace transform;
+
 struct placeholder1 {};
 struct placeholder2 {};
 
 namespace test1
 {
-//[ CalculatorGrammar
+//[ CalcGrammar
     using namespace boost::proto;
 
+ // This is the grammar for calculator expressions,
+ // to which we will attach transforms for computing
+ // the expressions' arity.
     /*<< A Calculator expression is ... >>*/
- struct CalculatorGrammar
+ struct CalcArity
       : or_<
             /*<< placeholder1, or ... >>*/
             terminal< placeholder1 >
@@ -41,48 +47,95 @@
           /*<< some other terminal, or ... >>*/
           , terminal< _ >
           /*<< a unary expression where the operand is a calculator expression, or ... >>*/
- , unary_expr< _, CalculatorGrammar >
- /*<< a binary expression where the operands are calculator expressions, or ... >>*/
- , binary_expr< _, CalculatorGrammar, CalculatorGrammar >
+ , unary_expr< _, CalcArity >
+ /*<< a binary expression where the operands are calculator expressions >>*/
+ , binary_expr< _, CalcArity, CalcArity >
>
     {};
 //]
 }
 
-//[ binary_max
+//[ binary_arity
+/*<< The `CalculatorArity` is a transform for calculating
+the arity of a calculator expression. It will be define in
+terms of `binary_arity`, which is defined in terms of
+`CalculatorArity`; hence, the definition is recursive.>>*/
+struct CalculatorArity;
+
+// A custom transform that returns the arity of a unary
+// calculator expression by finding the arity of the
+// child expression.
+struct unary_arity
+ /*<< Custom transforms should inherit from
+ callable. In some cases, (e.g., when the transform
+ is a template), it is also necessary to specialize
+ the proto::is_callable<> trait. >>*/
+ : callable
+{
+ template<typename Sig>
+ struct result;
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ /*<< Transforms have a nested `result<>` for calculating their return type. >>*/
+ struct result<This(Expr, State, Visitor)>
+ {
+ /*<< Get the child. >>*/
+ typedef typename result_of::arg<Expr>::type child_expr;
+
+ /*<< Apply `CalculatorArity` to find the arity of the child. >>*/
+ typedef typename boost::result_of<CalculatorArity(child_expr, State, Visitor)>::type type;
+ };
+
+ template<typename Expr, typename State, typename Visitor>
+ typename result<unary_arity(Expr, State, Visitor)>::type
+ /*<< Transforms have a nested `operator ()` member function. >>*/
+ operator ()(Expr const &, State const &, Visitor &) const
+ {
+ /*<< The `unary_arity` transform doesn't have an interesting
+ runtime counterpart, so just return a default-constructed object
+ of the correct type. >>*/
+ return typename result<unary_arity(Expr, State, Visitor)>::type();
+ }
+};
+
 // A custom transform that returns the arity of a binary
 // calculator expression by finding the maximum of the
-// arities of the two children expressions.
-/*<< All transforms take a Grammar as a template parameter. >>*/
-template<typename Grammar>
-struct binary_max
- /*<< All transforms must inherit from the `Grammar`, so that the transform
- IS-A `Grammar`, and matches the same expressions that `Grammar` does. >>*/
- : Grammar
+// arities of the mpl::int_<2> children expressions.
+struct binary_arity
+ /*<< All custom transforms should inherit from
+ callable. In some cases, (e.g., when the transform
+ is a template), it is also necessary to specialize
+ the proto::is_callable<> trait. >>*/
+ : callable
 {
- template<typename Expr, typename State, typename Visitor>
- /*<< Transforms have a nested `apply<>` for calculating their return type. >>*/
- struct apply
+ template<typename Sig>
+ struct result;
+
+ template<typename This, typename Expr, typename State, typename Visitor>
+ /*<< Transforms have a nested `result<>` for calculating their return type. >>*/
+ struct result<This(Expr, State, Visitor)>
     {
- /*<< Apply `Grammar`'s transform. This is what makes it possible to chain transforms. >>*/
- typedef typename mpl::apply_wrap3<Grammar, Expr, State, Visitor>::type expr_type;
- /*<< After applying `Grammar`'s transform, the children expressions have been
- replaced with their arities. >>*/
- typedef typename result_of::left<expr_type>::type left_arity;
- typedef typename result_of::right<expr_type>::type right_arity;
+ /*<< Get the left and right children. >>*/
+ typedef typename result_of::left<Expr>::type left_expr;
+ typedef typename result_of::right<Expr>::type right_expr;
+
+ /*<< Apply `CalculatorArity` to find the arity of the left and right children. >>*/
+ typedef typename boost::result_of<CalculatorArity(left_expr, State, Visitor)>::type left_arity;
+ typedef typename boost::result_of<CalculatorArity(right_expr, State, Visitor)>::type right_arity;
+
         /*<< The return type is the maximum of the children's arities. >>*/
         typedef typename mpl::max<left_arity, right_arity>::type type;
     };
 
     template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
+ typename result<binary_arity(Expr, State, Visitor)>::type
     /*<< Transforms have a nested `call()` member function. >>*/
- call(Expr const &, State const &, Visitor &)
+ operator ()(Expr const &, State const &, Visitor &) const
     {
- /*<< Usually, the `call()` member function invokes the `Grammar`'s `call()` function,
- as `Grammar::call(expr,state,visitor)`, but this transform doesn't have an interesting
- runtime counterpart, so just return a default-constructed object of the correct type. >>*/
- return typename apply<Expr, State, Visitor>::type();
+ /*<< The `binary_arity` transform doesn't have an interesting
+ runtime counterpart, so just return a default-constructed object
+ of the correct type. >>*/
+ return typename result<binary_arity(Expr, State, Visitor)>::type();
     }
 };
 //]
@@ -91,76 +144,98 @@
 terminal< placeholder2 >::type const _2 = {{}};
 
 //[ CalculatorArityGrammar
-struct CalculatorGrammar
+struct CalculatorArity
   : or_<
- transform::always< terminal< placeholder1 >, mpl::int_<1> >
- , transform::always< terminal< placeholder2 >, mpl::int_<2> >
- , transform::always< terminal< _ >, mpl::int_<0> >
- , transform::arg< unary_expr< _, CalculatorGrammar > >
- , binary_max< binary_expr< _, CalculatorGrammar, CalculatorGrammar > >
+ when< terminal< placeholder1 >, mpl::int_<1>() >
+ , when< terminal< placeholder2 >, mpl::int_<2>() >
+ , when< terminal<_>, mpl::int_<0>() >
+ , when< unary_expr<_, _>, unary_arity >
+ , when< binary_expr<_, _, _>, binary_arity >
>
 {};
 //]
 
+//[ CalcArity
+struct CalcArity
+ : or_<
+ when< terminal< placeholder1 >,
+ mpl::int_<1>()
+ >
+ , when< terminal< placeholder2 >,
+ mpl::int_<2>()
+ >
+ , when< terminal<_>,
+ mpl::int_<0>()
+ >
+ , when< unary_expr<_, CalcArity>,
+ CalcArity(_arg)
+ >
+ , when< binary_expr<_, CalcArity, CalcArity>,
+ mpl::max<CalcArity(_left),
+ CalcArity(_right)>()
+ >
+ >
+{};
+//]
+
+// BUGBUG find workaround for this
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+#define _pop_front(x) call<_pop_front(x)>
+#define _arg(x) call<_arg(x)>
+#endif
+
 //[ AsArgList
 // This transform matches function invocations such as foo(1,'a',"b")
 // and transforms them into Fusion cons lists of their arguments. In this
 // case, the result would be cons(1, cons('a', cons("b", nil()))).
 struct ArgsAsList
- /*<< Use a `branch<>` transform to use `fusion::nil` as the initial
- state of this transformation. >>*/
- : transform::branch<
- /*<< Use a `reverse_fold<>` transform to iterate over the children
- of this node in reverse order, building a fusion list from back to
- front. >>*/
- transform::reverse_fold<
- /*<< The `Grammar` we're matching is a function invocation. >>*/
- function<
- /*<< The first child expression of a `function<>` node is the
- function being invoked. We don't want that in our list, so use
- the `state<>` transform to effectively skip it. (Recall that
- we're building a list in the state parameter, and that the
- `state<>` transform just returns the state unmodified. So this
- says to match a `terminal<>` but to not add it to the list.) >>*/
- transform::state<terminal<_> >
- /*<< We use `vararg<>` here because the function expression we're
- matching can have an arbitrary number of arguments. >>*/
- , vararg<
- /*<< The `list<>` transform puts the rest of the function
- arguments in a fusion cons list. >>*/
- transform::list<
- /*<< The arguments to the function are terminals.
- Extract the argument from each terminal before putting
- them into the list. >>*/
- transform::arg<terminal<_> >
- >
- >
- >
- >
- /*<< Here is the initial state used by this transform. >>*/
- , fusion::nil
- >
+ : when<
+ function<terminal<_>, vararg<terminal<_> > >
+ /*<< Use a `reverse_fold<>` transform to iterate over the children
+ of this node in reverse order, building a fusion list from back to
+ front. >>*/
+ , reverse_fold<
+ /*<< The first child expression of a `function<>` node is the
+ function being invoked. We don't want that in our list, so use
+ `pop_front()` to remove it. >>*/
+ _pop_front(_)
+ /*<< `nil` is the initial state used by the `reverse_fold<>`
+ transform. >>*/
+ , fusion::nil()
+ /*<< Put the rest of the function arguments in a fusion cons
+ list. >>*/
+ , fusion::cons<_arg, _state>(_arg, _state)
+ >
+ >
 {};
 //]
 
 //[ FoldTreeToList
-// This grammar describes what counts as the terminals in expressions
-// of the form (_1=1,'a',"b"), which will be flattened using
-// reverse_fold_tree<> below.
-struct Terminals
- : or_<
- transform::arg<transform::right<assign<_, terminal<_> > > >
- , transform::arg<terminal<_> >
- >
-{};
-
 // This transform matches expressions of the form (_1=1,'a',"b")
 // (note the use of the comma operator) and transforms it into a
 // Fusion cons list of their arguments. In this case, the result
 // would be cons(1, cons('a', cons("b", nil()))).
 struct FoldTreeToList
- /*<< Fold all terminals that are separated by commas into a Fusion cons list. >>*/
- : transform::reverse_fold_tree<tag::comma, transform::list<Terminals>, fusion::nil>
+ : or_<
+ // This grammar describes what counts as the terminals in expressions
+ // of the form (_1=1,'a',"b"), which will be flattened using
+ // reverse_fold_tree<> below.
+ when<assign<_, terminal<_> >
+ , _arg(_right)
+ >
+ , when<terminal<_>
+ , _arg
+ >
+ , when<
+ comma<FoldTreeToList, FoldTreeToList>
+ /*<< Fold all terminals that are separated by commas into a Fusion cons list. >>*/
+ , reverse_fold_tree<
+ _
+ , fusion::nil()
+ , fusion::cons<FoldTreeToList, _state>(FoldTreeToList, _state)
+ >
+ >
+ >
 {};
 //]
 
@@ -169,12 +244,14 @@
 // them to doubles.
 struct Promote
   : or_<
- /*<< Match a `terminal<float>`, then construct a `terminal<double>::type` with the `float`. >>*/
- transform::construct<terminal<float>, terminal<double>::type(transform::arg<_>) >
- , terminal<_>
- /*<< `nary_expr<>` has a pass-through transform which will transform each child
- sub-expression using the `Promote` transform. >>*/
- , nary_expr<_, vararg<Promote> >
+ /*<< Match a `terminal<float>`, then construct a
+ `terminal<double>::type` with the `float`. >>*/
+ when<terminal<float>, terminal<double>::type(_arg) >
+ , when<terminal<_> >
+ /*<< `nary_expr<>` has a pass-through transform which
+ will transform each child sub-expression using the
+ `Promote` transform. >>*/
+ , when<nary_expr<_, vararg<Promote> > >
>
 {};
 //]
@@ -187,40 +264,77 @@
 // `make_pair_(1, 3.14)` and actually builds a `std::pair<>`
 // from the arguments.
 struct MakePair
- : transform::construct<
+ : when<
         /*<< Match expressions like `make_pair_(1, 3.14)` >>*/
         function<terminal<make_pair_tag>, terminal<_>, terminal<_> >
       /*<< Return `std::pair<F,S>(f,s)` where `f` and `s` are the
- first and second arguments to the lazy `make_pair_()` function >>*/
- , std::pair<
- transform::arg<transform::arg_c<_, 1> >
- , transform::arg<transform::arg_c<_, 2> >
- >(
- transform::arg<transform::arg_c<_, 1> >
- , transform::arg<transform::arg_c<_, 2> >
- )
+ first and second arguments to the lazy `make_pair_()` function.
+ (This uses `proto::make<>` under the covers to evaluate the
+ transform.)>>*/
+ , std::pair<_arg(_arg1), _arg(_arg2)>(_arg(_arg1), _arg(_arg2))
>
 {};
 //]
 
+namespace lazy_make_pair2
+{
+ //[ LazyMakePair2
+ struct make_pair_tag {};
+ terminal<make_pair_tag>::type const make_pair_ = {{}};
+
+ // Like std::make_pair(), only as a function object.
+ /*<<Inheriting from `proto::callable` lets Proto know
+ that this is a callable transform, so we can use it
+ without having to wrap it in `proto::call<>`.>>*/
+ struct make_pair : proto::callable
+ {
+ template<typename Sig> struct result;
+
+ template<typename This, typename First, typename Second>
+ struct result<This(First, Second)>
+ {
+ typedef std::pair<First, Second> type;
+ };
+
+ template<typename First, typename Second>
+ std::pair<First, Second>
+ operator()(First const &first, Second const &second) const
+ {
+ return std::make_pair(first, second);
+ }
+ };
+
+ // This transform matches lazy function invocations like
+ // `make_pair_(1, 3.14)` and actually builds a `std::pair<>`
+ // from the arguments.
+ struct MakePair
+ : when<
+ /*<< Match expressions like `make_pair_(1, 3.14)` >>*/
+ function<terminal<make_pair_tag>, terminal<_>, terminal<_> >
+ /*<< Return `make_pair()(f,s)` where `f` and `s` are the
+ first and second arguments to the lazy `make_pair_()` function.
+ (This uses `proto::call<>` under the covers to evaluate the
+ transform.)>>*/
+ , make_pair(_arg(_arg1), _arg(_arg2))
+ >
+ {};
+ //]
+}
+
+
 //[ NegateInt
 struct NegateInt
- : transform::construct<
- terminal<int>
- , negate<_>(_)
- >
+ : when<terminal<int>, negate<_>(_)>
 {};
 //]
 
 #ifndef BOOST_MSVC
 //[ SquareAndPromoteInt
 struct SquareAndPromoteInt
- : transform::construct<
+ : when<
         terminal<int>
- , multiplies<terminal<long>::type, terminal<long>::type>::type(
- terminal<long>::type(transform::arg<_>)
- , terminal<long>::type(transform::arg<_>)
- )
+ , multiplies<terminal<long>::type, terminal<long>::type>::type
+ (terminal<long>::type(_arg), terminal<long>::type(_arg))
>
 {};
 //]
@@ -231,23 +345,27 @@
     //[ CalculatorArityTest
     int i = 0; // not used, dummy state and visitor parameter
 
- std::cout << CalculatorGrammar::call( lit(100) * 200, i, i) << '\n';
- std::cout << CalculatorGrammar::call( (_1 - _1) / _1 * 100, i, i) << '\n';
- std::cout << CalculatorGrammar::call( (_2 - _1) / _2 * 100, i, i) << '\n';
+ std::cout << CalculatorArity()( lit(100) * 200, i, i) << '\n';
+ std::cout << CalculatorArity()( (_1 - _1) / _1 * 100, i, i) << '\n';
+ std::cout << CalculatorArity()( (_2 - _1) / _2 * 100, i, i) << '\n';
     //]
 
- BOOST_CHECK_EQUAL(0, CalculatorGrammar::call( lit(100) * 200, i, i));
- BOOST_CHECK_EQUAL(1, CalculatorGrammar::call( (_1 - _1) / _1 * 100, i, i));
- BOOST_CHECK_EQUAL(2, CalculatorGrammar::call( (_2 - _1) / _2 * 100, i, i));
+ BOOST_CHECK_EQUAL(0, CalculatorArity()( lit(100) * 200, i, i));
+ BOOST_CHECK_EQUAL(1, CalculatorArity()( (_1 - _1) / _1 * 100, i, i));
+ BOOST_CHECK_EQUAL(2, CalculatorArity()( (_2 - _1) / _2 * 100, i, i));
+
+ BOOST_CHECK_EQUAL(0, CalcArity()( lit(100) * 200, i, i));
+ BOOST_CHECK_EQUAL(1, CalcArity()( (_1 - _1) / _1 * 100, i, i));
+ BOOST_CHECK_EQUAL(2, CalcArity()( (_2 - _1) / _2 * 100, i, i));
 
     using boost::fusion::cons;
     using boost::fusion::nil;
- cons<int, cons<char, cons<char const (&)[2]> > > args(ArgsAsList::call( _1(1, 'a', "b"), i, i ));
+ cons<int, cons<char, cons<std::string> > > args(ArgsAsList()( _1(1, 'a', std::string("b")), i, i ));
     BOOST_CHECK_EQUAL(args.car, 1);
     BOOST_CHECK_EQUAL(args.cdr.car, 'a');
     BOOST_CHECK_EQUAL(args.cdr.cdr.car, std::string("b"));
 
- cons<int, cons<char, cons<char const (&)[2]> > > lst(FoldTreeToList::call( (_1 = 1, 'a', "b"), i, i ));
+ cons<int, cons<char, cons<std::string> > > lst(FoldTreeToList()( (_1 = 1, 'a', std::string("b")), i, i ));
     BOOST_CHECK_EQUAL(lst.car, 1);
     BOOST_CHECK_EQUAL(lst.cdr.car, 'a');
     BOOST_CHECK_EQUAL(lst.cdr.cdr.car, std::string("b"));
@@ -255,13 +373,13 @@
     plus<
         terminal<double>::type
       , terminal<double>::type
- >::type p = Promote::call( lit(1.f) + 2.f, i, i );
+ >::type p = Promote()( lit(1.f) + 2.f, i, i );
 
     //[ LazyMakePairTest
     int j = 0; // not used, dummy state and visitor parameter
 
- std::pair<int, double> p2 = MakePair::call( make_pair_(1, 3.14), j, j );
-
+ std::pair<int, double> p2 = MakePair()( make_pair_(1, 3.14), j, j );
+
     std::cout << p2.first << std::endl;
     std::cout << p2.second << std::endl;
     //]
@@ -269,12 +387,19 @@
     BOOST_CHECK_EQUAL(p2.first, 1);
     BOOST_CHECK_EQUAL(p2.second, 3.14);
 
- NegateInt::call(lit(1), i, i);
-#ifndef BOOST_MSVC
- SquareAndPromoteInt::call(lit(1), i, i);
-#endif
-}
+ std::pair<int, double> p3 = lazy_make_pair2::MakePair()( lazy_make_pair2::make_pair_(1, 3.14), j, j );
 
+ std::cout << p3.first << std::endl;
+ std::cout << p3.second << std::endl;
+
+ BOOST_CHECK_EQUAL(p3.first, 1);
+ BOOST_CHECK_EQUAL(p3.second, 3.14);
+
+ NegateInt()(lit(1), i, i);
+ #ifndef BOOST_MSVC
+ SquareAndPromoteInt()(lit(1), i, i);
+ #endif
+}
 
 using namespace boost::unit_test;
 ///////////////////////////////////////////////////////////////////////////////

Modified: branches/CMake/release/libs/xpressive/proto/test/lambda.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/lambda.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/lambda.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // lambda.hpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -10,13 +10,14 @@
 #include <boost/mpl/int.hpp>
 #include <boost/mpl/min_max.hpp>
 #include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
 #include <boost/mpl/next_prior.hpp>
 #if BOOST_VERSION < 103500
 # include <boost/spirit/fusion/sequence/at.hpp>
 # include <boost/spirit/fusion/sequence/tuple.hpp>
 namespace boost { namespace fusion { namespace result_of { using namespace meta; }}}
 #else
-# include <boost/fusion/include/tuple.hpp>
+# include <boost/fusion/tuple.hpp>
 #endif
 #include <boost/typeof/typeof.hpp>
 #include <boost/typeof/std/sstream.hpp>
@@ -26,9 +27,7 @@
 #include <boost/type_traits/add_reference.hpp>
 #include <boost/xpressive/proto/proto.hpp>
 #include <boost/xpressive/proto/context.hpp>
-#include <boost/xpressive/proto/transform/arg.hpp>
-#include <boost/xpressive/proto/transform/fold.hpp>
-#include <boost/xpressive/proto/transform/apply.hpp>
+#include <boost/xpressive/proto/transform.hpp>
 #include <boost/test/unit_test.hpp>
 #include <boost/test/floating_point_comparison.hpp>
 
@@ -48,76 +47,61 @@
     typedef I arity;
 };
 
-// Some custom transforms for calculating the max arity of a lambda expression
-template<typename Grammar>
-struct max_arity
- : Grammar
-{
- template<typename Expr, typename State, typename Visitor>
- struct apply
- {
- typedef typename Grammar::template apply<Expr, State, Visitor>::type arity;
- typedef typename mpl::max<arity, State>::type type;
- };
-};
-
-template<typename Grammar>
+template<typename T>
 struct placeholder_arity
- : Grammar
 {
- template<typename Expr, typename, typename>
- struct apply
- : mpl::next<typename proto::result_of::arg<Expr>::type::arity>
- {};
+ typedef typename T::arity type;
 };
 
-using proto::_;
+namespace grammar
+{
+ using namespace proto;
+ using namespace transform;
 
-// The lambda grammar, with the transforms for calculating the max arity
-struct LambdaGrammar
- : proto::or_<
- placeholder_arity< proto::terminal< placeholder<_> > >
- , proto::transform::always< proto::terminal<_>, mpl::int_<0> >
- , proto::transform::fold<
- proto::nary_expr<_, proto::vararg< max_arity< LambdaGrammar > > >
+ // The lambda grammar, with the transforms for calculating the max arity
+ struct Lambda
+ : or_<
+ when< terminal< placeholder<_> >, mpl::next<placeholder_arity<_arg> >() >
+ , when< terminal<_>, mpl::int_<0>() >
+ , when< nary_expr<_, vararg<_> >, fold<_, mpl::int_<0>(), mpl::max<Lambda,_state>()> >
>
- >
-{};
+ {};
+}
 
 // simple wrapper for calculating a lambda expression's arity.
 template<typename Expr>
 struct lambda_arity
- : LambdaGrammar::apply<Expr, mpl::int_<0>, mpl::void_>
+ : boost::result_of<grammar::Lambda(Expr, mpl::void_, mpl::void_)>
 {};
 
 // The lambda context is the same as the default context
 // with the addition of special handling for lambda placeholders
 template<typename Tuple>
 struct lambda_context
+ : proto::callable_context<lambda_context<Tuple> const>
 {
     lambda_context(Tuple const &args)
       : args_(args)
     {}
 
- template<typename Expr, typename EnableIf = void>
- struct eval
- : proto::default_eval<Expr, lambda_context<Tuple> >
+ template<typename Sig>
+ struct result;
+
+ template<typename This, typename I>
+ struct result<This(proto::tag::terminal, placeholder<I> const &)>
+ : fusion::result_of::at<Tuple, I>
     {};
 
- template<typename Expr>
- struct eval<Expr, typename enable_if<proto::matches<Expr, proto::terminal<placeholder<_> > > >::type>
+ template<typename I>
+ typename fusion::result_of::at<Tuple, I>::type
+ operator ()(proto::tag::terminal, placeholder<I> const &) const
     {
- typedef typename proto::result_of::arg<Expr>::type::arity index;
- typedef typename fusion::result_of::at<Tuple, index>::type result_type;
- result_type operator()(Expr const &expr, lambda_context<Tuple> &ctx)
- {
-#if BOOST_VERSION < 103500
- return fusion::at<index::value>(ctx.args_);
-#else
- return fusion::at<index>(ctx.args_);
-#endif
- }
- };
+ #if BOOST_VERSION < 103500
+ return fusion::at<I::value>(this->args_);
+ #else
+ return fusion::at<I>(this->args_);
+ #endif
+ }
 
     Tuple args_;
 };
@@ -139,8 +123,8 @@
       , proto::result_of::eval<T const, lambda_context<fusion::tuple<> > >
>::type nullary_type;
 
- // Define our operator() that evaluates the lambda expression.
- nullary_type operator()() const
+ // Define our operator () that evaluates the lambda expression.
+ nullary_type operator ()() const
     {
         fusion::tuple<> args;
         lambda_context<fusion::tuple<> > ctx(args);
@@ -149,7 +133,7 @@
 
     template<typename A0>
     typename proto::result_of::eval<T const, lambda_context<fusion::tuple<A0 const &> > >::type
- operator()(A0 const &a0) const
+ operator ()(A0 const &a0) const
     {
         fusion::tuple<A0 const &> args(a0);
         lambda_context<fusion::tuple<A0 const &> > ctx(args);
@@ -158,7 +142,7 @@
 
     template<typename A0, typename A1>
     typename proto::result_of::eval<T const, lambda_context<fusion::tuple<A0 const &, A1 const &> > >::type
- operator()(A0 const &a0, A1 const &a1) const
+ operator ()(A0 const &a0, A1 const &a1) const
     {
         fusion::tuple<A0 const &, A1 const &> args(a0, a1);
         lambda_context<fusion::tuple<A0 const &, A1 const &> > ctx(args);

Modified: branches/CMake/release/libs/xpressive/proto/test/matches.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/matches.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/matches.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // matches.hpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -11,6 +11,7 @@
 #include <boost/mpl/placeholders.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/xpressive/proto/proto.hpp>
+#include <boost/xpressive/proto/transform.hpp>
 #include <boost/test/unit_test.hpp>
 
 using namespace boost;
@@ -48,8 +49,8 @@
>
 {};
 
-terminal< std::istream & >::type const cin_ = { std::cin };
-terminal< std::ostream & >::type const cout_ = { std::cout };
+terminal< std::istream & >::type const cin_ = {std::cin};
+terminal< std::ostream & >::type const cout_ = {std::cout};
 
 struct Anything
   : or_<
@@ -130,20 +131,20 @@
     assert_matches< terminal<convertible_to<int> > >( as_arg((int_convertible())) );
     assert_matches< terminal<convertible_to<int> > >( as_expr((int_convertible())) );
 
- assert_matches< if_<is_same<proto::result_of::arg<mpl::_>, int> > >( lit(1) );
- assert_not_matches< if_<is_same<proto::result_of::arg<mpl::_>, int> > >( lit('a') );
+ assert_matches< if_<is_same<_arg, int>() > >( lit(1) );
+ assert_not_matches< if_<is_same<_arg, int>() > >( lit('a') );
 
     assert_matches<
         and_<
             terminal<_>
- , if_<is_same<proto::result_of::arg<mpl::_>, int> >
+ , if_<is_same<_arg, int>() >
>
>( lit(1) );
 
     assert_not_matches<
         and_<
             terminal<_>
- , if_<is_same<proto::result_of::arg<mpl::_>, int> >
+ , if_<is_same<_arg, int>() >
>
>( lit('a') );
 
@@ -155,10 +156,18 @@
     assert_matches< terminal<char const (&)[6]> >( as_arg("hello") );
     assert_matches< terminal<char const (&)[6]> >( as_expr("hello") );
 
+ assert_matches< terminal<char [6]> >( lit("hello") );
+ assert_matches< terminal<char [6]> >( as_arg("hello") );
+ assert_matches< terminal<char [6]> >( as_expr("hello") );
+
     assert_matches< terminal<char const (&)[N]> >( lit("hello") );
     assert_matches< terminal<char const (&)[N]> >( as_arg("hello") );
     assert_matches< terminal<char const (&)[N]> >( as_expr("hello") );
 
+ assert_matches< terminal<char [N]> >( lit("hello") );
+ assert_matches< terminal<char [N]> >( as_arg("hello") );
+ assert_matches< terminal<char [N]> >( as_expr("hello") );
+
     assert_matches< terminal<std::string> >( lit(std::string("hello")) );
     assert_matches< terminal<std::string> >( as_arg(std::string("hello")) );
     assert_matches< terminal<std::string> >( as_expr(std::string("hello")) );
@@ -201,15 +210,15 @@
 
     assert_matches<
         or_<
- if_<is_same<proto::result_of::arg<mpl::_>, char> >
- , if_<is_same<proto::result_of::arg<mpl::_>, int> >
+ if_<is_same<_arg, char>() >
+ , if_<is_same<_arg, int>() >
>
>( lit(1) );
 
     assert_not_matches<
         or_<
- if_<is_same<proto::result_of::arg<mpl::_>, char> >
- , if_<is_same<proto::result_of::arg<mpl::_>, int> >
+ if_<is_same<_arg, char>() >
+ , if_<is_same<_arg, int>() >
>
>( lit(1u) );
 
@@ -244,3 +253,4 @@
 
     return test;
 }
+

Modified: branches/CMake/release/libs/xpressive/proto/test/proto_fusion.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/proto_fusion.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/proto_fusion.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // proto_fusion.cpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -65,7 +65,7 @@
     {}
 
     template<typename Op>
- void operator()(Op const &op) const
+ void operator ()(Op const &op) const
     {
         this->sout_ << '(' << boost::addressof(op) << ')';
     }
@@ -75,41 +75,43 @@
 
 void test1()
 {
+ using boost::proto::flatten;
+
     std::stringstream sout;
 
     // Test for 1-way branching "tree"
     sout.str("");
- boost::fusion::for_each(!!!!(a_ >> b_), to_string(sout));
+ boost::fusion::for_each(flatten(!!!!(a_ >> b_)), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)", sout.str());
 
     // Tests for 2-way branching trees
     sout.str("");
- boost::fusion::for_each(a_ >> b_ >> c_, to_string(sout));
+ boost::fusion::for_each(flatten(a_ >> b_ >> c_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c)", sout.str());
 
     sout.str("");
- boost::fusion::for_each(a_ | b_ | c_, to_string(sout));
+ boost::fusion::for_each(flatten(a_ | b_ | c_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c)", sout.str());
 
     sout.str("");
- boost::fusion::for_each(a_ >> b_ | c_ >> d_, to_string(sout));
+ boost::fusion::for_each(flatten(a_ >> b_ | c_ >> d_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)", sout.str());
 
     sout.str("");
- boost::fusion::for_each(a_ | b_ >> c_ | d_, to_string(sout));
+ boost::fusion::for_each(flatten(a_ | b_ >> c_ | d_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b>>c)(d)", sout.str());
 
     sout.str("");
- boost::fusion::for_each(a_ >> b_ | c_ >> d_ | e_ >> f_ >> g_, to_string(sout));
+ boost::fusion::for_each(flatten(a_ >> b_ | c_ >> d_ | e_ >> f_ >> g_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)(e>>f>>g)", sout.str());
 
     sout.str("");
- boost::fusion::for_each(a_ >> b_ | c_ >> d_ | e_ >> (f_ | g_) >> h_, to_string(sout));
+ boost::fusion::for_each(flatten(a_ >> b_ | c_ >> d_ | e_ >> (f_ | g_) >> h_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)(e>>f|g>>h)", sout.str());
 
     // Test for n-way branching tree
     sout.str("");
- boost::fusion::for_each(a_(b_(c_ >> d_, e_ | f_), g_ >> h_)(i_), to_string(sout));
+ boost::fusion::for_each(flatten(a_(b_(c_ >> d_, e_ | f_), g_ >> h_)(i_)), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c>>d)(e|f)(g>>h)(i)", sout.str());
 }
 

Modified: branches/CMake/release/libs/xpressive/proto/test/proto_fusion_s.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/proto_fusion_s.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/proto_fusion_s.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // proto_fusion_s.cpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -55,7 +55,7 @@
     {}
 
     template<typename Op>
- void operator()(Op const &op) const
+ void operator ()(Op const &op) const
     {
         this->sout_ << '(' << boost::addressof(op.proto_base()) << ')';
     }
@@ -65,6 +65,8 @@
 
 void test1()
 {
+ using boost::proto::flatten;
+
     boost::proto::terminal<char>::type a_ = {'a'};
     boost::proto::terminal<char>::type b_ = {'b'};
     boost::proto::terminal<char>::type c_ = {'c'};
@@ -79,37 +81,37 @@
 
     // Test for 1-way branching "tree"
     sout.str("");
- boost::fusion::for_each_s(!!!!(a_ >> b_), to_string(sout));
+ boost::fusion::for_each_s(flatten(!!!!(a_ >> b_)), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)", sout.str());
 
     // Tests for 2-way branching trees
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ >> c_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ >> c_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ | b_ | c_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ | b_ | c_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ | c_ >> d_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ | c_ >> d_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ | b_ >> c_ | d_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ | b_ >> c_ | d_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b>>c)(d)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ | c_ >> d_ | e_ >> f_ >> g_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ | c_ >> d_ | e_ >> f_ >> g_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)(e>>f>>g)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ | c_ >> d_ | e_ >> (f_ | g_) >> h_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ | c_ >> d_ | e_ >> (f_ | g_) >> h_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)(e>>f|g>>h)", sout.str());
 
     // Test for n-way branching tree
     sout.str("");
- boost::fusion::for_each_s(a_(b_(c_ >> d_, e_ | f_), g_ >> h_)(i_), to_string(sout));
+ boost::fusion::for_each_s(flatten(a_(b_(c_ >> d_, e_ | f_), g_ >> h_)(i_)), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c>>d)(e|f)(g>>h)(i)", sout.str());
 }
 
@@ -134,6 +136,8 @@
 
 void test2()
 {
+ using boost::proto::flatten;
+
     My<boost::proto::terminal<char>::type> a_ = {{'a'}};
     My<boost::proto::terminal<char>::type> b_ = {{'b'}};
     My<boost::proto::terminal<char>::type> c_ = {{'c'}};
@@ -148,37 +152,37 @@
 
     // Test for 1-way branching "tree"
     sout.str("");
- boost::fusion::for_each_s(!!!!(a_ >> b_), to_string(sout));
+ boost::fusion::for_each_s(flatten(!!!!(a_ >> b_)), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)", sout.str());
 
     // Tests for 2-way branching trees
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ >> c_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ >> c_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ | b_ | c_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ | b_ | c_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ | c_ >> d_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ | c_ >> d_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ | b_ >> c_ | d_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ | b_ >> c_ | d_), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b>>c)(d)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ | c_ >> d_ | e_ >> f_ >> g_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ | c_ >> d_ | e_ >> f_ >> g_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)(e>>f>>g)", sout.str());
 
     sout.str("");
- boost::fusion::for_each_s(a_ >> b_ | c_ >> d_ | e_ >> (f_ | g_) >> h_, to_string(sout));
+ boost::fusion::for_each_s(flatten(a_ >> b_ | c_ >> d_ | e_ >> (f_ | g_) >> h_), to_string(sout));
     BOOST_CHECK_EQUAL("(a>>b)(c>>d)(e>>f|g>>h)", sout.str());
 
     // Test for n-way branching tree
     sout.str("");
- boost::fusion::for_each_s(a_(b_(c_ >> d_, e_ | f_), g_ >> h_)(i_), to_string(sout));
+ boost::fusion::for_each_s(flatten(a_(b_(c_ >> d_, e_ | f_), g_ >> h_)(i_)), to_string(sout));
     BOOST_CHECK_EQUAL("(a)(b)(c>>d)(e|f)(g>>h)(i)", sout.str());
 }
 

Modified: branches/CMake/release/libs/xpressive/proto/test/toy_spirit.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/toy_spirit.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/toy_spirit.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,12 +1,13 @@
 ///////////////////////////////////////////////////////////////////////////////
 // toy_spirit.hpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <cctype>
 #include <string>
+#include <cstring>
 #include <iostream>
 #include <boost/assert.hpp>
 #include <boost/mpl/assert.hpp>
@@ -339,95 +340,86 @@
         bool in_skip_;
     };
 
- // remove_case
- template<typename Grammar>
- struct remove_case;
-
- template<>
- struct remove_case<CharParser>
+ struct as_ichar_parser : proto::callable
     {
         typedef proto::function<
             ianychar_p
           , proto::terminal<char>::type
           , proto::terminal<char>::type
- >::type type;
+ >::type result_type;
 
         template<typename Expr>
- static type call(Expr const &expr)
+ result_type operator()(Expr const &expr) const
         {
             char lo = std::tolower(proto::arg(proto::arg_c<1>(expr)));
             char hi = std::toupper(proto::arg(proto::arg_c<1>(expr)));
- type that = {ichar_, {lo}, {hi}};
+ result_type that = {ichar_, {lo}, {hi}};
             return that;
         }
     };
 
- template<>
- struct remove_case<CharRangeParser>
+ struct as_ichar_range_parser : proto::callable
     {
         typedef proto::function<
             ianychar_range_p
           , proto::terminal<char>::type
           , proto::terminal<char>::type
- >::type type;
+ >::type result_type;
 
         template<typename Expr>
- static type call(Expr const &expr)
+ result_type operator()(Expr const &expr) const
         {
             char lo = proto::arg(proto::arg_c<1>(expr));
             char hi = proto::arg(proto::arg_c<2>(expr));
- type that = {ichar_range_, {lo}, {hi}};
+ result_type that = {ichar_range_, {lo}, {hi}};
             return that;
         }
     };
 
- template<>
- struct remove_case<CharLiteral>
+ struct as_ichar_literal : proto::callable
     {
         typedef proto::function<
             ianychar_p
           , proto::terminal<char>::type
           , proto::terminal<char>::type
- >::type type;
+ >::type result_type;
 
         template<typename Expr>
- static type call(Expr const &expr)
+ result_type operator()(Expr const &expr) const
         {
             char lo = std::tolower(proto::arg(expr));
             char hi = std::toupper(proto::arg(expr));
- type that = {ichar_, {lo}, {hi}};
+ result_type that = {ichar_, {lo}, {hi}};
             return that;
         }
     };
 
- template<>
- struct remove_case<NTBSLiteral>
+ struct as_intbs_literal : proto::callable
     {
         typedef proto::function<
             ianystr_p
           , proto::terminal<std::string>::type
- >::type type;
+ >::type result_type;
 
         template<typename Expr>
- static type call(Expr const &expr)
+ result_type operator()(Expr const &expr) const
         {
- type that = {istr_, {utility::to_istr(proto::arg(expr))}};
+ result_type that = {istr_, {utility::to_istr(proto::arg(expr))}};
             return that;
         }
     };
 
- template<>
- struct remove_case<StdStringLiteral>
+ struct as_istdstring_literal : proto::callable
     {
         typedef proto::function<
             ianystr_p
           , proto::terminal<std::string>::type
- >::type type;
+ >::type result_type;
 
         template<typename Expr>
- static type call(Expr const &expr)
+ result_type operator()(Expr const &expr) const
         {
- type that = {istr_, {utility::to_istr(proto::arg(expr).c_str())}};
+ result_type that = {istr_, {utility::to_istr(proto::arg(expr).c_str())}};
             return that;
         }
     };
@@ -436,31 +428,13 @@
     // Transforms
     ///////////////////////////////////////////////////////////////////////////
 
- template<typename Grammar>
- struct case_sensitive
- : Grammar
+ struct skip_primitives : proto::callable
     {
- template<typename Expr, typename State, typename Visitor>
- struct apply
- : remove_case<Grammar>
- {};
+ template<typename Sig>
+ struct result;
 
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &, Visitor &)
- {
- return apply<Expr, State, Visitor>::call(expr);
- }
- };
-
- template<typename Grammar>
- struct skip_primitives
- : Grammar
- {
- skip_primitives();
-
- template<typename Expr, typename State, typename Visitor>
- struct apply
+ template<typename This, typename Expr, typename State, typename Visitor>
+ struct result<This(Expr, State, Visitor)>
         {
             typedef typename proto::shift_right<
                 typename proto::dereference<State>::type
@@ -469,10 +443,10 @@
         };
 
         template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
+ typename result<void(Expr, State, Visitor)>::type
+ operator()(Expr const &expr, State const &state, Visitor &visitor) const
         {
- typedef typename apply<Expr, State, Visitor>::type type;
+ typedef typename result<void(Expr, State, Visitor)>::type type;
             type that = {{state}, expr};
             return that;
         }
@@ -481,16 +455,17 @@
     ///////////////////////////////////////////////////////////////////////////
     // Grammar
     ///////////////////////////////////////////////////////////////////////////
+ using proto::_;
 
     struct SpiritGrammar;
 
     struct SpiritCaseSensitivePrimitives
       : proto::or_<
- case_sensitive<CharParser>
- , case_sensitive<CharLiteral>
- , case_sensitive<NTBSLiteral>
- , case_sensitive<CharRangeParser>
- , case_sensitive<StdStringLiteral>
+ proto::when<CharParser, as_ichar_parser(_)>
+ , proto::when<CharLiteral, as_ichar_literal(_)>
+ , proto::when<NTBSLiteral, as_intbs_literal(_)>
+ , proto::when<CharRangeParser, as_ichar_range_parser(_)>
+ , proto::when<StdStringLiteral, as_istdstring_literal(_)>
>
     {};
 
@@ -535,7 +510,7 @@
     struct SkipperGrammar
       : proto::or_<
             SpiritComposites<SkipperGrammar>
- , skip_primitives<SpiritPrimitives>
+ , proto::when<SpiritPrimitives, skip_primitives>
>
     {};
 
@@ -546,11 +521,11 @@
     struct no_case_directive
     {
         template<typename Expr>
- typename SpiritGrammar::apply<Expr, mpl::void_, mpl::void_>::type const
+ typename SpiritGrammar::result<void(Expr, mpl::void_, mpl::void_)>::type const
         operator [](Expr const &expr) const
         {
             mpl::void_ null;
- return SpiritGrammar::call(expr, null, null);
+ return SpiritGrammar()(expr, null, null);
         }
     };
 
@@ -565,11 +540,11 @@
         {}
 
         template<typename Expr>
- typename SkipperGrammar::apply<Expr, Skipper, mpl::void_>::type const
+ typename SkipperGrammar::result<void(Expr, Skipper, mpl::void_)>::type const
         operator [](Expr const &expr) const
         {
             mpl::void_ null;
- return SkipperGrammar::call(expr, this->skip_, null);
+ return SkipperGrammar()(expr, this->skip_, null);
         }
     private:
         Skipper skip_;

Modified: branches/CMake/release/libs/xpressive/proto/test/toy_spirit2.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/proto/test/toy_spirit2.cpp (original)
+++ branches/CMake/release/libs/xpressive/proto/test/toy_spirit2.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,31 +1,32 @@
 ///////////////////////////////////////////////////////////////////////////////
-// toy_spirit2.cpp
+// toy_spirit3.cpp
 //
-// Copyright 2006 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
 #include <cctype>
 #include <string>
+#include <cstring>
 #include <iomanip>
 #include <iostream>
+#include <boost/version.hpp>
 #include <boost/assert.hpp>
 #include <boost/mpl/assert.hpp>
 #include <boost/utility/result_of.hpp>
 #include <boost/type_traits/is_same.hpp>
 #include <boost/xpressive/proto/proto.hpp>
-#include <boost/xpressive/proto/transform/arg.hpp>
-#include <boost/xpressive/proto/transform/construct.hpp>
-#include <boost/xpressive/proto/transform/fold_tree.hpp>
-#include <boost/xpressive/proto/transform/list.hpp>
+#include <boost/xpressive/proto/transform.hpp>
 #if BOOST_VERSION < 103500
 # include <boost/spirit/fusion/algorithm/for_each.hpp>
 # include <boost/spirit/fusion/algorithm/fold.hpp>
 # include <boost/spirit/fusion/algorithm/any.hpp>
+# include <boost/spirit/fusion/sequence/cons.hpp>
 #else
-#include <boost/fusion/include/for_each.hpp>
-#include <boost/fusion/include/fold.hpp>
-#include <boost/fusion/include/any.hpp>
+# include <boost/fusion/include/for_each.hpp>
+# include <boost/fusion/include/fold.hpp>
+# include <boost/fusion/include/cons.hpp>
+# include <boost/fusion/include/any.hpp>
 #endif
 #include <boost/test/unit_test.hpp>
 
@@ -70,7 +71,7 @@
             FwdIter tmp = begin;
             std::string::const_iterator istr = str.begin(), estr = str.end();
             for(; istr != estr; ++tmp, istr += 2)
- if(tmp == end || *tmp != *istr && *tmp != *(istr+1))
+ if(tmp == end || (*tmp != *istr && *tmp != *(istr+1)))
                     return false;
             begin = tmp;
             return true;
@@ -101,44 +102,22 @@
         }
     } // namespace utility
 
- // Composite parser that contains a Fusion cons-list of other parsers
- // OR
- // A compiler that compiles an expression and wraps the result in
- // a composite<> wrapper
- template<typename Tag, typename List>
- struct composite
+ template<typename List>
+ struct alternate
     {
- composite(List const &list)
+ explicit alternate(List const &list)
           : elems(list)
         {}
-
         List elems;
     };
 
- template<typename Tag, typename Grammar>
- struct as_composite
- : Grammar
- {
- as_composite();
-
- // The apply<> struct and the call() member are to satisfy the
- // proto compiler/transform protocol
- template<typename Expr, typename State, typename Visitor>
- struct apply
- {
- typedef composite<
- Tag
- , typename Grammar::template apply<Expr, State, Visitor>::type
- > type;
- };
-
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
- {
- return typename apply<Expr, State, Visitor>::type
- (Grammar::call(expr, state, visitor));
- }
+ template<typename List>
+ struct sequence
+ {
+ explicit sequence(List const &list)
+ : elems(list)
+ {}
+ List elems;
     };
 
     struct char_range
@@ -171,276 +150,194 @@
     struct ichar_range
       : std::pair<char, char>
     {
- ichar_range(char_range const &rng)
- : std::pair<char, char>(rng)
+ ichar_range(char from, char to)
+ : std::pair<char, char>(from, to)
         {}
     };
 
     // The no-case directive
     struct no_case_tag {};
 
- // The no-case transform, applies the tree-transform with
- // mpl::true_ as the visitor.
- template<typename Grammar>
- struct no_case_transform
- : Grammar
+ struct True : mpl::true_ {};
+
+ ///////////////////////////////////////////////////////////////////////////////
+ /// Begin Spirit grammar here
+ ///////////////////////////////////////////////////////////////////////////////
+ namespace grammar
     {
- no_case_transform();
+ using namespace proto;
+ using namespace fusion;
+ using namespace transform;
 
- template<typename Expr, typename State, typename>
- struct apply
- : Grammar::template apply<Expr, State, mpl::true_>
- {};
+ struct SpiritExpr;
 
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &)
- {
- mpl::true_ case_sensitive;
- return Grammar::call(expr, state, case_sensitive);
- }
- };
+ struct AnyChar
+ : terminal<char_tag>
+ {};
 
- // remove_case specializations for stripping case-sensitivity from parsers
- template<typename T, bool CaseSensitive>
- struct remove_case
- {
- typedef T type;
- template<typename U> static U const &call(U const &t)
- {
- return t;
- }
- };
+ struct CharLiteral
+ : terminal<char>
+ {};
 
- template<>
- struct remove_case<char, true>
- {
- typedef ichar type;
- static ichar call(char ch)
- {
- return ichar(ch);
- }
- };
+ struct NTBSLiteral
+ : terminal<char const *>
+ {};
 
- template<>
- struct remove_case<char const *, true>
- {
- typedef istr type;
- static istr call(char const *sz)
- {
- return istr(sz);
- }
- };
+ struct CharParser
+ : proto::function<AnyChar, CharLiteral>
+ {};
 
- template<typename T, std::size_t N>
- struct remove_case<T(&)[N], true>
- : remove_case<char const *, true>
- {};
+ struct CharRangeParser
+ : proto::function<AnyChar, CharLiteral, CharLiteral>
+ {};
 
- template<>
- struct remove_case<char_range, true>
- {
- typedef ichar_range type;
- static ichar_range call(char_range const &rng)
- {
- return ichar_range(rng);
- }
- };
+ struct NoCase
+ : terminal<no_case_tag>
+ {};
 
- // A case-sensitive transform that removes case conditionally, depending on
- // a compile-time flag carried by the visitor.
- template<typename Grammar>
- struct case_sensitive
- : Grammar
- {
- case_sensitive();
+ // The visitor determines the case-sensitivity of the terminals
+ typedef _visitor _icase;
 
- template<typename Expr, typename State, typename Visitor>
- struct apply
- : remove_case<
- typename Grammar::template apply<Expr, State, Visitor>::type
- , Visitor::value
+ // Ugh, would be nice to find a work-around for this:
+ #if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+ #define _arg(x) call<_arg(x)>
+ #define True() make<True()>
+ #endif
+
+ // Extract the arg from terminals
+ struct SpiritTerminal
+ : or_<
+ when< AnyChar, _arg >
+ , when< CharLiteral, if_<_icase, ichar(_arg), _arg> >
+ , when< CharParser, if_<_icase, ichar(_arg(_arg1)), _arg(_arg1)> > // char_('a')
+ , when< NTBSLiteral, if_<_icase, istr(_arg), char const*(_arg)> >
+ , when< CharRangeParser, if_<_icase
+ , ichar_range(_arg(_arg1), _arg(_arg2))
+ , char_range(_arg(_arg1), _arg(_arg2))> > // char_('a','z')
>
         {};
 
- template<typename Expr, typename State, typename Visitor>
- static typename apply<Expr, State, Visitor>::type
- call(Expr const &expr, State const &state, Visitor &visitor)
- {
- return apply<Expr, State, Visitor>::call(Grammar::call(expr, state, visitor));
- }
- };
-
- ///////////////////////////////////////////////////////////////////////////////
- /// Begin ToySpiritGrammar here
- ///////////////////////////////////////////////////////////////////////////////
+ struct FoldToList
+ : reverse_fold_tree<_, nil(), cons<SpiritExpr, _state>(SpiritExpr, _state)>
+ {};
 
- struct ToySpiritGrammar;
+ // sequence rule folds all >>'s together into a list
+ // and wraps the result in a sequence<> wrapper
+ struct SpiritSequence
+ : when< shift_right<SpiritExpr, SpiritExpr>, sequence<FoldToList>(FoldToList) >
+ {};
 
- struct AnyChar
- : proto::terminal<char_tag>
- {};
-
- struct CharLiteral
- : proto::terminal<char>
- {};
-
- struct NTBSLiteral
- : proto::terminal<char const *>
- {};
-
- struct CharParser
- : proto::function<AnyChar, CharLiteral>
- {};
-
- struct CharRangeParser
- : proto::function<AnyChar, CharLiteral, CharLiteral>
- {};
-
- struct NoCase
- : proto::terminal<no_case_tag>
- {};
-
- // Extract the arg from terminals
- struct ToySpiritTerminal
- : proto::or_<
- proto::transform::arg< AnyChar >
- , case_sensitive< proto::transform::arg< CharLiteral > >
- , case_sensitive< proto::transform::arg< NTBSLiteral > >
- , case_sensitive<
- proto::transform::arg< proto::transform::arg_c< CharParser, 1 > > // char_('a')
- >
- , case_sensitive<
- proto::transform::construct< // char_('a','z')
- CharRangeParser
- , char_range(
- proto::transform::arg< proto::transform::arg_c< proto::_, 1 > >
- , proto::transform::arg< proto::transform::arg_c< proto::_, 2 > >
- )
- >
- >
- >
- {};
+ // alternate rule folds all |'s together into a list
+ // and wraps the result in a alternate<> wrapper
+ struct SpiritAlternate
+ : when< bitwise_or<SpiritExpr, SpiritExpr>, alternate<FoldToList>(FoldToList) >
+ {};
 
- // sequence rule folds all >>'s together into a list
- // and wraps the result in a composite<> wrapper
- struct ToySpiritSequence
- : as_composite<
- proto::tag::shift_right
- , proto::transform::reverse_fold_tree<
- proto::tag::shift_right
- , proto::transform::list<ToySpiritGrammar>
- , fusion::nil
- >
- >
- {};
+ // Directives such as no_case are handled here
+ struct SpiritDirective
+ : when< subscript<NoCase, SpiritExpr>, SpiritExpr(_right, _state, True()) >
+ {};
 
- // alternate rule folds all |'s together into a list
- // and wraps the result in a composite<> wrapper
- struct ToySpiritAlternate
- : as_composite<
- proto::tag::bitwise_or
- , proto::transform::reverse_fold_tree<
- proto::tag::bitwise_or
- , proto::transform::list<ToySpiritGrammar>
- , fusion::nil
+ // A SpiritExpr is an alternate, a sequence, a directive or a terminal
+ struct SpiritExpr
+ : or_<
+ SpiritSequence
+ , SpiritAlternate
+ , SpiritDirective
+ , SpiritTerminal
>
- >
- {};
+ {};
 
- // Directives such as no_case are handled here
- struct ToySpiritDirective
- : no_case_transform<
- proto::transform::arg_c<
- proto::subscript< NoCase, ToySpiritGrammar >
- , 1
- >
- >
- {};
+ } // namespace grammar
 
- // A ToySpiritGrammar is an alternate, a sequence, a directive or a terminal
- struct ToySpiritGrammar
- : proto::or_<
- ToySpiritSequence
- , ToySpiritAlternate
- , ToySpiritDirective
- , ToySpiritTerminal
- >
- {};
+ using grammar::SpiritExpr;
+ using grammar::NoCase;
 
     ///////////////////////////////////////////////////////////////////////////////
- /// End ToySpiritGrammar
+ /// End SpiritExpr
     ///////////////////////////////////////////////////////////////////////////////
 
     // Globals
     NoCase::type const no_case = {{}};
 
- // Parser
- template<typename Iterator, typename Derived>
- struct with_reset
+ template<typename Iterator>
+ struct parser;
+
+ template<typename Iterator>
+ struct fold_alternate
     {
- with_reset(Iterator begin, Iterator end)
- : first(begin), second(end)
+ parser<Iterator> const &parse;
+
+ explicit fold_alternate(parser<Iterator> const &p)
+ : parse(p)
         {}
 
         template<typename T>
- bool operator()(T const &t) const
+ bool operator ()(T const &t) const
         {
- Iterator tmp = this->first;
- if((*static_cast<Derived const *>(this))(t))
+ Iterator tmp = this->parse.first;
+ if(this->parse(t))
                 return true;
- this->first = tmp;
+ this->parse.first = tmp;
             return false;
         }
-
- bool done() const
- {
- return this->first == this->second;
- }
-
- mutable Iterator first;
- Iterator second;
     };
 
     template<typename Iterator>
- struct parser
- : with_reset<Iterator, parser<Iterator> >
+ struct fold_sequence
     {
- typedef with_reset<Iterator, parser<Iterator> > with_reset;
+ parser<Iterator> const &parse;
 
- parser(Iterator begin, Iterator end)
- : with_reset(begin, end)
+ explicit fold_sequence(parser<Iterator> const &p)
+ : parse(p)
         {}
 
-#if BOOST_VERSION < 103500
- template<typename, typename> // used by fusion::fold
+ #if BOOST_VERSION < 103500
+ template<typename, typename>
         struct apply
         {
             typedef bool type;
         };
-#else
- typedef bool result_type; // used by fusion::fold
-#endif
+ #else
+ typedef bool result_type;
+ #endif
 
         template<typename T>
- bool operator()(T const &t, bool success) const // used by fusion::fold
+ bool operator ()(T const &t, bool success) const
+ {
+ return success && this->parse(t);
+ }
+ };
+
+ template<typename Iterator>
+ struct parser
+ {
+ mutable Iterator first;
+ Iterator second;
+
+ parser(Iterator begin, Iterator end)
+ : first(begin)
+ , second(end)
+ {}
+
+ bool done() const
         {
- return success && (*this)(t);
+ return this->first == this->second;
         }
 
         template<typename List>
- bool operator()(composite<proto::tag::bitwise_or, List> const &alternates) const
+ bool operator ()(alternate<List> const &alternates) const
         {
- return fusion::any(alternates.elems, *static_cast<with_reset const *>(this));
+ return fusion::any(alternates.elems, fold_alternate<Iterator>(*this));
         }
 
         template<typename List>
- bool operator()(composite<proto::tag::shift_right, List> const &sequence) const
+ bool operator ()(sequence<List> const &sequence) const
         {
- return fusion::fold(sequence.elems, true, *this);
+ return fusion::fold(sequence.elems, true, fold_sequence<Iterator>(*this));
         }
 
- bool operator()(char_tag ch) const
+ bool operator ()(char_tag ch) const
         {
             if(this->done())
                 return false;
@@ -448,7 +345,7 @@
             return true;
         }
 
- bool operator()(char ch) const
+ bool operator ()(char ch) const
         {
             if(this->done() || ch != *this->first)
                 return false;
@@ -456,7 +353,7 @@
             return true;
         }
 
- bool operator()(ichar ich) const
+ bool operator ()(ichar ich) const
         {
             if(this->done() || !utility::char_icmp(*this->first, ich.lo_, ich.hi_))
                 return false;
@@ -464,17 +361,17 @@
             return true;
         }
 
- bool operator()(char const *sz) const
+ bool operator ()(char const *sz) const
         {
             return utility::string_cmp(sz, this->first, this->second);
         }
 
- bool operator()(istr const &s) const
+ bool operator ()(istr const &s) const
         {
             return utility::string_icmp(s.str_, this->first, this->second);
         }
 
- bool operator()(char_range rng) const
+ bool operator ()(char_range rng) const
         {
             if(this->done() || !utility::in_range(*this->first, rng.first, rng.second))
                 return false;
@@ -482,7 +379,7 @@
             return true;
         }
 
- bool operator()(ichar_range rng) const
+ bool operator ()(ichar_range rng) const
         {
             if(this->done() || !utility::in_irange(*this->first, rng.first, rng.second))
                 return false;
@@ -492,20 +389,20 @@
     };
 
     template<typename Rule, typename Iterator>
- typename enable_if<proto::matches< Rule, ToySpiritGrammar >, bool >::type
+ typename enable_if<proto::matches< Rule, SpiritExpr >, bool >::type
     parse_impl(Rule const &rule, Iterator begin, Iterator end)
     {
         mpl::false_ is_case_sensitive;
         parser<Iterator> parse_fun(begin, end);
- return parse_fun(ToySpiritGrammar::call(rule, 0, is_case_sensitive));
+ return parse_fun(SpiritExpr()(rule, 0, is_case_sensitive));
     }
 
     // 2nd overload provides a short error message for invalid rules
     template<typename Rule, typename Iterator>
- typename disable_if<proto::matches< Rule, ToySpiritGrammar >, bool >::type
+ typename disable_if<proto::matches< Rule, SpiritExpr >, bool >::type
     parse_impl(Rule const &rule, Iterator begin, Iterator end)
     {
- BOOST_MPL_ASSERT((proto::matches<Rule, ToySpiritGrammar>));
+ BOOST_MPL_ASSERT((proto::matches<Rule, SpiritExpr>));
         return false;
     }
 
@@ -519,15 +416,14 @@
 
 }}
 
-using namespace boost;
-
-void test_toy_spirit2()
+void test_toy_spirit3()
 {
- using spirit2::no_case;
+ using boost::spirit2::no_case;
+ using boost::char_;
     std::string hello("abcd");
 
     BOOST_CHECK(
- spirit2::parse(
+ boost::spirit2::parse(
             "abcd"
           , hello.begin()
           , hello.end()
@@ -535,7 +431,7 @@
     );
 
     BOOST_CHECK(
- spirit2::parse(
+ boost::spirit2::parse(
             char_ >> char_('b') >> 'c' >> char_
           , hello.begin()
           , hello.end()
@@ -543,7 +439,7 @@
     );
 
     BOOST_CHECK(
- !spirit2::parse(
+ !boost::spirit2::parse(
             char_ >> char_('b') >> 'c' >> 'D'
           , hello.begin()
           , hello.end()
@@ -551,13 +447,26 @@
     );
 
     BOOST_CHECK(
- spirit2::parse(
+ boost::spirit2::parse(
             char_ >> char_('b') >> 'c' >> 'e'
           | char_ >> no_case[char_('B') >> "C" >> char_('D','Z')]
           , hello.begin()
           , hello.end()
         )
     );
+
+ std::string nest_alt_input("abd");
+ BOOST_CHECK(
+ boost::spirit2::parse(
+ char_('a')
+ >> ( char_('b')
+ | char_('c')
+ )
+ >> char_('d')
+ , nest_alt_input.begin()
+ , nest_alt_input.end()
+ )
+ );
 }
 
 using namespace boost::unit_test;
@@ -568,7 +477,7 @@
 {
     test_suite *test = BOOST_TEST_SUITE("test proto, grammars and tree transforms");
 
- test->add(BOOST_TEST_CASE(&test_toy_spirit2));
+ test->add(BOOST_TEST_CASE(&test_toy_spirit3));
 
     return test;
 }

Modified: branches/CMake/release/libs/xpressive/test/CMakeLists.txt
==============================================================================
--- branches/CMake/release/libs/xpressive/test/CMakeLists.txt (original)
+++ branches/CMake/release/libs/xpressive/test/CMakeLists.txt 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -13,7 +13,6 @@
   execute_process(COMMAND cmake -E copy "${CMAKE_SOURCE_DIR}/libs/xpressive/test/regress.txt" "${CMAKE_CURRENT_BINARY_DIR}")
 endif (NOT ${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
 
-
 SET(runtests
   regress
   c_traits
@@ -41,10 +40,14 @@
   test11u
   misc1
   misc2
+ test_format
   test_cycles
   test_non_char
   test_static
- test_dynamic)
+ test_dynamic
+ test_dynamic_grammar
+ test_skip
+ )
 
 foreach(runtest ${runtests})
   boost_test_run(${runtest} DEPENDS boost_unit_test_framework)

Modified: branches/CMake/release/libs/xpressive/test/Jamfile.v2
==============================================================================
--- branches/CMake/release/libs/xpressive/test/Jamfile.v2 (original)
+++ branches/CMake/release/libs/xpressive/test/Jamfile.v2 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -13,6 +13,7 @@
         <toolset>msvc-8.0:<define>_CRT_SECURE_NO_DEPRECATE
         <toolset>msvc-9.0:<define>_SCL_SECURE_NO_DEPRECATE
         <toolset>gcc:<cxxflags>-ftemplate-depth-1024
+ <toolset>darwin:<cxxflags>-ftemplate-depth-1024
 # <toolset>gcc:<cxxflags>-W
 # <toolset>gcc:<cxxflags>-Wall
 # <toolset>msvc:<cxxflags>-W4
@@ -48,6 +49,7 @@
          [ run test11u.cpp ]
          [ run misc1.cpp ]
          [ run misc2.cpp ]
+ [ run test_format.cpp ]
          [ run test_cycles.cpp ]
          [ run test_non_char.cpp ]
          [ run test_static.cpp ]
@@ -56,6 +58,7 @@
          [ run test_symbols.cpp ]
          [ run test_dynamic.cpp ]
          [ run test_dynamic_grammar.cpp ]
+ [ run test_skip.cpp ]
          [ link multiple_defs1.cpp multiple_defs2.cpp : : multiple_defs ]
          [ compile test_basic_regex.cpp ]
          [ compile test_match_results.cpp ]

Modified: branches/CMake/release/libs/xpressive/test/misc1.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/misc1.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/misc1.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // misc1.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/misc2.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/misc2.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/misc2.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,15 +1,16 @@
 ///////////////////////////////////////////////////////////////////////////////
 // misc2.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
-#include <iostream>
+#include <map>
+#include <string>
 #include <boost/xpressive/xpressive.hpp>
+#include <boost/xpressive/regex_actions.hpp>
 #include <boost/test/unit_test.hpp>
 
-using namespace boost::unit_test;
 using namespace boost::xpressive;
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -26,6 +27,54 @@
 }
 
 ///////////////////////////////////////////////////////////////////////////////
+//
+void test_static_actions_in_dynamic_keep()
+{
+ std::string result;
+ std::string str("foo");
+
+ sregex_compiler compiler;
+ compiler["rx0"] = (s1="foo")[ ref(result) = s1 ];
+ sregex rx = compiler.compile("(?>(?$rx0))");
+
+ bool ok = regex_match(str, rx);
+ BOOST_CHECK(ok);
+ BOOST_CHECK_EQUAL(result, "foo");
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+void test_static_actions_in_static_keep()
+{
+ std::string result;
+ std::string str("foo");
+
+ sregex rx0 = (s1="foo")[ ref(result) = s1 ];
+ sregex rx = keep(rx0);
+
+ bool ok = regex_match(str, rx);
+ BOOST_CHECK(ok);
+ BOOST_CHECK_EQUAL(result, "foo");
+}
+
+///////////////////////////////////////////////////////////////////////////////
+//
+void test_replace_with_lambda()
+{
+ std::map<std::string, std::string> replacements;
+ replacements["X"] = "this";
+ replacements["Y"] = "that";
+
+ std::string input("\"$(X)\" has the value \"$(Y)\""), output;
+ std::string expected("\"this\" has the value \"that\"");
+ sregex rx = "$(" >> (s1= +~as_xpr(')')) >> ')';
+
+ output = regex_replace(input, rx, ref(replacements)[s1]);
+ BOOST_CHECK_EQUAL(output, expected);
+}
+
+using namespace boost::unit_test;
+///////////////////////////////////////////////////////////////////////////////
 // init_unit_test_suite
 //
 test_suite* init_unit_test_suite( int argc, char* argv[] )
@@ -33,6 +82,9 @@
     test_suite *test = BOOST_TEST_SUITE("miscelaneous tests");
 
     test->add(BOOST_TEST_CASE(&test_complement));
+ test->add(BOOST_TEST_CASE(&test_static_actions_in_dynamic_keep));
+ test->add(BOOST_TEST_CASE(&test_static_actions_in_static_keep));
+ test->add(BOOST_TEST_CASE(&test_replace_with_lambda));
 
     return test;
 }

Modified: branches/CMake/release/libs/xpressive/test/multiple_defs1.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/multiple_defs1.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/multiple_defs1.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // multiple_defs1.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/multiple_defs2.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/multiple_defs2.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/multiple_defs2.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // multiple_defs2.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/regress.ipp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/regress.ipp (original)
+++ branches/CMake/release/libs/xpressive/test/regress.ipp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -272,11 +272,26 @@
         typedef typename std::basic_string<Char>::const_iterator iterator;
         basic_regex<iterator> rx = basic_regex<iterator>::compile(test.pat, test.syntax_flags);
 
+ // Build the same regex for use with C strings
+ basic_regex<Char const *> c_rx = basic_regex<Char const *>::compile(test.pat, test.syntax_flags);
+
         if(!test.res.empty())
         {
             // test regex_replace
             std::basic_string<Char> res = regex_replace(test.str, rx, test.sub, test.match_flags);
             BOOST_CHECK_MESSAGE(res == test.res, case_ << res << " != " << test.res );
+
+ // test regex_replace with NTBS format string
+ std::basic_string<Char> res2 = regex_replace(test.str, rx, test.sub.c_str(), test.match_flags);
+ BOOST_CHECK_MESSAGE(res2 == test.res, case_ << res2 << " != " << test.res );
+
+ // test regex_replace with NTBS input string
+ std::basic_string<Char> res3 = regex_replace(test.str.c_str(), c_rx, test.sub, test.match_flags);
+ BOOST_CHECK_MESSAGE(res3 == test.res, case_ << res3 << " != " << test.res );
+
+ // test regex_replace with NTBS input string and NTBS format string
+ std::basic_string<Char> res4 = regex_replace(test.str.c_str(), c_rx, test.sub.c_str(), test.match_flags);
+ BOOST_CHECK_MESSAGE(res4 == test.res, case_ << res4 << " != " << test.res );
         }
 
         if(0 == (test.match_flags & regex_constants::format_first_only))

Modified: branches/CMake/release/libs/xpressive/test/test.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test1.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test1.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test1.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test1.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test1.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test1.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test1.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test1.h
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test10.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test10.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test10.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test10.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test10.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test10.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test10.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test10.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test10u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test10u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test10u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test10.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test11.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test11.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test11.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test11.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test11.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test11.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test11.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test11.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test11u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test11u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test11u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test11u.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test1u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test1u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test1u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test1.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test2.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test2.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test2.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test2.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test2.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test2.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test2.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test2.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test2u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test2u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test2u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test2.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test3.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test3.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test3.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test3.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test3.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test3.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test3.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test3.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test3u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test3u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test3u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test3.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test4.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test4.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test4.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test4.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test4.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test4.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test4.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test4.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test4u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test4u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test4u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test4.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test5.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test5.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test5.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test5.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test5.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test5.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test5.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test5.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test5u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test5u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test5u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test5.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test6.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test6.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test6.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test6.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test6.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test6.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test6.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test6.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test6u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test6u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test6u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test6.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test7.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test7.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test7.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test7.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test7.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test7.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test7.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test7.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test7u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test7u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test7u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test7.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test8.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test8.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test8.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test8.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test8.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test8.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test8.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test8.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test8u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test8u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test8u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test8.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test9.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test9.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test9.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test9.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test9.hpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test9.hpp (original)
+++ branches/CMake/release/libs/xpressive/test/test9.hpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test9.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test9u.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test9u.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test9u.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test9.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_actions.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_actions.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_actions.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_actions.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -70,10 +70,10 @@
     std::list<int> result;
     std::string str("1 23 456 7890");
 #if BOOST_VERSION >= 103500
- sregex rx = (+_d)[ xp::ref(result)->*push_back( as<int>(_) ) ]
+ sregex rx = (+_d)[ xp::ref(result)->*push_back( as<int>(_) ) ]
>> *(' ' >> (+_d)[ xp::ref(result)->*push_back( as<int>(_) ) ]);
 #else
- sregex rx = (+_d)[ push_back(xp::ref(result), as<int>(_) ) ]
+ sregex rx = (+_d)[ push_back(xp::ref(result), as<int>(_) ) ]
>> *(' ' >> (+_d)[ push_back(xp::ref(result), as<int>(_) ) ]);
 #endif
 

Modified: branches/CMake/release/libs/xpressive/test/test_assert.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_assert.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_assert.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_assert.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -53,7 +53,7 @@
 
     mark_tag month(1), day(2);
     // find a valid date of the form month/day/year.
- sregex date =
+ sregex date =
         (
             // Month must be between 1 and 12 inclusive
             (month= _d >> !_d) [ check(as<int>(_) >= 1

Modified: branches/CMake/release/libs/xpressive/test/test_basic_regex.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_basic_regex.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_basic_regex.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_basic_regex.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_cycles.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_cycles.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_cycles.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_cycles.hpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_dynamic.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_dynamic.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_dynamic.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_dynamic.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_dynamic_grammar.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_dynamic_grammar.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_dynamic_grammar.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -68,7 +68,7 @@
             compiler["factor"] = compiler.compile( "\\d+ | (? $group ) ", x);
             compiler["term"] = compiler.compile( "(? $factor ) (?: \\* (? $factor ) | / (? $factor ) )* ", x);
             compiler["expr"] = compiler.compile( "(? $term ) (?: \\+ (? $term ) | - (? $term ) )* ", x);
-
+
             expr = compiler["expr"];
         }
 

Modified: branches/CMake/release/libs/xpressive/test/test_match_results.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_match_results.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_match_results.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_match_results.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_non_char.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_non_char.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_non_char.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_non_char.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -80,6 +80,12 @@
         BOOST_CHECK_EQUAL(3, what.position());
         BOOST_CHECK_EQUAL(3, what.length());
     }
+
+ // test for range-based regex_replace
+ std::vector<UChar> output = regex_replace(str, urx, pattern_);
+ std::string output_(output.begin(), output.end());
+ std::string expected("foob.*rboo");
+ BOOST_CHECK_EQUAL(output_, expected);
 }
 
 ///////////////////////////////////////////////////////////////////////////////

Modified: branches/CMake/release/libs/xpressive/test/test_partial_match.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_partial_match.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_partial_match.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_partial_match.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_algorithms.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_algorithms.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_algorithms.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_algorithms.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_compiler.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_compiler.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_compiler.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_compiler.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_constants.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_constants.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_constants.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_constants.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_error.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_error.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_error.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_error.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_iterator.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_iterator.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_iterator.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_iterator.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_primitives.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_primitives.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_primitives.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_primitives.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_token_iterator.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_token_iterator.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_token_iterator.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_token_iterator.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_regex_traits.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_regex_traits.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_regex_traits.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_regex_traits.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_static.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_static.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_static.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_static.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_sub_match.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_sub_match.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_sub_match.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_sub_match.cpp
 //
-// Copyright 2004 Eric Niebler. Distributed under the Boost
+// Copyright 2008 Eric Niebler. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_symbols.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_symbols.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_symbols.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,13 +1,14 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_symbols.cpp
 //
-// Copyright 2007 David Jenkins.
-// Copyright 2007 Eric Niebler.
+// Copyright 2008 David Jenkins.
+// Copyright 2008 Eric Niebler.
 //
 // Distributed under the Boost Software License, Version 1.0. (See
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
+#include <string>
 #include <map>
 #include <boost/version.hpp>
 #include <boost/xpressive/xpressive_static.hpp>
@@ -25,14 +26,16 @@
 {
     using namespace boost::xpressive;
 
- std::string result;
+ local<std::string> result;
     std::string str("foo bar baz foo bar baz");
     std::map<std::string,std::string> map1;
     map1["foo"] = "1";
     map1["bar"] = "2";
     map1["baz"] = "3";
 
- sregex rx = (a1=map1)[ xp::ref(result) = a1 ] >> *(' ' >> (a1=map1)[ xp::ref(result) += ',' + a1 ]);
+ sregex rx = skip(_s) (+(a1=map1)
+ [ result += if_else(length(result) > 0, ",", "") + a1 ]
+ );
 
     if(!regex_match(str, rx))
     {
@@ -40,7 +43,7 @@
     }
     else
     {
- BOOST_CHECK_EQUAL(result, "1,2,3,1,2,3");
+ BOOST_CHECK_EQUAL(result.get(), "1,2,3,1,2,3");
     }
 }
 
@@ -51,7 +54,7 @@
 {
     using namespace boost::xpressive;
 
- std::string result;
+ local<std::string> result;
     std::string str("foobarbazfoobazbazfoobazbar");
     std::map<std::string,std::string> map1;
     map1["foo"] = "1";
@@ -60,8 +63,9 @@
     map1["foobaz"] = "4";
     map1["foobazbaz"] = "5";
 
- sregex rx = (a1=map1)[ xp::ref(result) = a1 ]
- >> *((a1=map1)[ xp::ref(result) += ',', xp::ref(result) += a1 ]);
+ sregex rx = skip(_s) (+(a1=map1)
+ [ result += if_else(length(result) > 0, ",", "") + a1 ]
+ );
 
     if(!regex_match(str, rx))
     {
@@ -69,7 +73,7 @@
     }
     else
     {
- BOOST_CHECK_EQUAL(result, "1,2,3,5,4,2");
+ BOOST_CHECK_EQUAL(result.get(), "1,2,3,5,4,2");
     }
 }
 
@@ -89,11 +93,13 @@
     map1["bop"] = 7890;
 
 #if BOOST_VERSION >= 103500
- sregex rx = (a1=map1)[ xp::ref(result)->*push_back( a1 ) ]
- >> *(' ' >> (a1=map1)[ xp::ref(result)->*push_back( a1 ) ]);
+ sregex rx = skip(_s) (+(a1=map1)
+ [ xp::ref(result)->*push_back( a1 ) ]
+ );
 #else
- sregex rx = (a1=map1)[ push_back(xp::ref(result), a1 ) ]
- >> *(' ' >> (a1=map1)[ push_back(xp::ref(result), a1 ) ]);
+ sregex rx = skip(_s) (+(a1=map1)
+ [ push_back(xp::ref(result), a1 ) ]
+ );
 #endif
 
     if(!regex_match(str, rx))
@@ -155,7 +161,7 @@
 {
     using namespace boost::xpressive;
 
- int result = 0;
+ local<int> result(0);
     std::string str("abcdefghi");
     std::map<std::string,int> map1;
     std::map<std::string,int> map2;
@@ -176,16 +182,16 @@
     map8["h"] = 8;
     map9["i"] = 9;
 
- sregex rx =
- (a1=map1)[ xp::ref(result) += a1 ]
- >> (a2=map2)[ xp::ref(result) += a2 ]
- >> (a3=map3)[ xp::ref(result) += a3 ]
- >> (a4=map4)[ xp::ref(result) += a4 ]
- >> (a5=map5)[ xp::ref(result) += a5 ]
- >> (a6=map6)[ xp::ref(result) += a6 ]
- >> (a7=map7)[ xp::ref(result) += a7 ]
- >> (a8=map8)[ xp::ref(result) += a8 ]
- >> (a9=map9)[ xp::ref(result) += a9 ];
+ sregex rx =
+ (a1=map1)[ result += a1 ]
+ >> (a2=map2)[ result += a2 ]
+ >> (a3=map3)[ result += a3 ]
+ >> (a4=map4)[ result += a4 ]
+ >> (a5=map5)[ result += a5 ]
+ >> (a6=map6)[ result += a6 ]
+ >> (a7=map7)[ result += a7 ]
+ >> (a8=map8)[ result += a8 ]
+ >> (a9=map9)[ result += a9 ];
 
     if(!regex_match(str, rx))
     {
@@ -193,7 +199,7 @@
     }
     else
     {
- BOOST_CHECK_EQUAL(result, 45);
+ BOOST_CHECK_EQUAL(result.get(), 45);
     }
 }
 
@@ -204,23 +210,25 @@
 {
     using namespace boost::xpressive;
 
- std::string result;
+ local<std::string> result;
     std::map<std::string,std::string> map1;
     map1["a"] = "1";
     map1["A"] = "2";
     map1["b"] = "3";
     map1["B"] = "4";
     std::string str("a A b B a A b B");
- sregex rx = icase(a1= map1) [ xp::ref(result) = a1 ]
- >> repeat<3>( (' ' >> icase(a1= map1) [ xp::ref(result) += ',', xp::ref(result) += a1 ]) )
- >> repeat<4>( (' ' >> (a1= map1) [ xp::ref(result) += ',', xp::ref(result) += a1 ]) );
+ sregex rx = skip(_s)(
+ icase(a1= map1) [ result = a1 ]
+ >> repeat<3>( (icase(a1= map1) [ result += ',' + a1 ]) )
+ >> repeat<4>( ((a1= map1) [ result += ',' + a1 ]) )
+ );
     if(!regex_match(str, rx))
     {
         BOOST_ERROR("oops");
     }
     else
     {
- BOOST_CHECK_EQUAL(result, "1,1,3,3,1,2,3,4");
+ BOOST_CHECK_EQUAL(result.get(), "1,1,3,3,1,2,3,4");
     }
 }
 
@@ -231,7 +239,7 @@
 {
     using namespace boost::xpressive;
 
- std::string result;
+ local<std::string> result;
     std::map<std::string,std::string> map1;
     map1["a"] = "1";
     map1["b"] = "2";
@@ -239,14 +247,14 @@
     map2["c"] = "3";
     map2["d"] = "4";
     std::string str("abcde");
- sregex rx = *((a1= map1) | (a1= map2) | 'e') [ xp::ref(result) += (a1 | "9") ];
+ sregex rx = *((a1= map1) | (a1= map2) | 'e') [ result += (a1 | "9") ];
     if(!regex_match(str, rx))
     {
         BOOST_ERROR("oops");
     }
     else
     {
- BOOST_CHECK_EQUAL(result, "12349");
+ BOOST_CHECK_EQUAL(result.get(), "12349");
     }
 }
 
@@ -281,17 +289,17 @@
     }
 
     std::wstring str(L"Chicago \u041c\u043E\u0441\u043A\u0432\u0430");
- City result1, result2;
- wsregex rx = (a1= map1)[ xp::ref(result1) = a1 ] >> +_s
- >> (a1= map1)[ xp::ref(result2) = a1 ];
+ local<City> result1, result2;
+ wsregex rx = (a1= map1)[ result1 = a1 ] >> +_s
+ >> (a1= map1)[ result2 = a1 ];
     if(!regex_match(str, rx))
     {
         BOOST_ERROR("oops");
     }
     else
     {
- BOOST_CHECK_EQUAL(result1.nickname, "The Windy City");
- BOOST_CHECK_EQUAL(result2.nickname, "Moscow");
+ BOOST_CHECK_EQUAL(result1.get().nickname, "The Windy City");
+ BOOST_CHECK_EQUAL(result2.get().nickname, "Moscow");
     }
 }
 #else
@@ -312,8 +320,8 @@
     std::string str("foobar");
     std::map<std::string,int> map1;
     map1["foo"] = 1;
- int xx = 0;
- sregex rx = ~before((a1=map1)[xp::ref(xx)=a1]) >> (s1=*_w)[ xp::ref(result) = s1 ];
+ sregex rx = ~before((a1=map1)[a1]) >>
+ (s1=*_w)[ xp::ref(result) = s1 ];
     if(!regex_match(str, rx))
     {
         BOOST_CHECK_EQUAL(result, "");

Modified: branches/CMake/release/libs/xpressive/test/test_typeof.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_typeof.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_typeof.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_typeof.cpp
 //
-// Copyright 2007 David Jenkins. Distributed under the Boost
+// Copyright 2008 David Jenkins. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 

Modified: branches/CMake/release/libs/xpressive/test/test_typeof2.cpp
==============================================================================
--- branches/CMake/release/libs/xpressive/test/test_typeof2.cpp (original)
+++ branches/CMake/release/libs/xpressive/test/test_typeof2.cpp 2008-06-29 11:33:58 EDT (Sun, 29 Jun 2008)
@@ -1,7 +1,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 // test_typeof2.cpp
 //
-// Copyright 2007 David Jenkins. Distributed under the Boost
+// Copyright 2008 David Jenkins. Distributed under the Boost
 // Software License, Version 1.0. (See accompanying file
 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
@@ -43,13 +43,13 @@
     TYPEOF_TEST((+_w)[ xp::ref(result) += _ ] >> *(' ' >> (+_w)[ xp::ref(result) += ',' + _ ]));
     TYPEOF_TEST((+_w)[ xp::ref(result) += _ ] >> *(' ' >> (+_w)[ xp::ref(result) += ',' + _ ]) >> repeat<4>(_));
     std::list<int> result2;
- TYPEOF_TEST((+_d)[ xp::ref(result2)->*push_back( as<int>(_) ) ]
+ TYPEOF_TEST((+_d)[ xp::ref(result2)->*push_back( as<int>(_) ) ]
>> *(' ' >> (+_d)[ xp::ref(result2)->*push_back( as<int>(_) ) ]));
     std::map<std::string, int> result3;
     TYPEOF_TEST(( (s1= +_w) >> "=>" >> (s2= +_d) )[ xp::ref(result3)[s1] = as<int>(s2) ]);
     placeholder< std::map<std::string, int> > const _map5 = {{}};
     TYPEOF_TEST(( (s1= +_w) >> "=>" >> (s2= +_d) )[ _map5[s1] = as<int>(s2) ]);
-
+
     smatch what;
     placeholder< std::map<std::string, int> > const _map6 = {{}};
     std::map<std::string, int> result6;
@@ -101,11 +101,11 @@
     std::string result;
     std::map<std::string,std::string> map10;
     TYPEOF_TEST((a1=map10)[ xp::ref(result) = a1 ] >> *(' ' >> (a1=map10)[ xp::ref(result) += ',' + a1 ]));
- TYPEOF_TEST((a1=map10)[ xp::ref(result) = a1 ]
+ TYPEOF_TEST((a1=map10)[ xp::ref(result) = a1 ]
>> *((a1=map10)[ xp::ref(result) += ',', xp::ref(result) += a1 ]));
     std::list<int> result12;
     std::map<std::string,int> map12;
- TYPEOF_TEST((a1=map12)[ xp::ref(result12)->*push_back( a1 ) ]
+ TYPEOF_TEST((a1=map12)[ xp::ref(result12)->*push_back( a1 ) ]
>> *(' ' >> (a1=map12)[ xp::ref(result12)->*push_back( a1 ) ]));
 
     placeholder< std::map<std::string, int> > const _map13 = {};
@@ -121,10 +121,10 @@
     std::map<std::string,int> map3a;
     TYPEOF_TEST((a1=map1a)[ xp::ref(result14) += a1 ]
>> (a2=map2a)[ xp::ref(result) += a2 ]
- >> (a3=map3a)[ xp::ref(result) += a3 ]
+ >> (a3=map3a)[ xp::ref(result) += a3 ]
         );
         {
- TYPEOF_TEST(icase(a1= map10) [ xp::ref(result) = a1 ]
+ TYPEOF_TEST(icase(a1= map10) [ xp::ref(result) = a1 ]
>> repeat<3>( (' ' >> icase(a1= map10) [ xp::ref(result) += ',', xp::ref(result) += a1 ]) )
         );
     TYPEOF_TEST(*((a1= map1a) | (a1= map2a) | 'e') [ xp::ref(result) += (a1 | "9") ]);


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