You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 19, 2021. It is now read-only.
Added stricter templates to type-infering functions
EventQueue::event is now defined for the following overloads:
- event(R (*)(A...), C...)
- event(F, C...)
- event(const F, C...)
- event(volatile F, C...)
- event(const volatile F, C...)
- event(T *, R (T::*)(A...), C...)
- event(const T *, R (T::*)(A...) const, C...)
- event(volatile T *, R (T::*)(A...) volatile, C...)
- event(const volatile T *, R (T::*)(A...) const volatile, C...)
This insures cleaner error messages when invalid types are used.
It should be noted that different types are used for the infered
function parameters and the arguments supplied to event, this is
important for inducing implicit casts.
Otherwise, deceptively confusing bugs can occur:
void doit(unsigned value);
queue.event(doit, 1); // Error - 1 is signed without implicit casts
0 commit comments