Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77873 - trunk/boost/proto
From: eric_at_[hidden]
Date: 2012-04-09 20:00:27


Author: eric_niebler
Date: 2012-04-09 20:00:26 EDT (Mon, 09 Apr 2012)
New Revision: 77873
URL: http://svn.boost.org/trac/boost/changeset/77873

Log:
use decltype-based result_of if and only if the compiler implements N3276
Text files modified:
   trunk/boost/proto/proto_fwd.hpp | 16 ++++++++++++++++
   1 files changed, 16 insertions(+), 0 deletions(-)

Modified: trunk/boost/proto/proto_fwd.hpp
==============================================================================
--- trunk/boost/proto/proto_fwd.hpp (original)
+++ trunk/boost/proto/proto_fwd.hpp 2012-04-09 20:00:26 EDT (Mon, 09 Apr 2012)
@@ -92,6 +92,22 @@
 # endif
 #endif
 
+#ifndef BOOST_NO_DECLTYPE_N3276
+# // Proto can only use the decltype-based result_of if N3276 has been
+# // implemented by the compiler.
+# // See http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2011/n3276.pdf
+# ifndef BOOST_PROTO_USE_NORMAL_RESULT_OF
+# define BOOST_PROTO_USE_NORMAL_RESULT_OF
+# endif
+# // If we're using the decltype-based result_of, we need to be a bit
+# // stricter about the return types of some functions.
+# ifndef BOOST_PROTO_STRICT_RESULT_OF
+# define BOOST_PROTO_STRICT_RESULT_OF
+# endif
+#endif
+
+// Unless compiler support is there, use tr1_result_of instead of
+// result_of to avoid the problems addressed by N3276.
 #ifdef BOOST_PROTO_USE_NORMAL_RESULT_OF
 # define BOOST_PROTO_RESULT_OF boost::result_of
 #else


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