variadic_signal.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. A variadic implementation of variadic boost::signals2::signal, used when variadic
  3. template support is detected in the compiler.
  4. Author: Frank Mori Hess <fmhess@users.sourceforge.net>
  5. Begin: 2009-05-26
  6. */
  7. // Copyright Frank Mori Hess 2009
  8. // Use, modification and
  9. // distribution is subject to the Boost Software License, Version
  10. // 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  11. // http://www.boost.org/LICENSE_1_0.txt)
  12. // For more information, see http://www.boost.org
  13. #ifndef BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP
  14. #define BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP
  15. #include <boost/preprocessor/control/expr_if.hpp>
  16. #include <boost/signals2/detail/variadic_arg_type.hpp>
  17. #include <boost/signals2/detail/variadic_slot_invoker.hpp>
  18. #include <boost/type_traits/function_traits.hpp>
  19. #include <boost/type_traits/is_void.hpp>
  20. #include <boost/utility/enable_if.hpp>
  21. namespace boost
  22. {
  23. namespace signals2
  24. {
  25. namespace detail
  26. {
  27. template<typename Signature> class variadic_extended_signature;
  28. // partial template specialization
  29. template<typename R, typename ... Args>
  30. class variadic_extended_signature<R (Args...)>
  31. {
  32. public:
  33. typedef boost::function<R (const boost::signals2::connection &, Args...)> function_type;
  34. };
  35. } // namespace detail
  36. } // namespace signals2
  37. } // namespace boost
  38. #include <boost/signals2/detail/signal_template.hpp>
  39. #endif // BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP