Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-01-28 17:55:31


Author: eric_niebler
Date: 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
New Revision: 43002
URL: http://svn.boost.org/trac/boost/changeset/43002

Log:
doc more concepts, misc clean-up
Added:
   trunk/libs/xpressive/proto/doc/concepts/PolymorphicFunctionObject.xml (contents, props changed)
   trunk/libs/xpressive/proto/doc/concepts/Transform.xml (contents, props changed)
Text files modified:
   trunk/libs/xpressive/proto/doc/Jamfile.v2 | 86 +++++++++++++++++++--------------------
   trunk/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml | 3 +
   trunk/libs/xpressive/proto/doc/proto.xml | 7 ++
   trunk/libs/xpressive/proto/doc/protodoc.xml | 56 +++++++++++++-------------
   trunk/libs/xpressive/proto/doc/rationale.qbk | 44 ++++++++++++++++++++
   trunk/libs/xpressive/proto/doc/transforms.qbk | 4
   6 files changed, 124 insertions(+), 76 deletions(-)

Modified: trunk/libs/xpressive/proto/doc/Jamfile.v2
==============================================================================
--- trunk/libs/xpressive/proto/doc/Jamfile.v2 (original)
+++ trunk/libs/xpressive/proto/doc/Jamfile.v2 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -8,46 +8,46 @@
 
 #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/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
+# 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\\\" \\
@@ -56,13 +56,11 @@
 # -p 1 \""
 # # This ensures that Wave is actually built before we try to execute it
 # <dependency>../../../../tools/wave/build release
-# ;
+ ;
 
 xml proto
     :
         proto.qbk
- :
- <dependency>../test/examples.cpp
     ;
 
 boostbook standalone
@@ -106,5 +104,5 @@
         # better use SVG's instead:
         # <xsl:param>admon.graphics.extension=".svg"
 
-# <dependency>protodoc
+ <dependency>protodoc
     ;

Added: trunk/libs/xpressive/proto/doc/concepts/PolymorphicFunctionObject.xml
==============================================================================
--- (empty file)
+++ trunk/libs/xpressive/proto/doc/concepts/PolymorphicFunctionObject.xml 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -0,0 +1,66 @@
+<?xml version="1.0" ?>
+<concept name="PolymorphicFunctionObject" category="utility">
+ <!--
+ 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)
+ -->
+ <param name="Fn" role="polymorphic-function-object-type" />
+
+ <models-sentence>
+ The type <arg num="1" /> must be a model of <self/>.
+ </models-sentence>
+
+ <description>
+ <para>
+ A type that can be called and that follows the TR1 ResultOf
+ protocol for return type calculation.
+ </para>
+ </description>
+
+ <notation variables="fn">
+ <sample-value>
+ <type name="Fn" />
+ </sample-value>
+ </notation>
+
+ <notation variables="a0,...an">
+ <sample-value>
+ <type name="A0,...An" />
+ </sample-value>
+ </notation>
+
+ <associated-type name="result_type">
+ <get-member-type name="type">
+ <apply-template name="result_of">
+ <apply-function name="Fn">
+ <type name="A0,...An" />
+ </apply-function>
+ </apply-template>
+ </get-member-type>
+ <description>
+ <simpara>The result of calling the Polymorphic Function Object.</simpara>
+ </description>
+ </associated-type>
+
+ <valid-expression name="Function Call">
+ <apply-function name="fn">
+ <sample-value>
+ <type name="A0,...An" />
+ </sample-value>
+ </apply-function>
+ <return-type>
+ <require-same-type testable="yes">
+ <type name="result_type"/>
+ </require-same-type>
+ </return-type>
+ <semantics>Calls the function object.</semantics>
+ </valid-expression>
+
+ <example-model>
+ <type name="std::plus&lt;int&gt;" />
+ </example-model>
+
+</concept>

Modified: trunk/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml
==============================================================================
--- trunk/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml (original)
+++ trunk/libs/xpressive/proto/doc/concepts/PrimitiveTransform.xml 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -8,6 +8,9 @@
   file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
   -->
   <param name="Fn" role="primitive-transform-type" />
+ <param name="Expr" role="expression-type" />
+ <param name="State" role="state-type" />
+ <param name="Visitor" role="visitor-type" />
 
   <models-sentence>
     The type <arg num="1" /> must be a model of <self/>.

