How would I combine two signals of the same type?
Let's say I have two signals with one connection each, foo
and bar
.
boost::signals2::signal<void ()> foo;
foo.connect([]{
std::cout << "Hello from foo!" << std::endl;
});
boost::signals2::signal<void ()> bar;
bar.connect([]{
std::cout << "Hello from bar!" << std::endl;
});
How would I combine the two already created signals later so that foo
contains both slots?
I can use anything from boost and C++14 or later.