https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96851
--- Comment #4 from milasudril at gmail dot com --- Actually, I did not even try without the c++20 flag: template< class T, std::size_t N > bool operator<( const std::array<T,N>& lhs, const std::array<T,N>& rhs ); (3) (until C++20) ... template< class T, std::size_t N > constexpr /* see below */ operator<=>( const std::array<T,N>& lhs, const std::array<T,N>& rhs ); (7) (since C++20) https://en.cppreference.com/w/cpp/container/array/operator_cmp Thus I wouldn't expect it to work in C++17 or below. If it did, it could be considered a bug.