I'm wondering if is there a way to have something like this:
using CallbackType = std::function<[[nodiscard]]bool(void)>;
(I know above code won't be compiled and complains that nodiscard
can't be applied to types!)
My goal is to enforce the caller of the callback to check the return value of it!
you can do something like this
Warning:
EDIT: Extend to member function (+const) + lambda ( with deduction guide )