diff --git a/test/sv_types_test.cpp b/test/sv_types_test.cpp index 9afe05b..d072566 100644 --- a/test/sv_types_test.cpp +++ b/test/sv_types_test.cpp @@ -7,10 +7,19 @@ #include #include +#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 160000 + +// std::char_traits is deprecated for non-char types +typedef wchar_t Ch; + +#else + struct Ch { }; +#endif + int main() { typedef boost::core::basic_string_view ch_string_view; diff --git a/test/type_name_test.cpp b/test/type_name_test.cpp index 7c7bf81..8ef6677 100644 --- a/test/type_name_test.cpp +++ b/test/type_name_test.cpp @@ -310,7 +310,11 @@ int main() TEST(std::pair); TEST(std::pair, void>); +#if defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 160000 +// std::char_traits is deprecated for non-char types +#else TEST(std::basic_string); +#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 is deprecated for non-char types +#else TEST(std::basic_string_view); +#endif TEST(std::string_view); TEST(std::wstring_view);