variadic_signal.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. namespace boost
  20. {
  21. namespace signals2
  22. {
  23. namespace detail
  24. {
  25. template<typename Signature> class variadic_extended_signature;
  26. // partial template specialization
  27. template<typename R, typename ... Args>
  28. class variadic_extended_signature<R (Args...)>
  29. {
  30. public:
  31. typedef boost::function<R (const boost::signals2::connection &, Args...)> function_type;
  32. };
  33. } // namespace detail
  34. } // namespace signals2
  35. } // namespace boost
  36. #include <boost/signals2/detail/signal_template.hpp>
  37. #endif // BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP