https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103379
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2021-11-23 00:00:00 |2025-3-3
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is an ice-on-invalid C++23 example that produces the same error:
template<typename U>
constexpr auto&&
forward_like(U&& x) noexcept
{ return x; }
template<typename> class C
{
int value{};
template<typename Self>
friend constexpr auto&&
get(this Self&& z) noexcept
{
return std::forward_like(z.value);
}
};
(invalid because you can't use deducing this on a non-member function)