{
using self_type = signal_emit<T_return, T_accumulator, T_arg...>;
using result_type = typename T_accumulator::result_type;
- using slot_type = slot<T_return, T_arg...>;
+ using slot_type = slot<T_return(T_arg...)>;
using slot_iterator_buf_type = internal::slot_iterator_buf<self_type, T_return>;
using slot_reverse_iterator_buf_type = internal::slot_reverse_iterator_buf<self_type, T_return>;
using iterator_type = signal_impl::const_iterator_type;
{
using self_type = signal_emit<T_return, void, T_arg...>;
using result_type = T_return;
- using slot_type = slot<T_return, T_arg...>;
+ using slot_type = slot<T_return(T_arg...)>;
using iterator_type = signal_impl::const_iterator_type;
using call_type = typename slot_type::call_type;
{
using self_type = signal_emit<void, void, T_arg...>;
using result_type = void;
- using slot_type = slot<void, T_arg...>;
+ using slot_type = slot<void(T_arg...)>;
using iterator_type = signal_impl::const_iterator_type;
using call_type = typename slot_type::call_type;
public:
using emitter_type = internal::signal_emit<T_return, T_accumulator, T_arg...>;
using result_type = typename emitter_type::result_type;
- using slot_type = slot<T_return, T_arg...>;
+ using slot_type = slot<T_return(T_arg...)>;
using slot_list_type = slot_list<slot_type>;
using iterator = typename slot_list_type::iterator;
using const_iterator = typename slot_list_type::const_iterator;
};
-/** Convenience wrapper for the numbered sigc::signal# templates.
- * signal can be used to connect() slots that are invoked
+/** signal can be used to connect() slots that are invoked
* during subsequent calls to emit(). Any functor or slot
* can be passed into connect(). It is converted into a slot
* implicitly.
* the emit() function:
* - @e T_return The desired return type of the emit() function. * - @e T_arg Argument types used in the definition of emit().
*
+ * For instance, to declare a signal whose connected slot returns void and takes
+ * two parameters of bool and int:
+ * @code
+ * sigc::signal<void(bool, int)> some_signal;
+ * @endcode
+ *
* To specify an accumulator type the nested class signal::accumulated can be used.
*
* @par Example:
* @ingroup signal
*/
template <class T_return, class... T_arg>
-class signal
+class signal;
+
+template <class T_return, class... T_arg>
+class signal<T_return(T_arg...)>
: public signal_with_accumulator<T_return, void, T_arg...>
{
public:
using accumulator_type = void;
- /** Convenience wrapper for the numbered sigc::signal# templates.
- * Like sigc::signal but the additional template parameter @e T_accumulator
+ /** Like sigc::signal but the additional template parameter @e T_accumulator
* defines the accumulator type that should be used.
*
* An accumulator is a functor that uses a pair of special iterators
* executes the slot. The return value is buffered, so that in an expression
* like @code a = (*i) * (*i); @endcode the slot is executed only once.
* The accumulator must define its return value as @p result_type.
- *
+ *
* @par Example 1:
* This accumulator calculates the arithmetic mean value:
* @code