|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58392 - in trunk: boost/proto boost/proto/transform libs/proto/doc/reference libs/proto/doc/reference/transform
From: eric_at_[hidden]
Date: 2009-12-14 23:59:31
Author: eric_niebler
Date: 2009-12-14 23:59:30 EST (Mon, 14 Dec 2009)
New Revision: 58392
URL: http://svn.boost.org/trac/boost/changeset/58392
Log:
fix docs for fold transform, misc doc and code clean-up
Text files modified:
trunk/boost/proto/matches.hpp | 12 ++++++------
trunk/boost/proto/transform/fold.hpp | 10 +++++-----
trunk/boost/proto/transform/when.hpp | 4 ++--
trunk/libs/proto/doc/reference/matches.xml | 14 +++++++-------
trunk/libs/proto/doc/reference/transform/fold.xml | 4 ++--
trunk/libs/proto/doc/reference/transform/when.xml | 4 ++--
6 files changed, 24 insertions(+), 24 deletions(-)
Modified: trunk/boost/proto/matches.hpp
==============================================================================
--- trunk/boost/proto/matches.hpp (original)
+++ trunk/boost/proto/matches.hpp 2009-12-14 23:59:30 EST (Mon, 14 Dec 2009)
@@ -725,8 +725,8 @@
/// matches any \c Bx for \c x in <tt>[0,n)</tt>.
///
/// When applying <tt>or_\<B0,B1,...Bn\></tt> as a transform with an
- /// expression \c e of type \c E, state \c s and data \c v, it is
- /// equivalent to <tt>Bx()(e, s, v)</tt>, where \c x is the lowest
+ /// expression \c e of type \c E, state \c s and data \c d, it is
+ /// equivalent to <tt>Bx()(e, s, d)</tt>, where \c x is the lowest
/// number such that <tt>matches\<E,Bx\>::::value</tt> is \c true.
template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
struct or_ : transform<or_<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, G)> >
@@ -761,8 +761,8 @@
/// matches all \c Bx for \c x in <tt>[0,n)</tt>.
///
/// When applying <tt>and_\<B0,B1,...Bn\></tt> as a transform with an
- /// expression \c e, state \c s and data \c v, it is
- /// equivalent to <tt>Bn()(e, s, v)</tt>.
+ /// expression \c e, state \c s and data \c d, it is
+ /// equivalent to <tt>Bn()(e, s, d)</tt>.
template<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, typename G)>
struct and_ : transform<and_<BOOST_PP_ENUM_PARAMS(BOOST_PROTO_MAX_LOGICAL_ARITY, G)> >
{
@@ -795,8 +795,8 @@
/// matches <tt>C::case_\<E::proto_tag\></tt>.
///
/// When applying <tt>switch_\<C\></tt> as a transform with an
- /// expression \c e of type \c E, state \c s and data \c v, it is
- /// equivalent to <tt>C::case_\<E::proto_tag\>()(e, s, v)</tt>.
+ /// expression \c e of type \c E, state \c s and data \c d, it is
+ /// equivalent to <tt>C::case_\<E::proto_tag\>()(e, s, d)</tt>.
template<typename Cases>
struct switch_ : transform<switch_<Cases> >
{
Modified: trunk/boost/proto/transform/fold.hpp
==============================================================================
--- trunk/boost/proto/transform/fold.hpp (original)
+++ trunk/boost/proto/transform/fold.hpp 2009-12-14 23:59:30 EST (Mon, 14 Dec 2009)
@@ -29,8 +29,8 @@
template<typename Transform, typename Data>
struct as_callable
{
- as_callable(Data v)
- : v_(v)
+ as_callable(Data d)
+ : d_(d)
{}
template<typename Sig>
@@ -48,11 +48,11 @@
typename when<_, Transform>::template impl<Expr &, State const &, Data>::result_type
operator ()(State const &s, Expr &e) const
{
- return typename when<_, Transform>::template impl<Expr &, State const &, Data>()(e, s, this->v_);
+ return typename when<_, Transform>::template impl<Expr &, State const &, Data>()(e, s, this->d_);
}
private:
- Data v_;
+ Data d_;
};
template<
@@ -168,7 +168,7 @@
>::type
state0;
- /// \brief <tt>fun(v)(e,s) == when\<_,Fun\>()(e,s,v)</tt>
+ /// \brief <tt>fun(d)(e,s) == when\<_,Fun\>()(e,s,d)</tt>
typedef
detail::as_callable<Fun, Data>
fun;
Modified: trunk/boost/proto/transform/when.hpp
==============================================================================
--- trunk/boost/proto/transform/when.hpp (original)
+++ trunk/boost/proto/transform/when.hpp 2009-12-14 23:59:30 EST (Mon, 14 Dec 2009)
@@ -49,8 +49,8 @@
/// <tt>boost::result_of\<when\<G,T\>(E,S,V)\>::::type</tt> is the same as
/// <tt>boost::result_of\<T(E,S,V)\>::::type</tt>.
///
- /// <tt>when\<G,T\>()(e,s,v)</tt> is the same as
- /// <tt>T()(e,s,v)</tt>.
+ /// <tt>when\<G,T\>()(e,s,d)</tt> is the same as
+ /// <tt>T()(e,s,d)</tt>.
template<typename Grammar, typename PrimitiveTransform /*= Grammar*/>
struct when
: PrimitiveTransform
Modified: trunk/libs/proto/doc/reference/matches.xml
==============================================================================
--- trunk/libs/proto/doc/reference/matches.xml (original)
+++ trunk/libs/proto/doc/reference/matches.xml 2009-12-14 23:59:30 EST (Mon, 14 Dec 2009)
@@ -287,8 +287,8 @@
When applying
<computeroutput>proto::or_<G<subscript>0</subscript>,G<subscript>1</subscript>,...G<subscript>n</subscript>></computeroutput>
as a transform with an expression <computeroutput>e</computeroutput> of type <computeroutput>E</computeroutput>,
- state <computeroutput>s</computeroutput> and data <computeroutput>v</computeroutput>, it is equivalent to
- <computeroutput>G<subscript>x</subscript>()(e, s, v)</computeroutput>, where
+ state <computeroutput>s</computeroutput> and data <computeroutput>d</computeroutput>, it is equivalent to
+ <computeroutput>G<subscript>x</subscript>()(e, s, d)</computeroutput>, where
<computeroutput>x</computeroutput> is the lowest number such that
<computeroutput><classname>proto::matches</classname><E, G<subscript>x</subscript>>::value</computeroutput>
is <computeroutput>true</computeroutput>.
@@ -370,8 +370,8 @@
When applying
<computeroutput>proto::and_<G<subscript>0</subscript>,G<subscript>1</subscript>,...G<subscript>n</subscript>></computeroutput>
as a transform with an expression <computeroutput>e</computeroutput>, state
- <computeroutput>s</computeroutput> and data <computeroutput>v</computeroutput>, it is equivalent
- to <computeroutput>G<subscript>n</subscript>()(e, s, v)</computeroutput>.
+ <computeroutput>s</computeroutput> and data <computeroutput>d</computeroutput>, it is equivalent
+ to <computeroutput>G<subscript>n</subscript>()(e, s, d)</computeroutput>.
</para>
<para>
The maximun number of template arguments <computeroutput>proto::and_<></computeroutput> accepts
@@ -444,8 +444,8 @@
When applying <computeroutput>proto::switch_<C></computeroutput> as a transform
with an expression <computeroutput>e</computeroutput> of type
<computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> and
- data <computeroutput>v</computeroutput>, it is equivalent to
- <computeroutput>C::case_<E::proto_tag>()(e, s, v)</computeroutput>.
+ data <computeroutput>d</computeroutput>, it is equivalent to
+ <computeroutput>C::case_<E::proto_tag>()(e, s, d)</computeroutput>.
</para>
</description>
<struct name="impl">
@@ -517,7 +517,7 @@
</para>
<para>For example:</para>
<para>
- <programlisting>// Match any function call expression, irregardless
+ <programlisting>// Match any function call expression, regardless
// of the number of function arguments:
struct Function :
<classname>proto::function</classname>< proto::vararg<proto::_> >
Modified: trunk/libs/proto/doc/reference/transform/fold.xml
==============================================================================
--- trunk/libs/proto/doc/reference/transform/fold.xml (original)
+++ trunk/libs/proto/doc/reference/transform/fold.xml 2009-12-14 23:59:30 EST (Mon, 14 Dec 2009)
@@ -52,7 +52,7 @@
<type>typename boost::result_of<Y(Expr, State, Data)>::type</type>
</typedef>
<typedef name="fun">
- <purpose><computeroutput>fun(v)(e,s) == when<_,Fun>()(e,s,v)</computeroutput></purpose>
+ <purpose><computeroutput>fun(d)(s,e) == when<_,Fun>()(e,s,d)</computeroutput></purpose>
<type><emphasis>unspecified</emphasis></type>
</typedef>
<typedef name="result_type">
@@ -86,7 +86,7 @@
let <computeroutput>state0</computeroutput> be
<computeroutput><classname>when</classname><<classname>_</classname>, State0>()(expr, state, data)</computeroutput>,
and let <computeroutput>fun(data)</computeroutput> be an object such that
- <computeroutput>fun(data)(expr, state)</computeroutput> is equivalent to
+ <computeroutput>fun(data)(state, expr)</computeroutput> is equivalent to
<computeroutput><classname>when</classname><<classname>_</classname>, Fun>()(expr, state, data)</computeroutput>. Then,
this function returns <computeroutput>fusion::fold(seq, state0, fun(data))</computeroutput>.
</para>
Modified: trunk/libs/proto/doc/reference/transform/when.xml
==============================================================================
--- trunk/libs/proto/doc/reference/transform/when.xml (original)
+++ trunk/libs/proto/doc/reference/transform/when.xml 2009-12-14 23:59:30 EST (Mon, 14 Dec 2009)
@@ -48,8 +48,8 @@
</listitem>
<listitem>
<para>
- <computeroutput>proto::when<G,T>()(e,s,v)</computeroutput> is the same as
- <computeroutput>T()(e,s,v)</computeroutput>.
+ <computeroutput>proto::when<G,T>()(e,s,d)</computeroutput> is the same as
+ <computeroutput>T()(e,s,d)</computeroutput>.
</para>
</listitem>
</itemizedlist>
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