This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/66924] Bad diagnostic for parameter name used as non-type template argument
- From: "egallager at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Aug 2017 16:06:59 +0000
- Subject: [Bug c++/66924] Bad diagnostic for parameter name used as non-type template argument
- Auto-submitted: auto-generated
- References: <bug-66924-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66924
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-21
CC| |egallager at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
Confirmed:
$ /usr/local/bin/g++ -c -Wall -Wextra -pedantic 66924.cc
66924.cc: In function ‘int main()’:
66924.cc:5:37: error: parse error in template argument list
auto f = [] (int x) -> decltype(variable<x>) {return{};};
^~~~~~~~~~~
66924.cc:5:37: error: template argument 1 is invalid
66924.cc: In lambda function:
66924.cc:5:22: warning: unused parameter ‘x’ [-Wunused-parameter]
auto f = [] (int x) -> decltype(variable<x>) {return{};};
^
$