Skip to content
This repository was archived by the owner on Aug 19, 2021. It is now read-only.

Commit 29786e5

Browse files
committed
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
1 parent d532deb commit 29786e5

File tree

2 files changed

+796
-416
lines changed

2 files changed

+796
-416
lines changed

0 commit comments

Comments
 (0)