diff --git a/test/iterator_traits_test.cpp b/test/iterator_traits_test.cpp index f937f67..467373a 100644 --- a/test/iterator_traits_test.cpp +++ b/test/iterator_traits_test.cpp @@ -152,6 +152,13 @@ struct maybe_pointer_test input_iterator_test, int, std::ptrdiff_t, int*, int&, std::input_iterator_tag> istream_iterator_test; +// C++20 changed ostream_iterator::difference_type to ptrdiff_t. +#if __cplusplus >= 202002L && (\ + (defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION >= 100100) \ + ) +#define BOOST_ITERATOR_CXX20_OSTREAM_ITERATOR +#endif + #if BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x564) && !defined(__SGI_STL_PORT) typedef ::std::char_traits::off_type distance; non_pointer_test,int, @@ -164,6 +171,10 @@ non_pointer_test, non_pointer_test, int, long, int*, int&, std::output_iterator_tag> ostream_iterator_test; +#elif defined(BOOST_ITERATOR_CXX20_OSTREAM_ITERATOR) +non_pointer_test, + void, std::ptrdiff_t, void, void, std::output_iterator_tag> + ostream_iterator_test; #else non_pointer_test, void, void, void, void, std::output_iterator_tag>