Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-04-02 13:35:44


Author: steven_watanabe
Date: 2008-04-02 13:35:43 EDT (Wed, 02 Apr 2008)
New Revision: 44002
URL: http://svn.boost.org/trac/boost/changeset/44002

Log:
minor documentation tweaks
Text files modified:
   sandbox/switch/libs/switch/doc/switch.qbk | 11 ++++++-----
   1 files changed, 6 insertions(+), 5 deletions(-)

Modified: sandbox/switch/libs/switch/doc/switch.qbk
==============================================================================
--- sandbox/switch/libs/switch/doc/switch.qbk (original)
+++ sandbox/switch/libs/switch/doc/switch.qbk 2008-04-02 13:35:43 EDT (Wed, 02 Apr 2008)
@@ -86,10 +86,11 @@
 ]
 
 Generates a switch statement. If the nested ::value of one
-of the elements of `Cases` is equal to `n`, then this function
-will call `f` with a default constructed parameter of that type.
-Otherwise it will either pass `n` to `default_` or throw an exception
-depending on whether `default_` was specified.
+of the elements of `Case::labels` is equal to `n`, then this function
+will return the result of calling case.apply<Result> with a default constructed
+parameter of that type. Otherwise it will pass `n` to `default_`.
+If no default was specified, a default constructed instance of Result
+wee be returned.
 
 Thus, `switch<R>(n, case, default_)` is equivalent to
 
@@ -131,7 +132,7 @@
 
 prints the nth element of a fusion sequence.
 
-Here is an example of using Switch to implement the apply_visitor
+Here is a more realistic example of using Switch to implement the apply_visitor
 function from Boost.Variant.
 
     template<class Variant, class Visitor>


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