https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118305
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2025-01-05 Ever confirmed|0 |1 Summary|Wrong deduced type for |Wrong auto type used for |array bound |array bounds of template | |argument Status|UNCONFIRMED |NEW Known to fail| |8.1.0 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Interesting this works: ``` template<typename T, typename T1, T N> constexpr T size(T1 (*)[N]) { return N; } using size_t = decltype(sizeof 0); using size_t = decltype(::size(static_cast<int (*)[1]>(0))); ``` Confirmed. Not a regression.