https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117700
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Clang, edg and MSVC all reject it:
<source>:29:18: error: static assertion expression is not an integral constant
expression
29 | static_assert( ArrayElemCount( m_array ) == 10 );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<source>:29:34: note: implicit use of 'this' pointer is only allowed within the
evaluation of a call to a 'constexpr' member function
29 | static_assert( ArrayElemCount( m_array ) == 10 );
| ^
GCC is correct here.