File indexing completed on 2025-12-16 10:08:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef BOOST_SIGNALS2_PREPROCESSED_SIGNAL_HPP
0016 #define BOOST_SIGNALS2_PREPROCESSED_SIGNAL_HPP
0017
0018 #include <boost/config.hpp>
0019 #include <boost/core/enable_if.hpp>
0020 #include <boost/preprocessor/arithmetic.hpp>
0021 #include <boost/preprocessor/cat.hpp>
0022 #include <boost/preprocessor/control/expr_if.hpp>
0023 #include <boost/preprocessor/iteration.hpp>
0024 #include <boost/preprocessor/repetition.hpp>
0025 #include <boost/signals2/detail/preprocessed_arg_type.hpp>
0026 #include <boost/smart_ptr/make_shared.hpp>
0027 #include <boost/type_traits/add_reference.hpp>
0028 #include <boost/type_traits/is_void.hpp>
0029
0030 #define BOOST_PP_ITERATION_LIMITS (0, BOOST_SIGNALS2_MAX_ARGS)
0031 #define BOOST_PP_FILENAME_1 <boost/signals2/detail/signal_template.hpp>
0032 #include BOOST_PP_ITERATE()
0033
0034 namespace boost
0035 {
0036 namespace signals2
0037 {
0038 template<typename Signature,
0039 typename Combiner = optional_last_value<typename boost::function_traits<Signature>::result_type>,
0040 typename Group = int,
0041 typename GroupCompare = std::less<Group>,
0042 typename SlotFunction = function<Signature>,
0043 typename ExtendedSlotFunction = typename detail::extended_signature<function_traits<Signature>::arity, Signature>::function_type,
0044 typename Mutex = mutex >
0045 class signal: public detail::signalN<function_traits<Signature>::arity,
0046 Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::type
0047 {
0048 private:
0049 typedef typename detail::signalN<boost::function_traits<Signature>::arity,
0050 Signature, Combiner, Group, GroupCompare, SlotFunction, ExtendedSlotFunction, Mutex>::type base_type;
0051 public:
0052 signal(const Combiner &combiner_arg = Combiner(), const GroupCompare &group_compare = GroupCompare()):
0053 base_type(combiner_arg, group_compare)
0054 {}
0055 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_WORKAROUND(BOOST_MSVC, < 1800)
0056 signal(signal && other) BOOST_NOEXCEPT: base_type(std::move(other)) {}
0057 signal & operator=(signal && other) BOOST_NOEXCEPT{ base_type::operator=(std::move(other)); return *this; }
0058 #endif
0059 };
0060 }
0061 }
0062
0063 #endif