Work around GCC 5..8 constexpr comparison failures

This commit is contained in:
Peter Dimov
2025-01-25 20:59:46 +02:00
parent 50cf6ebba7
commit b32a6cfcfd

View File

@ -331,6 +331,16 @@ namespace boost {
return true;
}
#if BOOST_WORKAROUND(BOOST_GCC, < 90000)
template<class T>
BOOST_CXX14_CONSTEXPR bool operator== (const array<T, 0>& x, const array<T, 0>& y)
{
return true;
}
#endif
template<class T, std::size_t N>
BOOST_CXX14_CONSTEXPR bool operator!= (const array<T,N>& x, const array<T,N>& y) {
return !(x==y);
@ -348,6 +358,16 @@ namespace boost {
return false;
}
#if BOOST_WORKAROUND(BOOST_GCC, < 90000)
template<class T>
BOOST_CXX14_CONSTEXPR bool operator< (const array<T, 0>& x, const array<T, 0>& y)
{
return false;
}
#endif
template<class T, std::size_t N>
BOOST_CXX14_CONSTEXPR bool operator> (const array<T,N>& x, const array<T,N>& y) {
return y<x;