Boost logo

Boost-Commit :

From: eric_at_[hidden]
Date: 2008-05-27 20:34:58


Author: eric_niebler
Date: 2008-05-27 20:34:58 EDT (Tue, 27 May 2008)
New Revision: 45845
URL: http://svn.boost.org/trac/boost/changeset/45845

Log:
work around strange gcc aggregate initialization bug
Text files modified:
   branches/proto/v4/boost/proto/make_expr.hpp | 11 ++++++++---
   1 files changed, 8 insertions(+), 3 deletions(-)

Modified: branches/proto/v4/boost/proto/make_expr.hpp
==============================================================================
--- branches/proto/v4/boost/proto/make_expr.hpp (original)
+++ branches/proto/v4/boost/proto/make_expr.hpp 2008-05-27 20:34:58 EDT (Tue, 27 May 2008)
@@ -1036,16 +1036,21 @@
             template<typename Args>
             operator proto::expr<tag::terminal, Args, 0>() const
             {
- proto::expr<tag::terminal, Args, 0> that = {a0};
+ proto::expr<tag::terminal, Args, 0> that = {this->a0};
                 return that;
             };
 
             template<typename Tag, typename Args, long Arity>
             operator proto::expr<Tag, Args, Arity>() const
             {
- #define M0(Z, N, DATA) detail::implicit_arg_1(this->BOOST_PP_CAT(a, N))
- proto::expr<Tag, Args, Arity> that = {BOOST_PP_ENUM(N, M0, ~)};
+ BOOST_MPL_ASSERT_RELATION(Arity, ==, N);
+ #define M0(Z, N, DATA) \
+ typename Args::BOOST_PP_CAT(child_ref, N)::const_reference BOOST_PP_CAT(b, N) \
+ = detail::implicit_arg_1(this->BOOST_PP_CAT(a, N)); \
+ /**/
+ BOOST_PP_REPEAT(N, M0, ~)
                 #undef M0
+ proto::expr<Tag, Args, Arity> that = {BOOST_PP_ENUM_PARAMS(N, b)};
                 return 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