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

ThePhD <b762...@trbvn.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |b762...@trbvn.com
         Resolution|FIXED                       |---

--- Comment #3 from ThePhD <b762...@trbvn.com> ---
This bug is still not fixed by the mentioned revision. When you actually use
the parameter pack, the old error rears its ugly head again. Minimal repro:

template <typename... Args>
void bark( int = 0, Args&&... args ) {}

int main ( int, char*[]) {
     bark(); // fine
     bark(1); // fine
     bark(1, 2); // boom
     return 0;
}


Given output:
main.cpp:2:31: error: missing default argument on parameter 'args'
void bark( int = 0, Args&&... args ) {}
                              ^
main.cpp:7:6: note: in instantiation of function template specialization
'bark<int>' requested here
     bark(1, 2);
     ^
1 error generated.


Expected:
Successful compilation.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to