https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117700
Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ppalka at gcc dot gnu.org --- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> --- (In reply to Andrew Pinski from comment #3) > even doing: > ``` > void f(const TestClass *a) > { > > // But this fails when checking from inside the class. > static_assert( ArrayElemCount( a->m_array ) == 10 ); > > } > ``` > > Will fail as `a->m_array ` is NOT a constexpr > BUT `test_instance.m_array` is one as the reference to test_instance is one > too. IIUC the accepted revision of P2280 only allows unknown 'this', not pointers to unknown in general.