*
* @par Example:
* @code
- * sigc::signal<void> some_signal;
+ * sigc::signal<void()> some_signal;
* void foo(int);
* some_signal.connect(sigc::bind(&foo,1));
* @endcode
* @par Example:
* @code
* int some_int;
- * sigc::signal<void> some_signal;
+ * sigc::signal<void()> some_signal;
* void foo(int&);
* some_signal.connect(sigc::bind(&foo, std::ref(some_int)));
* @endcode
* @par Example:
* @code
* struct bar : public sigc::trackable {} some_bar;
- * sigc::signal<void> some_signal;
+ * sigc::signal<void()> some_signal;
* void foo(bar&);
* some_signal.connect(sigc::bind(&foo, std::ref(some_bar)));
* // disconnected automatically if some_bar goes out of scope
{
//We take T_element as non-const because invoke() is not const.
//TODO: Take element as T_element&& ?
+ constexpr
static
decltype(auto)
transform(T_element& element) {
//we would want to call operator() with (_A_arg0, bound, _A_arg1, _A_arg2).
using tuple_type_args = std::tuple<type_trait_pass_t<T_arg>...>;
- auto t_args = std::tuple<T_arg...>(std::forward<T_arg>(_A_arg)...);
+ const auto t_args = std::tuple<T_arg...>(std::forward<T_arg>(_A_arg)...);
constexpr auto t_args_size = std::tuple_size<tuple_type_args>::value;
//Prevent calling tuple_start<> with values that will cause a compilation error.
static_assert(I_location <= t_args_size,
"I_location must be less than or equal to the number of arguments.");
- auto t_start = internal::tuple_start<I_location>(t_args);
- auto t_bound = internal::tuple_transform_each<internal::TransformEachInvoker>(bound_);
- auto t_end = internal::tuple_end<t_args_size - I_location>(t_args);
- auto t_with_bound = std::tuple_cat(t_start, t_bound, t_end);
+ const auto t_start = internal::tuple_start<I_location>(t_args);
+ const auto t_bound = internal::tuple_transform_each<internal::TransformEachInvoker>(bound_);
+ const auto t_end = internal::tuple_end<t_args_size - I_location>(t_args);
+ const auto t_with_bound = std::tuple_cat(t_start, t_bound, t_end);
- const auto seq = std::make_index_sequence<std::tuple_size<decltype(t_with_bound)>::value>();
+ constexpr const auto seq = std::make_index_sequence<std::tuple_size<decltype(t_with_bound)>::value>();
return call_functor_operator_parentheses(t_with_bound, seq);
}
//For instance, if _A_arg has 4 arguments,
//we would want to call operator() with (_A_arg0, _A_arg1, _A_arg2, bound).
- auto t_args = std::tuple<T_arg...>(std::forward<T_arg>(_A_arg)...);
- auto t_bound = internal::tuple_transform_each<internal::TransformEachInvoker>(bound_);
- auto t_with_bound = std::tuple_cat(t_args, t_bound);
+ const auto t_args = std::tuple<T_arg...>(std::forward<T_arg>(_A_arg)...);
+ const auto t_bound = internal::tuple_transform_each<internal::TransformEachInvoker>(bound_);
+ const auto t_with_bound = std::tuple_cat(t_args, t_bound);
- const auto seq = std::make_index_sequence<std::tuple_size<decltype(t_with_bound)>::value>();
+ constexpr auto seq = std::make_index_sequence<std::tuple_size<decltype(t_with_bound)>::value>();
return call_functor_operator_parentheses(t_with_bound, seq);
}
struct TupleVisitorVisitEach
{
template<typename T_action>
+ constexpr
static
void
visit(const T_element& element, const T_action& action)