[Bug c++/85991] [Concepts] Template placeholder: ICE cp_parser_lookup_name, at cp/parser.c:26223
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Oct 29 10:25:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85991
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |67491
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
No ICE with current trunk:
b.cc:1:51: warning: the 'bool' keyword is not allowed in a C++20 concept
definition
1 | template <template <typename> class, int> concept bool TmplC = true;
| ^~~~
b.cc:3:10: error: 'TmplC' does not constrain a type
3 | void f(A<TmplC<0>> *);
| ^~~~~~~
b.cc:1:56: note: concept defined here
1 | template <template <typename> class, int> concept bool TmplC = true;
| ^~~~~
b.cc:3:10: error: wrong number of template arguments (1, should be 2)
3 | void f(A<TmplC<0>> *);
| ^~~~~~~
b.cc:1:56: note: provided for 'template<template<class>
class<template-parameter-1-1>, int <anonymous> > concept const bool TmplC<
<template-parameter-1-1>, <anonymous> >'
1 | template <template <typename> class, int> concept bool TmplC = true;
| ^~~~~
b.cc:3:10: error: wrong number of template arguments (1, should be 2)
3 | void f(A<TmplC<0>> *);
| ^~~~~~~
b.cc:1:56: note: provided for 'template<template<class>
class<template-parameter-1-1>, int <anonymous> > concept const bool TmplC<
<template-parameter-1-1>, <anonymous> >'
1 | template <template <typename> class, int> concept bool TmplC = true;
| ^~~~~
b.cc:3:17: error: template argument 1 is invalid
3 | void f(A<TmplC<0>> *);
| ^~
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues
More information about the Gcc-bugs
mailing list