From 32f4f4d08628403b783f598922542dc66299e9c5 Mon Sep 17 00:00:00 2001 From: Casey Carter Date: Tue, 13 Oct 2020 19:23:49 -0700 Subject: [PATCH] MSVC also has C++20 output_iterator Tell iterator_traits_test not to fail on MSVC when `std::output_iterator` has `difference_type` of `std::ptrdiff_t`. --- test/iterator_traits_test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/iterator_traits_test.cpp b/test/iterator_traits_test.cpp index 7abf56a..cbfedd7 100644 --- a/test/iterator_traits_test.cpp +++ b/test/iterator_traits_test.cpp @@ -157,7 +157,8 @@ input_iterator_test, int, std::ptrdiff_t, int*, int&, // 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 #define BOOST_ITERATOR_CXX20_OSTREAM_ITERATOR #endif