[LLVMbugs] [Bug 19459] New: Bad diagnostic when initializer list is used in variadic constructor

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 16 17:43:20 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=19459

            Bug ID: 19459
           Summary: Bad diagnostic when initializer list is used in
                    variadic constructor
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: arcata at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

struct Foo {
  template<typename...T> Foo(T...x) {}
};

Foo bar{1, 2, 3, {}, 5};

This gives the nonsense diagnostic:

foo.cpp:4:26: Candidate constructor not viable: requires 3 arguments, but 5
were provided

instead of a more accurate diagnostic that the nested initializer list cannot
be used due to a lack of type context.

-- 
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/20140417/be016726/attachment.html>


More information about the llvm-bugs mailing list