[llvm-bugs] [Bug 35664] New: reference_wrapper doesn't handle function pointers with C-style varargs

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 14 10:33:35 PST 2017


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

            Bug ID: 35664
           Summary: reference_wrapper doesn't handle function pointers
                    with C-style varargs
           Product: libc++
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mclow.lists at gmail.com
                CC: llvm-bugs at lists.llvm.org, mclow.lists at gmail.com

The following code should compile, but doesn't

    #include <functional>

    int f(const char*, ...) { return 0; }
    std::reference_wrapper fr{f};
    decltype(fr)::result_type i;

    struct X {
        int f(const char*, ...) { return 0; }
    };
    auto xf = &X::f;
    std::reference_wrapper xfr{xf};
    decltype(xfr)::result_type j;

    int main() {}

Reported by Jonathan Wakeley

-- 
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/20171214/8a4870b7/attachment.html>


More information about the llvm-bugs mailing list