Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65864 - trunk/boost/proto
From: eric_at_[hidden]
Date: 2010-10-09 14:31:05


Author: eric_niebler
Date: 2010-10-09 14:30:55 EDT (Sat, 09 Oct 2010)
New Revision: 65864
URL: http://svn.boost.org/trac/boost/changeset/65864

Log:
add const-qualified overloads of proto::eval
Text files modified:
   trunk/boost/proto/eval.hpp | 36 ++++++++++++++++++++++++++++++++++++
   1 files changed, 36 insertions(+), 0 deletions(-)

Modified: trunk/boost/proto/eval.hpp
==============================================================================
--- trunk/boost/proto/eval.hpp (original)
+++ trunk/boost/proto/eval.hpp 2010-10-09 14:30:55 EDT (Sat, 09 Oct 2010)
@@ -75,6 +75,24 @@
             {
                 return typename Context::template eval<Expr>()(e, ctx);
             }
+
+ /// \overload
+ ///
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ operator ()(Expr const &e, Context &ctx) const
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
+
+ /// \overload
+ ///
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ operator ()(Expr const &e, Context const &ctx) const
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
         };
     }
 
@@ -99,6 +117,24 @@
     {
         return typename Context::template eval<Expr>()(e, ctx);
     }
+
+ /// \overload
+ ///
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ eval(Expr const &e, Context &ctx)
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
+
+ /// \overload
+ ///
+ template<typename Expr, typename Context>
+ typename proto::result_of::eval<Expr const, Context>::type
+ eval(Expr const &e, Context const &ctx)
+ {
+ return typename Context::template eval<Expr const>()(e, ctx);
+ }
 }}
 
 #endif


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