[LLVMbugs] [Bug 23029] New: Diagnostic issued for function parameter pack following a default argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Mar 25 16:57:25 PDT 2015


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

            Bug ID: 23029
           Summary: Diagnostic issued for function parameter pack
                    following a default argument
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: oktal3700 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Ubuntu clang version 3.7.0-svn229234-1~exp1 and in earlier versions.

Clang issues a diagnostic (missing default argument on parameter) for the
following (well formed) code: http://goo.gl/aIoi1f

template <typename... Ts>
void f(int = 0, Ts...) {}

int main() {
  f(42);
}

8.3.6/4: In a given function declaration, each parameter subsequent to a
parameter with a default argument shall have a default argument supplied in
this or a previous declaration or shall be a function parameter pack.

>From http://stackoverflow.com/q/29098835/1639256

-- 
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/20150325/fc817a5a/attachment.html>


More information about the llvm-bugs mailing list