Added: trunk/libs/xpressive/proto/doc/concepts/Transform.xml
==============================================================================
--- (empty file)
+++ trunk/libs/xpressive/proto/doc/concepts/Transform.xml 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -0,0 +1,79 @@
+<?xml version="1.0" ?>
+<concept name="Transform" category="utility">
+ <!--
+ 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)
+ -->
+ <param name="Tn" role="transform-type" />
+ <param name="Expr" role="expression-type" />
+ <param name="State" role="state-type" />
+ <param name="Visitor" role="visitor-type" />
+
+ <models-sentence>
+ The type <arg num="1" /> must be a model of <self/>.
+ </models-sentence>
+
+ <description>
+ <para>
+ A Transform is a PrimitiveTransform, a CallableTransform
+ or an ObjectTransform.
+ </para>
+ </description>
+
+ <notation variables="expr">
+ <sample-value>
+ <type name="Expr" />
+ </sample-value>
+ </notation>
+
+ <notation variables="state">
+ <sample-value>
+ <type name="State" />
+ </sample-value>
+ </notation>
+
+ <notation variables="visitor">
+ <sample-value>
+ <type name="Visitor" />
+ </sample-value>
+ </notation>
+
+ <associated-type name="result_type">
+ <get-member-type name="type">
+ <apply-template name="boost::result_of">
+ <type name="when&lt; _, Tn &gt;(Expr, State, Visitor)"/>
+ </apply-template>
+ </get-member-type>
+ <description>
+ <simpara>The result of applying the Transform.</simpara>
+ </description>
+ </associated-type>
+
+ <valid-expression name="Apply Transform">
+ <apply-function name="when&lt; _, Tn &gt;()">
+ <sample-value>
+ <type name="Expr" />
+ </sample-value>
+ <sample-value>
+ <type name="State" />
+ </sample-value>
+ <sample-value>
+ <type name="Visitor" />
+ </sample-value>
+ </apply-function>
+ <return-type>
+ <require-same-type testable="yes">
+ <type name="result_type"/>
+ </require-same-type>
+ </return-type>
+ <semantics>Applies the transform.</semantics>
+ </valid-expression>
+
+ <example-model>
+ <type name="boost::proto::transform::arg(boost::proto::transform::left)" />
+ </example-model>
+
+</concept>

Modified: trunk/libs/xpressive/proto/doc/proto.xml
==============================================================================
--- trunk/libs/xpressive/proto/doc/proto.xml (original)
+++ trunk/libs/xpressive/proto/doc/proto.xml 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -1,6 +1,9 @@
 <?xml version="1.0" standalone="yes"?>
 <library-reference id="reference" xmlns:xi="http://www.w3.org/2001/XInclude">
     <title>Reference</title>
- <xi:include href="concepts/PrimitiveTransform.xml"/>
- <xi:include href="protodoc.xml" xpointer="xpointer(//header)"/>
+ <xi:include href="concepts/CallableTransform.xml"/>
+ <xi:include href="concepts/PrimitiveTransform.xml"/>
+ <xi:include href="concepts/Transform.xml"/>
+ <xi:include href="concepts/PolymorphicFunctionObject.xml"/>
+ <xi:include href="protodoc.xml" xpointer="xpointer(//header)"/>
 </library-reference>

Modified: trunk/libs/xpressive/proto/doc/protodoc.xml
==============================================================================
--- trunk/libs/xpressive/proto/doc/protodoc.xml (original)
+++ trunk/libs/xpressive/proto/doc/protodoc.xml 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -288,19 +288,19 @@
       <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="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>default_domain</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><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>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><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>proto::expr&lt; <classname>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>
+</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>proto::expr&lt; <classname>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><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>proto::expr&lt; <classname>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><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>proto::expr&lt; <classname>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>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><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"/>
@@ -340,16 +340,16 @@
       <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="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>default_domain</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><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>
+ </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>proto::expr&lt; <classname>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>
+</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>proto::expr&lt; <classname>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>
+</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>proto::expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; ref_&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>
@@ -378,14 +378,14 @@
       <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="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>default_domain</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><t
ypedef 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>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><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>proto::expr&lt; <classname>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>
+</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>proto::expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; ref_&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>
@@ -415,14 +415,14 @@
       <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="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>default_domain</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></type
def><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>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><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>proto::expr&lt; <classname>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>
+</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>proto::expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; ref_&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>
@@ -453,14 +453,14 @@
       <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="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>default_domain</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><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>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><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>proto::expr&lt; <classname>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>
+</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>proto::expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; ref_&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>
@@ -492,14 +492,14 @@
       <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="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>default_domain</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><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>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><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>proto::expr&lt; <classname>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>
+</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>proto::expr&lt; <classname>tag::function</classname>, <classname>args1</classname>&lt; ref_&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>
@@ -2155,7 +2155,7 @@
       <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></struct><struct name="reverse_fold"><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 <classname>result</classname>&lt; void(Expr, State, Visitor) &gt;::type</type></typedef><typedef name="type"><type><emphasis>unspecified</emphasis></type></typedef></struct-specialization></struct><struct name="reverse_fold"><template>
       <template-type-parameter name="Sequence"/>
       <template-type-parameter name="State"/>
       <template-type-parameter name="Fun"/>

Modified: trunk/libs/xpressive/proto/doc/rationale.qbk
==============================================================================
--- trunk/libs/xpressive/proto/doc/rationale.qbk (original)
+++ trunk/libs/xpressive/proto/doc/rationale.qbk 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -24,4 +24,48 @@
 
 [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
+
+The reason it is done this way is for mostly compile-time performance. Full
+compliance with the TR1 ResultOf protocol incurs a not insigninficant 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 remaiming 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]
+
 [endsect]

Modified: trunk/libs/xpressive/proto/doc/transforms.qbk
==============================================================================
--- trunk/libs/xpressive/proto/doc/transforms.qbk (original)
+++ trunk/libs/xpressive/proto/doc/transforms.qbk 2008-01-28 17:55:30 EST (Mon, 28 Jan 2008)
@@ -40,14 +40,14 @@
 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 as returns `terminal<long>::type`. That is immaterial;
+`_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 which takes three
+A grammar decorated with transforms is a function object that takes three
 parameters:
 
 * `expr` -- the Proto expression to transform


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