https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107124
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- MSVC also invokes the static assert but ICC accepts it. Note I think clang/ICC get the following wrong too: template<int> struct A {}; template<const int & I> constexpr int f(A<I>) { return 0; } template<class T> constexpr int f(T) { return 1; } const int tt = 0; static_assert( f(A<tt>{}) == 1 ); I don't think any compiler implements this correct either ...