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 <boost/core/lightweight_test_trait.hpp>
#include <iterator> #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 struct Ch
{ {
}; };
#endif
int main() int main()
{ {
typedef boost::core::basic_string_view<Ch> ch_string_view; 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<void, void>);
TEST(std::pair<std::pair<void, 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>); TEST(std::basic_string<Ch>);
#endif
TEST(std::string); TEST(std::string);
TEST(std::wstring); TEST(std::wstring);
@ -402,7 +406,11 @@ int main()
#if !defined(BOOST_NO_CXX17_HDR_STRING_VIEW) #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>); TEST(std::basic_string_view<Ch>);
#endif
TEST(std::string_view); TEST(std::string_view);
TEST(std::wstring_view); TEST(std::wstring_view);