|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53464 - in trunk/boost/signals2: . detail
From: fmhess_at_[hidden]
Date: 2009-05-30 13:12:02
Author: fmhess
Date: 2009-05-30 13:12:01 EDT (Sat, 30 May 2009)
New Revision: 53464
URL: http://svn.boost.org/trac/boost/changeset/53464
Log:
Fixing some reference-to-reference problems with some compilers.
Text files modified:
trunk/boost/signals2/detail/signal_template.hpp | 22 ++++++++++++++++------
trunk/boost/signals2/preprocessed_signal.hpp | 1 +
2 files changed, 17 insertions(+), 6 deletions(-)
Modified: trunk/boost/signals2/detail/signal_template.hpp
==============================================================================
--- trunk/boost/signals2/detail/signal_template.hpp (original)
+++ trunk/boost/signals2/detail/signal_template.hpp 2009-05-30 13:12:01 EDT (Sat, 30 May 2009)
@@ -308,7 +308,17 @@
{
public:
typedef nonvoid_slot_result_type result_type;
- slot_invoker(BOOST_SIGNALS2_FULL_REF_ARGS(BOOST_SIGNALS2_NUM_ARGS)) BOOST_PP_IF(BOOST_SIGNALS2_NUM_ARGS, :, )
+// typename add_reference<Tn>::type argn
+#define BOOST_SIGNALS2_ADD_REF_ARG(z, n, data) \
+ typename add_reference<BOOST_PP_CAT(T, BOOST_PP_INC(n))>::type \
+ BOOST_SIGNALS2_SIGNATURE_ARG_NAME(~, n, ~)
+// typename add_reference<T1>::type arg1, typename add_reference<T2>::type arg2, ..., typename add_reference<Tn>::type argn
+#define BOOST_SIGNALS2_ADD_REF_ARGS(arity) \
+ BOOST_PP_ENUM(arity, BOOST_SIGNALS2_ADD_REF_ARG, ~)
+ slot_invoker(BOOST_SIGNALS2_ADD_REF_ARGS(BOOST_SIGNALS2_NUM_ARGS)) BOOST_PP_IF(BOOST_SIGNALS2_NUM_ARGS, :, )
+#define BOOST_SIGNALS2_ADD_REF_ARG(z, n, data) \
+#undef BOOST_SIGNALS2_ADD_REF_ARGS(arity)
+
// argn ( argn ) ,
#define BOOST_SIGNALS2_MISC_STATEMENT(z, n, data) \
BOOST_PP_CAT(arg, n) ( BOOST_PP_CAT(arg, n) )
@@ -323,11 +333,11 @@
resolver);
}
private:
-// Tn & argn;
-#define BOOST_SIGNALS2_MISC_STATEMENT(z, n, Signature) \
- BOOST_PP_CAT(T, BOOST_PP_INC(n)) & BOOST_SIGNALS2_SIGNATURE_ARG_NAME(~, n, ~);
- BOOST_PP_REPEAT(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_MISC_STATEMENT, ~)
-#undef BOOST_SIGNALS2_MISC_STATEMENT
+#define BOOST_SIGNALS2_ADD_REF_ARG_STATEMENT(z, n, data) \
+ BOOST_SIGNALS2_ADD_REF_ARG(z, n, data) ;
+ BOOST_PP_REPEAT(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_ADD_REF_ARG, ~)
+#undef BOOST_SIGNALS2_ADD_REF_ARG_STATEMENT
+#undef BOOST_SIGNALS2_ADD_REF_ARG
result_type m_invoke(const connection_body_type &connectionBody,
const void_type *) const
{
Modified: trunk/boost/signals2/preprocessed_signal.hpp
==============================================================================
--- trunk/boost/signals2/preprocessed_signal.hpp (original)
+++ trunk/boost/signals2/preprocessed_signal.hpp 2009-05-30 13:12:01 EDT (Sat, 30 May 2009)
@@ -20,6 +20,7 @@
#include <boost/preprocessor/iteration.hpp>
#include <boost/preprocessor/repetition.hpp>
#include <boost/signals2/detail/preprocessed_arg_type.hpp>
+#include <boost/type_traits/add_reference.hpp>
#define BOOST_PP_ITERATION_LIMITS (0, BOOST_SIGNALS2_MAX_ARGS)
#define BOOST_PP_FILENAME_1 <boost/signals2/detail/signal_template.hpp>
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