This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79138] ICE when trying to do template auto
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Jan 2017 09:16:03 +0000
- Subject: [Bug c++/79138] ICE when trying to do template auto
- Auto-submitted: auto-generated
- References: <bug-79138-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79138
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2017-01-19
CC| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started to ICE with r242017, before that the code was rejected.
However, clang 3.9.1 also rejects the code:
clang++ pr79138.cpp -c -std=c++1z
pr79138.cpp:5:11: error: 'auto' not allowed in template parameter
template <auto >
^~~~
pr79138.cpp:8:11: error: 'auto' not allowed in template parameter
template <auto... Vals>
^~~~
pr79138.cpp:11:11: error: 'auto' not allowed in template parameter
template <auto... As, auto... Bs>
^~~~
pr79138.cpp:11:23: error: 'auto' not allowed in template parameter
template <auto... As, auto... Bs>
^~~~
pr79138.cpp:18:11: error: 'auto' not allowed in template parameter
template <auto Val, class F>
^~~~
pr79138.cpp:28:11: error: 'auto' not allowed in template parameter
template <auto... Vals, class F>
^~~~
pr79138.cpp:36:19: error: expected body of lambda expression
[](int i) constexpr { return i%2 == 0; });
^
7 errors generated.