This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/66924] Bad diagnostic for parameter name used as non-type template argument


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{};};
                      ^
$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]