https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118698
Bug ID: 118698
Summary: Compiler ICE on concept code accepted by MSVC and
clang
Product: gcc
Version: 14.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: davidhunter22 at gmail dot com
Target Milestone: ---
Created attachment 60324
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60324&action=edit
Tar file containging bug details
The attached code gives a compiler ICE. I have tried 14.20 and also the current
trunk version on Godbolt which I assume is 15.0 so I don't think this has been
fixed.
The code compiles and does what is expected on the latest MSVC and Clang.
Also attached are other compiler output etc
The core of the code that seem to
template <typename T, template <typename...> typename U>
concept is_specialization_of = std::invocable<decltype([]<typename...
Args>( U<Args...> const& ) { }),T>;
template <typename T> concept is_foo = is_specialization_of<T,foo>;
I was messing around with trying to create a concept version of Walter Brown's
is_specialization_of type trait when I ran into this