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
I created an account and left a comment in the review, but it still says "waiting for moderator approval."
A lot of work can be saved by ignoring the function signature.
template<class _R2, class _Cp>
static bool not_null(_R2 _Cp::*__p) {return __p;}
--
Actually, you should only need three overloads: one for pointers (including varargs function pointers), one for PTMs (effectively PTMFs but ignoring the function aspects), and the one which is always true.
Extended Description
This crashes:
#include
void (*p)(...) = nullptr;
std::function< void() > f = p;
int main() {
try { f(); }
catch ( std::bad_function_call & ) {}
}
The problem is missing overloads of std::function::__not_null.
On a related note, I'm working on a std::function extension. Is there no facility for function signature decomposition?
The text was updated successfully, but these errors were encountered: