sigc::track_object() tracks trackable objects, referenced from a functor.
More...
sigc::track_object() tracks trackable objects, referenced from a functor.
It can be useful when you assign a C++11 lambda expression or a std::function<> to a slot, or connect it to a signal, and the lambda expression or std::function<> contains references to sigc::trackable derived objects.
The functor returned by sigc::track_object() is formally an adaptor, but it does not alter the signature, return type or behaviour of the supplied functor.
track_obj() is a deprecated alternative to track_object().
- Example:
sigc::signal<void()> some_signal;
void foo(bar&);
{
bar some_bar;
some_signal.connect([&some_bar](){ foo(some_bar); });
}
template <typename T_functor , typename... T_obj>
decltype(auto) sigc::track_obj |
( |
const T_functor & |
func, |
|
|
const T_obj &... |
obj |
|
) |
| |
|
inline |
template <typename T_functor , typename T_obj1 , typename... T_objs>
decltype(auto) sigc::track_object |
( |
const T_functor & |
func, |
|
|
const T_obj1 & |
obj1, |
|
|
const T_objs &... |
objs |
|
) |
| |
|
inline |