|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r77488 - in trunk/boost: . local_function/aux_/macro/code_
From: lorcaminiti_at_[hidden]
Date: 2012-03-22 17:39:49
Author: lcaminiti
Date: 2012-03-22 17:39:49 EDT (Thu, 22 Mar 2012)
New Revision: 77488
URL: http://svn.boost.org/trac/boost/changeset/77488
Log:
Fixed a bug in deducing this type on MSVC when using lambda implementation for SCOPE_EXIT_ALL (I was missing a typename).
Text files modified:
trunk/boost/local_function/aux_/macro/code_/bind.hpp | 2 +-
trunk/boost/scope_exit.hpp | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
Modified: trunk/boost/local_function/aux_/macro/code_/bind.hpp
==============================================================================
--- trunk/boost/local_function/aux_/macro/code_/bind.hpp (original)
+++ trunk/boost/local_function/aux_/macro/code_/bind.hpp 2012-03-22 17:39:49 EDT (Thu, 22 Mar 2012)
@@ -126,7 +126,7 @@
#define BOOST_LOCAL_FUNCTION_AUX_CODE_BIND_THIS_TYPEDEF_DEDUCED_( \
id, typename01, all_bind_this_types) \
BOOST_SCOPE_EXIT_DETAIL_TYPEDEF_TYPEOF_THIS(id, \
- BOOST_PP_EXPR_IIF(typename01, typename), \
+ BOOST_PP_EXPR_IIF(typename01, typename), /* otherwise EMPTY() */ \
BOOST_LOCAL_FUNCTION_AUX_CODE_BIND_THIS_CAPTURE_TYPE_(id))
#define BOOST_LOCAL_FUNCTION_AUX_CODE_BIND_THIS_TYPEDEF_TYPED_( \
Modified: trunk/boost/scope_exit.hpp
==============================================================================
--- trunk/boost/scope_exit.hpp (original)
+++ trunk/boost/scope_exit.hpp 2012-03-22 17:39:49 EDT (Thu, 22 Mar 2012)
@@ -501,13 +501,14 @@
BOOST_PP_CAT(boost_se_lambda_this_capture_t_, id)
#define BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_TYPE(id) \
- /* C++11 allows use of typename even in non-type dependent context */ \
+ /* can always use `typename` on C++11 (so no _TPL) */ \
typename BOOST_SCOPE_EXIT_AUX_LAMBDA_PARAMS(id):: \
BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_PARAM_TYPE(id)
// Precondition: HAS_THIS(traits).
#define BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_TYPEDEFS(id, traits) \
- BOOST_SCOPE_EXIT_DETAIL_TYPEDEF_TYPEOF_THIS(id, 0 /* no TPL for C++11 */, \
+ BOOST_SCOPE_EXIT_DETAIL_TYPEDEF_TYPEOF_THIS(id, \
+ typename, /* can always use `typename` on C++11 (so no _TPL) */ \
BOOST_SCOPE_EXIT_AUX_LAMBDA_THIS_CAPTURE_TYPE(id)) \
/* capture type for workaround GCC internal error (even on later C++11) */ \
struct BOOST_SCOPE_EXIT_AUX_LAMBDA_PARAMS(id) { \
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