public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/61953] [C++11] The template parameter pack of a function template should be the last template parameter Date: Wed, 04 Aug 2021 20:48:14 +0000 [thread overview] Message-ID: <bug-61953-4-enJPgHCT3Z@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-61953-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61953 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Clang and GCC both accept the code slightly. ICC accepts the code with a warning: <source>(1): warning #2922: template parameter "U" cannot be used because it follows a parameter pack and cannot be deduced from the parameters of function template "f" template<class... T, class... U> void f() { } ^ <source>(2): warning #2922: template parameter "U" cannot be used because it follows a parameter pack and cannot be deduced from the parameters of function template "g" template<class... T, class U> void g() { } ^ MSVC rejects the code: <source>(1): error C3547: template parameter 'U' cannot be used because it follows a template parameter pack and cannot be deduced from the function parameters of 'f' <source>(1): note: see declaration of 'U' <source>(2): error C3547: template parameter 'U' cannot be used because it follows a template parameter pack and cannot be deduced from the function parameters of 'g' <source>(2): note: see declaration of 'U'
next prev parent reply other threads:[~2021-08-04 20:48 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-07-29 16:23 [Bug c++/61953] New: " kariya_mitsuru at hotmail dot com 2014-12-14 0:42 ` [Bug c++/61953] " ville.voutilainen at gmail dot com 2014-12-14 0:42 ` ville.voutilainen at gmail dot com 2021-08-04 20:48 ` pinskia at gcc dot gnu.org [this message] 2021-08-12 1:17 ` pinskia at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-61953-4-enJPgHCT3Z@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).