Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80764 - in trunk/boost/proto: . detail
From: eric_at_[hidden]
Date: 2012-09-29 17:09:08


Author: eric_niebler
Date: 2012-09-29 17:09:07 EDT (Sat, 29 Sep 2012)
New Revision: 80764
URL: http://svn.boost.org/trac/boost/changeset/80764

Log:
proto msvc workarounds for phoenix
Text files modified:
   trunk/boost/proto/detail/decltype.hpp | 6 ++++--
   trunk/boost/proto/generate.hpp | 4 ++--
   2 files changed, 6 insertions(+), 4 deletions(-)

Modified: trunk/boost/proto/detail/decltype.hpp
==============================================================================
--- trunk/boost/proto/detail/decltype.hpp (original)
+++ trunk/boost/proto/detail/decltype.hpp 2012-09-29 17:09:07 EDT (Sat, 29 Sep 2012)
@@ -41,8 +41,10 @@
 # pragma warning(disable : 4714) // function 'xxx' marked as __forceinline not inlined
 #endif
 
-#ifndef BOOST_NO_DECLTYPE
-# define BOOST_PROTO_DECLTYPE_(EXPR, TYPE) typedef decltype(EXPR) TYPE;
+// We're STILL using Boost.Typeof on MSVC even for msvc-11.0 because of this bug:
+// https://connect.microsoft.com/VisualStudio/feedback/details/765392/decltype-of-a-pointer-to-member-operator-gets-ref-qualification-wrong
+#if !defined(BOOST_NO_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1700))
+# define BOOST_PROTO_DECLTYPE_(EXPR, TYPE) typedef decltype((EXPR)) TYPE;
 #else
 # define BOOST_PROTO_DECLTYPE_NESTED_TYPEDEF_TPL_(NESTED, EXPR) \
     BOOST_TYPEOF_NESTED_TYPEDEF_TPL(BOOST_PP_CAT(nested_and_hidden_, NESTED), EXPR) \

Modified: trunk/boost/proto/generate.hpp
==============================================================================
--- trunk/boost/proto/generate.hpp (original)
+++ trunk/boost/proto/generate.hpp 2012-09-29 17:09:07 EDT (Sat, 29 Sep 2012)
@@ -234,7 +234,7 @@
         Extends<expr<tag::terminal, proto::term<Member Class::*> > > operator ()(expr<tag::terminal, proto::term<Member Class::*> > const &e) const
         {
             Extends<expr<tag::terminal, proto::term<Member Class::*> > > that;
- that.proto_expr_ = e;
+ proto::value(that.proto_expr_) = proto::value(e);
             return that;
         }
 
@@ -243,7 +243,7 @@
         Extends<basic_expr<tag::terminal, proto::term<Member Class::*> > > operator ()(basic_expr<tag::terminal, proto::term<Member Class::*> > const &e) const
         {
             Extends<basic_expr<tag::terminal, proto::term<Member Class::*> > > that;
- that.proto_expr_ = e;
+ proto::value(that.proto_expr_) = proto::value(e);
             return that;
         }
     #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