https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125195
Bug ID: 125195
Summary: gcc rejects valid concept-id with defaulted concept
argument when used in alias template for NTTP type
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ldalessandro at gmail dot com
Target Milestone: ---
Filing on behalf of Bernhard Manfred Gruber.
The following code is accepted by clang but fails with a parser error on gcc.
```
template<class = void>
concept C = true;
template<bool>
using X = int;
template<X<C<>> = 0>
struct S {};
```
```
repro.cc:6:14: error: type/value mismatch at argument 1 in template parameter
list for 'template<bool <anonymous> > using X = int'
6 | template<X<C<>> = 0>
| ^~
repro.cc:6:14: note: expected a constant of type 'bool', got
'<template-parameter-1-1>'
```
As a workaround we can protect the `C<>` with `()`.
```
template<X<(C<>)> = 0>
struct S {};
```
Live: https://gcc.godbolt.org/z/19E7cMhvK (5/5/2026)