Fix libc++16 failures

This commit is contained in:
Peter Dimov
2023-06-02 19:32:28 +03:00
parent d4db3eccec
commit de8fe4fad7
2 changed files with 17 additions and 0 deletions

View File

@ -7,10 +7,19 @@
#include <boost/core/lightweight_test_trait.hpp>
#include <iterator>
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 160000
// std::char_traits<Ch> is deprecated for non-char types
typedef wchar_t Ch;
#else
struct Ch
{
};
#endif
int main()
{
typedef boost::core::basic_string_view<Ch> ch_string_view;

View File

@ -310,7 +310,11 @@ int main()
TEST(std::pair<void, void>);
TEST(std::pair<std::pair<void, void>, void>);
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 160000
// std::char_traits<Ch> is deprecated for non-char types
#else
TEST(std::basic_string<Ch>);
#endif
TEST(std::string);
TEST(std::wstring);
@ -402,7 +406,11 @@ int main()
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 160000
// std::char_traits<Ch> is deprecated for non-char types
#else
TEST(std::basic_string_view<Ch>);
#endif
TEST(std::string_view);
TEST(std::wstring_view);