[LLVMbugs] [Bug 23589] New: std::function doesn't recognize null pointer to varargs function

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 19 23:48:10 PDT 2015


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: unassignedclangbugs at nondot.org
          Reporter: david_work at me.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150520/b23dd8f0/attachment.html>


More information about the llvm-bugs mailing list