[llvm-bugs] [Bug 38431] "too many template arguments for class template" disallows sensible empty-parameter-pack instantiation

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Aug 2 13:47:37 PDT 2018


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

Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |richard-llvm at metafoo.co.uk
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
(In reply to tonyelewis from comment #0)
> I'm guessing that this
> code is valid because f() and A can be reasonably instantiated with an empty
> parameter pack

Your guess turns out to be incorrect. See http://eel.is/c++draft/temp#res-8.3:

"The program is ill-formed, no diagnostic required, if [...] every valid
specialization of a variadic template requires an empty template parameter
pack"

So Clang is correct to diagnose this. (And the other compilers are correct to
accept it if they so choose.)

-- 
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/20180802/860052be/attachment.html>


More information about the llvm-bugs mailing list