[Bug c++/118698] [14/15 Regression] Compiler ICE on concept code accepted by MSVC and clang
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118698 --- Comment #9 from David Hunter --- (In reply to Patrick Palka from comment #8) > Started with r14-9938, though I bet before this commit it only accidentally > worked. > > A workaround is to use an intermediate variable template: > > template typename U> > inline constexpr bool is_specialization_of_v = > std::invocable( U const& ) { }),T>; > > template typename U> > concept is_specialization_of = is_specialization_of_v; Thanks, I did get it to work with this. Oddly the above fails on MSVC, the static_assert fails. Works on Clang though.
[Bug c++/118698] New: Compiler ICE on concept code accepted by MSVC and clang
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 U> concept is_specialization_of = std::invocable( U const& ) { }),T>; template concept is_foo = is_specialization_of; 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