Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78122 - trunk/boost/proto
From: eric_at_[hidden]
Date: 2012-04-22 02:35:45


Author: eric_niebler
Date: 2012-04-22 02:35:43 EDT (Sun, 22 Apr 2012)
New Revision: 78122
URL: http://svn.boost.org/trac/boost/changeset/78122

Log:
c++11, force parameter to mpl::eval_if_c and mpl::if_c to be bool
Text files modified:
   trunk/boost/proto/matches.hpp | 16 ++++++++++------
   1 files changed, 10 insertions(+), 6 deletions(-)

Modified: trunk/boost/proto/matches.hpp
==============================================================================
--- trunk/boost/proto/matches.hpp (original)
+++ trunk/boost/proto/matches.hpp 2012-04-22 02:35:43 EDT (Sun, 22 Apr 2012)
@@ -351,18 +351,22 @@
         template<typename Expr, typename Tag, typename Args, long Arity, typename If, typename Then, typename Else>
         struct matches_<Expr, proto::basic_expr<Tag, Args, Arity>, proto::if_<If, Then, Else> >
           : mpl::eval_if_c<
- remove_reference<
- typename when<_, If>::template impl<Expr, int, int>::result_type
- >::type::value
+ static_cast<bool>(
+ remove_reference<
+ typename when<_, If>::template impl<Expr, int, int>::result_type
+ >::type::value
+ )
               , matches_<Expr, proto::basic_expr<Tag, Args, Arity>, typename Then::proto_grammar>
               , matches_<Expr, proto::basic_expr<Tag, Args, Arity>, typename Else::proto_grammar>
>::type
         {
             typedef
                 typename mpl::if_c<
- remove_reference<
- typename when<_, If>::template impl<Expr, int, int>::result_type
- >::type::value
+ static_cast<bool>(
+ remove_reference<
+ typename when<_, If>::template impl<Expr, int, int>::result_type
+ >::type::value
+ )
                   , Then
                   , Else
>::type


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