Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71979 - in branches/release/boost/signals2: . detail
From: fmhess_at_[hidden]
Date: 2011-05-16 10:17:19


Author: fmhess
Date: 2011-05-16 10:17:17 EDT (Mon, 16 May 2011)
New Revision: 71979
URL: http://svn.boost.org/trac/boost/changeset/71979

Log:
Merged from trunk.

Properties modified:
   branches/release/boost/signals2/ (props changed)
Text files modified:
   branches/release/boost/signals2/detail/signal_template.hpp | 5 ++++-
   branches/release/boost/signals2/detail/signals_common_macros.hpp | 15 +++++++++++----
   branches/release/boost/signals2/preprocessed_signal.hpp | 1 +
   branches/release/boost/signals2/variadic_signal.hpp | 1 +
   4 files changed, 17 insertions(+), 5 deletions(-)

Modified: branches/release/boost/signals2/detail/signal_template.hpp
==============================================================================
--- branches/release/boost/signals2/detail/signal_template.hpp (original)
+++ branches/release/boost/signals2/detail/signal_template.hpp 2011-05-16 10:17:17 EDT (Mon, 16 May 2011)
@@ -326,7 +326,7 @@
 // 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, :, )
+ slot_invoker(BOOST_SIGNALS2_ADD_REF_ARGS(BOOST_SIGNALS2_NUM_ARGS)) BOOST_PP_EXPR_IF(BOOST_SIGNALS2_NUM_ARGS, :)
 #undef BOOST_SIGNALS2_ADD_REF_ARGS
 
 // m_argn
@@ -345,6 +345,9 @@
               resolver);
           }
         private:
+ // declare assignment operator private since this class might have reference or const members
+ slot_invoker & operator=(const slot_invoker &);
+
 #define BOOST_SIGNALS2_ADD_REF_M_ARG_STATEMENT(z, n, data) \
   BOOST_SIGNALS2_ADD_REF_TYPE(~, n, ~) BOOST_SIGNALS2_M_ARG_NAME(~, n, ~) ;
           BOOST_PP_REPEAT(BOOST_SIGNALS2_NUM_ARGS, BOOST_SIGNALS2_ADD_REF_M_ARG_STATEMENT, ~)

Modified: branches/release/boost/signals2/detail/signals_common_macros.hpp
==============================================================================
--- branches/release/boost/signals2/detail/signals_common_macros.hpp (original)
+++ branches/release/boost/signals2/detail/signals_common_macros.hpp 2011-05-16 10:17:17 EDT (Mon, 16 May 2011)
@@ -46,18 +46,21 @@
   typename BOOST_PP_CAT(prefix, R) BOOST_PP_COMMA_IF(arity) \
   BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(arity), typename BOOST_PP_CAT(prefix, T))
 // typename R, typename T1, typename T2, ..., typename TN
-#define BOOST_SIGNALS2_SIGNATURE_TEMPLATE_DECL(arity) BOOST_SIGNALS2_PREFIXED_SIGNATURE_TEMPLATE_DECL(arity,)
+#define BOOST_SIGNALS2_SIGNATURE_TEMPLATE_DECL(arity) \
+ typename R BOOST_PP_COMMA_IF(arity) \
+ BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(arity), typename T)
 // typename prefixT1, typename prefixT2, ..., typename prefixTN
 #define BOOST_SIGNALS2_PREFIXED_ARGS_TEMPLATE_DECL(arity, prefix) \
   BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(arity), typename BOOST_PP_CAT(prefix, T))
 // typename T1, typename T2, ..., typename TN
-#define BOOST_SIGNALS2_ARGS_TEMPLATE_DECL(arity) BOOST_SIGNALS2_PREFIXED_ARGS_TEMPLATE_DECL(arity,)
+#define BOOST_SIGNALS2_ARGS_TEMPLATE_DECL(arity) \
+ BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(arity), typename T)
 // prefixR, prefixT1, prefixT2, ..., prefixTN
 #define BOOST_SIGNALS2_PREFIXED_SIGNATURE_TEMPLATE_INSTANTIATION(arity, prefix) \
   BOOST_PP_CAT(prefix, R) BOOST_PP_COMMA_IF(arity) BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(arity), BOOST_PP_CAT(prefix, T))
 // R, T1, T2, ..., TN
 #define BOOST_SIGNALS2_SIGNATURE_TEMPLATE_INSTANTIATION(arity) \
- BOOST_SIGNALS2_PREFIXED_SIGNATURE_TEMPLATE_INSTANTIATION(arity,)
+ R BOOST_PP_COMMA_IF(arity) BOOST_PP_ENUM_SHIFTED_PARAMS(BOOST_PP_INC(arity), T)
 // boost::functionN<R, T1, T2, ..., TN>
 #define BOOST_SIGNALS2_FUNCTION_N_DECL(arity) BOOST_PP_CAT(boost::function, arity)<\
   BOOST_SIGNALS2_SIGNATURE_TEMPLATE_INSTANTIATION(arity) >
@@ -96,8 +99,12 @@
 // prefixT1 & arg1, prefixT2 & arg2, ..., prefixTn & argn
 #define BOOST_SIGNALS2_PREFIXED_FULL_REF_ARGS(arity, prefix) \
   BOOST_PP_ENUM(arity, BOOST_SIGNALS2_PREFIXED_FULL_REF_ARG, prefix)
+// Tn & argn
+#define BOOST_SIGNALS2_FULL_REF_ARG(z, n, data) \
+ BOOST_PP_CAT(T, BOOST_PP_INC(n)) & BOOST_SIGNALS2_SIGNATURE_ARG_NAME(~, n, ~)
 // T1 & arg1, T2 & arg2, ..., Tn & argn
-#define BOOST_SIGNALS2_FULL_REF_ARGS(arity) BOOST_SIGNALS2_PREFIXED_FULL_REF_ARGS(arity,)
+#define BOOST_SIGNALS2_FULL_REF_ARGS(arity) \
+ BOOST_PP_ENUM(arity, BOOST_SIGNALS2_FULL_REF_ARG, ~)
 // preprocessed_arg_typeN
 #define BOOST_SIGNALS2_PREPROCESSED_ARG_N_TYPE_CLASS_NAME(arity) BOOST_PP_CAT(preprocessed_arg_type, arity)
 

Modified: branches/release/boost/signals2/preprocessed_signal.hpp
==============================================================================
--- branches/release/boost/signals2/preprocessed_signal.hpp (original)
+++ branches/release/boost/signals2/preprocessed_signal.hpp 2011-05-16 10:17:17 EDT (Mon, 16 May 2011)
@@ -17,6 +17,7 @@
 
 #include <boost/preprocessor/arithmetic.hpp>
 #include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/control/expr_if.hpp>
 #include <boost/preprocessor/iteration.hpp>
 #include <boost/preprocessor/repetition.hpp>
 #include <boost/signals2/detail/preprocessed_arg_type.hpp>

Modified: branches/release/boost/signals2/variadic_signal.hpp
==============================================================================
--- branches/release/boost/signals2/variadic_signal.hpp (original)
+++ branches/release/boost/signals2/variadic_signal.hpp 2011-05-16 10:17:17 EDT (Mon, 16 May 2011)
@@ -16,6 +16,7 @@
 #ifndef BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP
 #define BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP
 
+#include <boost/preprocessor/control/expr_if.hpp>
 #include <boost/signals2/detail/variadic_arg_type.hpp>
 #include <boost/signals2/detail/variadic_slot_invoker.hpp>
 #include <boost/type_traits/function_traits.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