https://llvm.org/bugs/show_bug.cgi?id=23589

            Bug ID: 23589
           Summary: std::function doesn't recognize null pointer to
                    varargs function
           Product: libc++
           Version: 3.6
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

This crashes:

#include <functional>

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?

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to