Don't use template vararg references for signals

This commit is contained in:
Danny Robson 2011-07-03 16:04:07 +10:00
parent c3b8b1e147
commit 6e85e3c97b

View File

@ -60,8 +60,12 @@ class signal {
void clear (void) void clear (void)
{ m_children.clear (); } { m_children.clear (); }
/// Execute all callbacks. Does not combine results. /// Returns the number of callbacks connected.
void operator () (Args&... tail) { unsigned int size (void) const
{ return m_children.size (); }
/// Execute all callbacks, ignoring the return parameters. Does not combine results.
void operator () (Args... tail) {
for (auto i = m_children.begin (), end = m_children.end (); i != end; ++i) for (auto i = m_children.begin (), end = m_children.end (); i != end; ++i)
(*i)(tail...); (*i)(tail...);
} }