variadic_signal.hpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 <[email protected]>
  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/core/enable_if.hpp>
  16. #include <boost/preprocessor/control/expr_if.hpp>
  17. #include <boost/signals2/detail/variadic_arg_type.hpp>
  18. #include <boost/signals2/detail/variadic_slot_invoker.hpp>
  19. #include <boost/smart_ptr/make_shared.hpp>
  20. #include <boost/type_traits/function_traits.hpp>
  21. #include <boost/type_traits/is_void.hpp>
  22. namespace boost
  23. {
  24. namespace signals2
  25. {
  26. namespace detail
  27. {
  28. template<typename Signature> class variadic_extended_signature;
  29. // partial template specialization
  30. template<typename R, typename ... Args>
  31. class variadic_extended_signature<R (Args...)>
  32. {
  33. public:
  34. typedef boost::function<R (const boost::signals2::connection &, Args...)> function_type;
  35. };
  36. } // namespace detail
  37. } // namespace signals2
  38. } // namespace boost
  39. #include <boost/signals2/detail/signal_template.hpp>
  40. #endif // BOOST_SIGNALS2_VARIADIC_SIGNAL_HPP