From 0a59f555ca44da4bf5e5cb3b09c78edf73831626 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sun, 12 Sep 2021 22:49:46 +0300 Subject: [PATCH] Added libc++ 12 to the list of standard libs implementing C++20 std::ostream_iterator. --- test/iterator_traits_test.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/iterator_traits_test.cpp b/test/iterator_traits_test.cpp index cbfedd7..6cdb2c6 100644 --- a/test/iterator_traits_test.cpp +++ b/test/iterator_traits_test.cpp @@ -155,10 +155,11 @@ input_iterator_test, int, std::ptrdiff_t, int*, int&, // C++20 changed ostream_iterator::difference_type to ptrdiff_t. // Note: gcc 10.1 defines __cplusplus to a value less than 202002L, but greater than 201703L in C++20 mode. -#if __cplusplus > 201703L && (\ - (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION >= 100100) \ - ) || \ - defined(_MSVC_LANG) && _MSVC_LANG > 201703L && _MSVC_STL_UPDATE >= 202010L +#if (__cplusplus > 201703L && ( \ + (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION >= 100100) || \ + (defined(_LIBCPP_VERSION) && _LIBCPP_VERSION >= 12000) + )) || \ + (defined(_MSVC_LANG) && _MSVC_LANG > 201703L && _MSVC_STL_UPDATE >= 202010L) #define BOOST_ITERATOR_CXX20_OSTREAM_ITERATOR #endif