Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62927 - trunk/boost/proto/detail
From: eric_at_[hidden]
Date: 2010-06-14 01:22:37


Author: eric_niebler
Date: 2010-06-14 01:22:36 EDT (Mon, 14 Jun 2010)
New Revision: 62927
URL: http://svn.boost.org/trac/boost/changeset/62927

Log:
fix return type calculation of already_expr and already_child
Text files modified:
   trunk/boost/proto/detail/as_expr.hpp | 10 +++++-----
   1 files changed, 5 insertions(+), 5 deletions(-)

Modified: trunk/boost/proto/detail/as_expr.hpp
==============================================================================
--- trunk/boost/proto/detail/as_expr.hpp (original)
+++ trunk/boost/proto/detail/as_expr.hpp 2010-06-14 01:22:36 EDT (Mon, 14 Jun 2010)
@@ -11,6 +11,7 @@
 #ifndef BOOST_PROTO_DETAIL_AS_EXPR_HPP_EAN_06_09_2010
 #define BOOST_PROTO_DETAIL_AS_EXPR_HPP_EAN_06_09_2010
 
+#include <boost/type_traits/remove_const.hpp>
 #include <boost/proto/proto_fwd.hpp>
 #include <boost/proto/args.hpp>
 
@@ -105,7 +106,7 @@
     template<typename Expr, typename Generator>
     struct already_expr<Expr, Generator, true>
     {
- typedef typename Expr::proto_derived_expr result_type; // remove cv
+ typedef typename remove_const<Expr>::type result_type; // remove cv
 
         result_type operator()(Expr &e) const
         {
@@ -117,7 +118,7 @@
     template<typename Expr>
     struct already_expr<Expr, default_generator, false>
     {
- typedef typename Expr::proto_derived_expr result_type; // remove cv
+ typedef typename remove_const<Expr>::type result_type; // remove cv
 
         result_type operator()(Expr &e) const
         {
@@ -129,7 +130,7 @@
     template<typename Expr>
     struct already_expr<Expr, default_generator, true>
     {
- typedef typename Expr::proto_derived_expr result_type; // remove cv
+ typedef typename remove_const<Expr>::type result_type; // remove cv
 
         result_type operator()(Expr &e) const
         {
@@ -195,8 +196,7 @@
     template<typename Expr, typename Generator, bool SameGenerator>
     struct already_child
     {
- typedef typename Expr::proto_derived_expr uncv_expr_type;
- typedef typename Generator::template result<Generator(uncv_expr_type)>::type result_type;
+ typedef typename Generator::template result<Generator(Expr)>::type result_type;
 
         result_type operator()(Expr &e) const
         {


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