|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r76027 - trunk/libs/proto/doc/reference
From: eric_at_[hidden]
Date: 2011-12-17 14:24:30
Author: eric_niebler
Date: 2011-12-17 14:24:29 EST (Sat, 17 Dec 2011)
New Revision: 76027
URL: http://svn.boost.org/trac/boost/changeset/76027
Log:
correct reference section for new switch_ behavior
Text files modified:
trunk/libs/proto/doc/reference/matches.xml | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
Modified: trunk/libs/proto/doc/reference/matches.xml
==============================================================================
--- trunk/libs/proto/doc/reference/matches.xml (original)
+++ trunk/libs/proto/doc/reference/matches.xml 2011-12-17 14:24:29 EST (Sat, 17 Dec 2011)
@@ -427,24 +427,24 @@
<struct name="switch_">
<template>
<template-type-parameter name="Cases"/>
- <template-type-parameter name="Transform"/>
+ <template-type-parameter name="Transform"/>
</template>
<inherit><classname>proto::transform</classname><switch_<Cases, Transform> ></inherit>
<purpose>For matching one of a set of alternate grammars, which are looked up based on
the result type of the transform passed in second template parameter.
- If no transform is passed, the default one is <computeroutput>proto::tag_of()</computeroutput>
+ If no transform is passed, the default one is <computeroutput><classname>proto::tag_of</classname><<classname>proto::_</classname>>()</computeroutput>
so the default matching is based on the expression's tag type. When used as a transform,
<computeroutput>proto::switch_<></computeroutput> applies the transform associated
with the sub-grammar that matches the expression.</purpose>
<description>
- <para>
- An expression type <computeroutput>E</computeroutput> matches
+ <para>
+ An expression type <computeroutput>E</computeroutput> matches
<computeroutput>proto::switch_<C,T></computeroutput> if
- <computeroutput>E</computeroutput> matches
+ <computeroutput>E</computeroutput> matches
<computeroutput>C::case_<boost::result_of<T(E)>::type></computeroutput>.
</para>
- <para>
- When applying <computeroutput>proto::switch_<C,T></computeroutput> as a
+ <para>
+ When applying <computeroutput>proto::switch_<C,T></computeroutput> as a
transform with an expression <computeroutput>e</computeroutput> of type
<computeroutput>E</computeroutput>, state <computeroutput>s</computeroutput> of
type <computeroutput>S</computeroutput> and data <computeroutput>d</computeroutput>
@@ -697,9 +697,10 @@
<para>
An expression <computeroutput>E</computeroutput> matches
<computeroutput>
- <classname>proto::switch_</classname><C>
+ <classname>proto::switch_</classname><C, T>
</computeroutput> if
- <computeroutput>E</computeroutput> matches <computeroutput>C::case_<E::proto_tag></computeroutput>.
+ <computeroutput>E</computeroutput> matches <computeroutput>C::case_<boost::result_of<T(E)>::type></computeroutput>.
+ Note: <computeroutput>T</computeroutput> defaults to <computeroutput><classname>proto::tag_of</classname><<classname>proto::_</classname>>()</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