|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52757 - in branches/release/boost: . signals2 signals2/detail
From: fmhess_at_[hidden]
Date: 2009-05-04 17:01:00
Author: fmhess
Date: 2009-05-04 17:00:59 EDT (Mon, 04 May 2009)
New Revision: 52757
URL: http://svn.boost.org/trac/boost/changeset/52757
Log:
Merged [52372] and [52385] from trunk.
Text files modified:
branches/release/boost/signals2.hpp | 1 +
branches/release/boost/signals2/detail/slot_template.hpp | 12 +++---------
branches/release/boost/signals2/signal.hpp | 1 -
branches/release/boost/signals2/slot.hpp | 20 +++++++++++---------
4 files changed, 15 insertions(+), 19 deletions(-)
Modified: branches/release/boost/signals2.hpp
==============================================================================
--- branches/release/boost/signals2.hpp (original)
+++ branches/release/boost/signals2.hpp 2009-05-04 17:00:59 EDT (Mon, 04 May 2009)
@@ -15,3 +15,4 @@
#include <boost/signals2/last_value.hpp>
#include <boost/signals2/signal.hpp>
#include <boost/signals2/signal_type.hpp>
+#include <boost/signals2/shared_connection_block.hpp>
Modified: branches/release/boost/signals2/detail/slot_template.hpp
==============================================================================
--- branches/release/boost/signals2/detail/slot_template.hpp (original)
+++ branches/release/boost/signals2/detail/slot_template.hpp 2009-05-04 17:00:59 EDT (Mon, 04 May 2009)
@@ -61,21 +61,15 @@
{
}
// bind syntactic sugar
-// const ArgTypeN & argN
-#define BOOST_SIGNALS2_SLOT_BINDING_ARG_DECL(z, n, data) \
- const BOOST_PP_CAT(ArgType, n) & BOOST_PP_CAT(arg, n)
// template<typename Func, typename ArgType0, typename ArgType1, ..., typename ArgTypen-1> slotN(...
-#define BOOST_SIGNALS2_SLOT_BINDING_CONSTRUCTOR(z, n, data) \
+#define BOOST_SIGNALS2_SLOT_N_BINDING_CONSTRUCTOR(z, n, data) \
template<typename Func, BOOST_PP_ENUM_PARAMS(n, typename ArgType)> \
BOOST_SIGNALS2_SLOT_CLASS_NAME(BOOST_SIGNALS2_NUM_ARGS)(const Func &func, BOOST_PP_ENUM(n, BOOST_SIGNALS2_SLOT_BINDING_ARG_DECL, ~)) \
{ \
init_slot_function(bind(func, BOOST_PP_ENUM_PARAMS(n, arg))); \
}
-#define BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS 10
- BOOST_PP_REPEAT_FROM_TO(1, BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS, BOOST_SIGNALS2_SLOT_BINDING_CONSTRUCTOR, ~)
-#undef BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS
-#undef BOOST_SIGNALS2_SLOT_BINDING_ARG_DECL
-#undef BOOST_SIGNALS2_SLOT_BINDING_CONSTRUCTOR
+ BOOST_PP_REPEAT_FROM_TO(1, BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS, BOOST_SIGNALS2_SLOT_N_BINDING_CONSTRUCTOR, ~)
+#undef BOOST_SIGNALS2_SLOT_N_BINDING_CONSTRUCTOR
// invocation
R operator()(BOOST_SIGNALS2_SIGNATURE_FULL_ARGS(BOOST_SIGNALS2_NUM_ARGS))
{
Modified: branches/release/boost/signals2/signal.hpp
==============================================================================
--- branches/release/boost/signals2/signal.hpp (original)
+++ branches/release/boost/signals2/signal.hpp 2009-05-04 17:00:59 EDT (Mon, 04 May 2009)
@@ -33,7 +33,6 @@
#include <boost/signals2/detail/slot_call_iterator.hpp>
#include <boost/signals2/mutex.hpp>
#include <boost/signals2/connection.hpp>
-#include <boost/signals2/shared_connection_block.hpp>
#include <boost/signals2/slot.hpp>
#include <boost/throw_exception.hpp>
#include <boost/type_traits.hpp>
Modified: branches/release/boost/signals2/slot.hpp
==============================================================================
--- branches/release/boost/signals2/slot.hpp (original)
+++ branches/release/boost/signals2/slot.hpp 2009-05-04 17:00:59 EDT (Mon, 04 May 2009)
@@ -24,6 +24,14 @@
#include <boost/visit_each.hpp>
#include <boost/weak_ptr.hpp>
+
+#ifndef BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS
+#define BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS 10
+#endif
+// const ArgTypeN & argN
+#define BOOST_SIGNALS2_SLOT_BINDING_ARG_DECL(z, n, data) \
+ const BOOST_PP_CAT(ArgType, n) & BOOST_PP_CAT(arg, n)
+
namespace boost
{
namespace signals2
@@ -82,19 +90,13 @@
slot(const F& f): base_type(f)
{}
// bind syntactic sugar
-// const AN & aN
-#define BOOST_SIGNALS2_SLOT_BINDING_ARG_DECL(z, n, data) \
- const BOOST_PP_CAT(A, n) & BOOST_PP_CAT(a, n)
-// template<typename F, typename A0, typename A1, ..., typename An-1> slot(...
+// template<typename F, typename ArgType0, typename ArgType1, ..., typename ArgTypen-1> slot(...
#define BOOST_SIGNALS2_SLOT_BINDING_CONSTRUCTOR(z, n, data) \
- template<typename F, BOOST_PP_ENUM_PARAMS(n, typename A)> \
+ template<typename F, BOOST_PP_ENUM_PARAMS(n, typename ArgType)> \
slot(const F &f, BOOST_PP_ENUM(n, BOOST_SIGNALS2_SLOT_BINDING_ARG_DECL, ~)): \
- base_type(f, BOOST_PP_ENUM_PARAMS(n, a)) \
+ base_type(f, BOOST_PP_ENUM_PARAMS(n, arg)) \
{}
-#define BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS 10
BOOST_PP_REPEAT_FROM_TO(1, BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS, BOOST_SIGNALS2_SLOT_BINDING_CONSTRUCTOR, ~)
-#undef BOOST_SIGNALS2_SLOT_MAX_BINDING_ARGS
-#undef BOOST_SIGNALS2_SLOT_BINDING_ARG_DECL
#undef BOOST_SIGNALS2_SLOT_BINDING_CONSTRUCTOR
};
} // namespace signals2
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