|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61676 - trunk/boost/proto
From: eric_at_[hidden]
Date: 2010-04-29 11:08:19
Author: eric_niebler
Date: 2010-04-29 11:08:18 EDT (Thu, 29 Apr 2010)
New Revision: 61676
URL: http://svn.boost.org/trac/boost/changeset/61676
Log:
const-correctness fixes when invoking proto domains
Text files modified:
trunk/boost/proto/deep_copy.hpp | 2 +-
trunk/boost/proto/extends.hpp | 6 +++---
trunk/boost/proto/operators.hpp | 14 +++++++-------
3 files changed, 11 insertions(+), 11 deletions(-)
Modified: trunk/boost/proto/deep_copy.hpp
==============================================================================
--- trunk/boost/proto/deep_copy.hpp (original)
+++ trunk/boost/proto/deep_copy.hpp 2010-04-29 11:08:18 EDT (Thu, 29 Apr 2010)
@@ -204,7 +204,7 @@
template<typename Expr2, typename S, typename D>
result_type operator()(Expr2 const &e, S const &, D const &) const
{
- expr_type that = {
+ expr_type const that = {
BOOST_PP_ENUM(N, BOOST_PROTO_DEFINE_DEEP_COPY_FUN, ~)
};
Modified: trunk/boost/proto/extends.hpp
==============================================================================
--- trunk/boost/proto/extends.hpp (original)
+++ trunk/boost/proto/extends.hpp 2010-04-29 11:08:18 EDT (Thu, 29 Apr 2010)
@@ -222,7 +222,7 @@
> \
, 2 \
> that_type; \
- that_type that = { \
+ that_type const that = { \
*this \
, a \
}; \
@@ -269,7 +269,7 @@
> \
, 2 \
> that_type; \
- that_type that = { \
+ that_type const that = { \
*static_cast<proto_derived_expr ThisConst() *>(this) \
, boost::proto::as_child<proto_domain>(a) \
}; \
@@ -333,7 +333,7 @@
> \
, 2 \
> that_type; \
- that_type that = { \
+ that_type const that = { \
*static_cast<proto_derived_expr ThisConst() *>(this) \
, boost::proto::as_child<proto_domain>(a) \
}; \
Modified: trunk/boost/proto/operators.hpp
==============================================================================
--- trunk/boost/proto/operators.hpp (original)
+++ trunk/boost/proto/operators.hpp 2010-04-29 11:08:18 EDT (Thu, 29 Apr 2010)
@@ -120,8 +120,8 @@
static typename proto_domain::template result<proto_domain(expr_type)>::type
make(Left &left, Right &right)
{
- term_type term = {right};
- expr_type that = {left, proto_domain()(term)};
+ term_type const term = {right};
+ expr_type const that = {left, proto_domain()(term)};
return proto_domain()(that);
}
};
@@ -142,8 +142,8 @@
static typename proto_domain::template result<proto_domain(expr_type)>::type
make(Left &left, Right &right)
{
- term_type term = {left};
- expr_type that = {proto_domain()(term), right};
+ term_type const term = {left};
+ expr_type const that = {proto_domain()(term), right};
return proto_domain()(that);
}
};
@@ -166,7 +166,7 @@
static typename proto_domain::template result<proto_domain(expr_type)>::type
make(Left &left, Right &right)
{
- expr_type that = {left, right};
+ expr_type const that = {left, right};
return proto_domain()(that);
}
};
@@ -252,7 +252,7 @@
operator OP(Arg &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
typedef proto::expr<TAG, list1<Arg &>, 1> that_type; \
- that_type that = {arg}; \
+ that_type const that = {arg}; \
return typename Arg::proto_domain()(that); \
} \
template<typename Arg> \
@@ -264,7 +264,7 @@
operator OP(Arg const &arg BOOST_PROTO_UNARY_OP_IS_POSTFIX_ ## POST) \
{ \
typedef proto::expr<TAG, list1<Arg const &>, 1> that_type; \
- that_type that = {arg}; \
+ that_type const that = {arg}; \
return typename Arg::proto_domain()(that); \
} \
/**/
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