https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96515

mauro russo <ing.russomauro at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ing.russomauro at gmail dot com

--- Comment #1 from mauro russo <ing.russomauro at gmail dot com> ---
It's still there with gcc 14.2

Generally, they take care fast about ICE cases.

If I may contribute, I also guess that the code is ill-formed (but this is not
a justification for the ICE), because it seems you were trying to do something
introduced in C++26, that is, Fold expanded constraints (see
https://en.cppreference.com/w/cpp/language/constraints).

However, you applied the fold expression among requires expressions, but in
this case why you preliminary expanded 'Args...' in the parameter list of the
requires expressions ?


Indeed, the following works starting from gcc 12.3 (up to, at least, 14.2),
while it determines a compilation error for earlier versions of gcc (guess some
other bug, now solved):


template<typename... Args>
concept PackHasAdd = (requires(Args args) {
   (args+1);
} && ...);

static_assert(PackHasAdd<int>);
int main() {}

Refer: https://godbolt.org/z/T4E1E3bGM
  • [Bug c++/96515] [concepts] Se... ing.russomauro at gmail dot com via Gcc-bugs

Reply via email to