[llvm-bugs] [Bug 33696] New: clang accepts lambda expression in template argument

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jul 6 01:30:09 PDT 2017


            Bug ID: 33696
           Summary: clang accepts lambda expression in template argument
           Product: clang
           Version: trunk
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: trass3r at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

clang r307127

void foo();
template <auto f>
struct F
    ~F() { f(); }

int main()
   F<+[](){foo();}> f;

Note the + to force the conversion to function pointer. gcc rejects it.


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/20170706/9ac89c80/attachment-0001.html>

More information about the llvm-bugs mailing list