Test std::pmr::string in sv_eq_test

This commit is contained in:
Peter Dimov
2021-10-09 20:12:32 +03:00
parent 9b22937647
commit b520289660
2 changed files with 33 additions and 12 deletions

View File

@@ -1073,62 +1073,62 @@ public:
// against std::string
BOOST_CXX14_CONSTEXPR friend bool operator==( basic_string_view sv1, std::basic_string<Ch> const& sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator==( basic_string_view sv1, std::basic_string<Ch, std::char_traits<Ch>, A> const& sv2 ) BOOST_NOEXCEPT
{
return sv1.compare( sv2 ) == 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator==( std::basic_string<Ch> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator==( std::basic_string<Ch, std::char_traits<Ch>, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
{
return sv2.compare( sv1 ) == 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator!=( basic_string_view sv1, std::basic_string<Ch> const& sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator!=( basic_string_view sv1, std::basic_string<Ch, std::char_traits<Ch>, A> const& sv2 ) BOOST_NOEXCEPT
{
return sv1.compare( sv2 ) != 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator!=( std::basic_string<Ch> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator!=( std::basic_string<Ch, std::char_traits<Ch>, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
{
return sv2.compare( sv1 ) != 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator<( basic_string_view sv1, std::basic_string<Ch> const& sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator<( basic_string_view sv1, std::basic_string<Ch, std::char_traits<Ch>, A> const& sv2 ) BOOST_NOEXCEPT
{
return sv1.compare( sv2 ) < 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator<( std::basic_string<Ch> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator<( std::basic_string<Ch, std::char_traits<Ch>, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
{
return sv2.compare( sv1 ) > 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator<=( basic_string_view sv1, std::basic_string<Ch> const& sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator<=( basic_string_view sv1, std::basic_string<Ch, std::char_traits<Ch>, A> const& sv2 ) BOOST_NOEXCEPT
{
return sv1.compare( sv2 ) <= 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator<=( std::basic_string<Ch> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator<=( std::basic_string<Ch, std::char_traits<Ch>, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
{
return sv2.compare( sv1 ) >= 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator>( basic_string_view sv1, std::basic_string<Ch> const& sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator>( basic_string_view sv1, std::basic_string<Ch, std::char_traits<Ch>, A> const& sv2 ) BOOST_NOEXCEPT
{
return sv1.compare( sv2 ) > 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator>( std::basic_string<Ch> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator>( std::basic_string<Ch, std::char_traits<Ch>, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
{
return sv2.compare( sv1 ) < 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator>=( basic_string_view sv1, std::basic_string<Ch> const& sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator>=( basic_string_view sv1, std::basic_string<Ch, std::char_traits<Ch>, A> const& sv2 ) BOOST_NOEXCEPT
{
return sv1.compare( sv2 ) >= 0;
}
BOOST_CXX14_CONSTEXPR friend bool operator>=( std::basic_string<Ch> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
template<class A> BOOST_CXX14_CONSTEXPR friend bool operator>=( std::basic_string<Ch, std::char_traits<Ch>, A> const& sv1, basic_string_view sv2 ) BOOST_NOEXCEPT
{
return sv2.compare( sv1 ) <= 0;
}