Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50783 - sandbox/thread_safe_signals/trunk/boost/signals2
From: fmhess_at_[hidden]
Date: 2009-01-26 10:31:38


Author: fmhess
Date: 2009-01-26 10:31:37 EST (Mon, 26 Jan 2009)
New Revision: 50783
URL: http://svn.boost.org/trac/boost/changeset/50783

Log:
Changed NAMED_SIGNATURE_PARAMETER macro to
BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER. Added requirement
that Signature parameter be a function type.

Text files modified:
   sandbox/thread_safe_signals/trunk/boost/signals2/signal_type.hpp | 16 +++++++++-------
   1 files changed, 9 insertions(+), 7 deletions(-)

Modified: sandbox/thread_safe_signals/trunk/boost/signals2/signal_type.hpp
==============================================================================
--- sandbox/thread_safe_signals/trunk/boost/signals2/signal_type.hpp (original)
+++ sandbox/thread_safe_signals/trunk/boost/signals2/signal_type.hpp 2009-01-26 10:31:37 EST (Mon, 26 Jan 2009)
@@ -18,7 +18,7 @@
 #define BOOST_SIGNALS2_SIGNAL_TYPE_HPP
 
 // support for function types is currently broken in Boost.Parameter
-// #define NAMED_SIGNATURE_PARAMETER
+// #define BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
 
 #include <boost/signals2/signal.hpp>
 
@@ -31,13 +31,15 @@
 #endif // !defined(BOOST_PARAMETER_MAX_ARITY)
 #include <boost/parameter.hpp>
 
+#include <boost/type_traits/is_function.hpp>
+
 namespace boost
 {
   namespace signals2
   {
     namespace keywords
     {
-#ifdef NAMED_SIGNATURE_PARAMETER
+#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
       BOOST_PARAMETER_TEMPLATE_KEYWORD(signature_type)
 #endif
       BOOST_PARAMETER_TEMPLATE_KEYWORD(combiner_type)
@@ -49,7 +51,7 @@
     } // namespace keywords
 
     template <
-#ifdef NAMED_SIGNATURE_PARAMETER
+#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
         typename A0,
 #else
         typename Signature,
@@ -64,8 +66,8 @@
     class signal_type
     {
       typedef parameter::parameters<
-#ifdef NAMED_SIGNATURE_PARAMETER
- parameter::required<keywords::tag::signature_type>,
+#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
+ parameter::required<keywords::tag::signature_type, is_function<boost::mpl::_> >,
 #endif
           parameter::optional<keywords::tag::combiner_type>,
           parameter::optional<keywords::tag::group_type>,
@@ -79,13 +81,13 @@
       // ArgumentPack
       typedef typename
         parameter_spec::bind<
-#ifdef NAMED_SIGNATURE_PARAMETER
+#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
         A0,
 #endif
         A1, A2, A3, A4, A5, A6>::type
         args;
 
-#ifdef NAMED_SIGNATURE_PARAMETER
+#ifdef BOOST_SIGNALS2_NAMED_SIGNATURE_PARAMETER
       typedef typename parameter::value_type<args, keywords::tag::signature_type>::type
         signature_type;
 #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