[Bug c++/66924] Bad diagnostic for parameter name used as non-type template argument
egallager at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Aug 21 18:06:00 GMT 2017
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{};};
^
$
More information about the Gcc-bugs
mailing list