https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123955
--- Comment #3 from Htamak R G <htamakrg at gmail dot com> --- (In reply to Andrew Pinski from comment #1) > >verified till Clang 21.1.0 > > clang trunk rejects it so maybe not a GCC bug ... You are correct that clang trunk rejects this code. However, all released Clang versions (11.0.0 through 21.1.0, including the current stable release) accept it without any warning or error, while no released GCC version accepts it. As such, this remains a divergence between GCC and all currently released Clang versions. Whether clang trunk’s behavior represents a correction or a regression is unclear, but it does not reflect the behavior of any released Clang compiler at this time. The failure appears to be related to early substitution into concept arguments; the provided workaround avoids the issue by delaying substitution via a nested requires clause. For reference: 1. [Works] x86-64 clang 11.0.0: https://godbolt.org/z/457nE44xq 2. [Works] x86-64 clang 21.1.0: https://godbolt.org/z/ashqx4zfj 3. x86-64 clang (trunk): https://godbolt.org/z/a3exK4sKM 4. x86-64 gcc (trunk): https://godbolt.org/z/vPrKPW41z
