Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-05-27 23:55:31


Author: eric_niebler
Date: 2008-05-27 23:55:31 EDT (Tue, 27 May 2008)
New Revision: 45854
URL: http://svn.boost.org/trac/boost/changeset/45854

Log:
fix switch_ statement
Text files modified:
   branches/proto/v4/boost/phoenix/scope/let.hpp | 2 +-
   branches/proto/v4/boost/phoenix/statement/switch.hpp | 12 ++++++------
   2 files changed, 7 insertions(+), 7 deletions(-)

Modified: branches/proto/v4/boost/phoenix/scope/let.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/scope/let.hpp (original)
+++ branches/proto/v4/boost/phoenix/scope/let.hpp 2008-05-27 23:55:31 EDT (Tue, 27 May 2008)
@@ -57,7 +57,7 @@
             template<typename State, typename Data, typename SubGrammar>
             struct initialize_locals
             {
- explicit initialize_locals(State state, Data data)
+ initialize_locals(State state, Data data)
                   : state(state)
                   , data(data)
                 {}

Modified: branches/proto/v4/boost/phoenix/statement/switch.hpp
==============================================================================
--- branches/proto/v4/boost/phoenix/statement/switch.hpp (original)
+++ branches/proto/v4/boost/phoenix/statement/switch.hpp 2008-05-27 23:55:31 EDT (Tue, 27 May 2008)
@@ -179,17 +179,17 @@
         {};
 
         ////////////////////////////////////////////////////////////////////////////////////////////
- // Don't try to evaluate the return type of case_<1>(expr)()
+ // case_<N>(x) expressions are not valid lambdas outside of a switch_
         template<int Label, typename SubGrammar>
- struct is_nullary_extension<tag::case_<Label>, SubGrammar>
- : proto::otherwise<mpl::false_()>
+ struct extension<tag::case_<Label>, SubGrammar>
+ : proto::not_<proto::_>
         {};
 
         ////////////////////////////////////////////////////////////////////////////////////////////
- // Don't try to evaluate the return type of default(expr)()
+ // default_(x) expressions are not valid lambdas outside of a switch_
         template<typename SubGrammar>
- struct is_nullary_extension<tag::default_, SubGrammar>
- : proto::otherwise<mpl::false_()>
+ struct extension<tag::default_, SubGrammar>
+ : proto::not_<proto::_>
         {};
 
     }}


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