From 78f26da1f3a5a3831e9e70efe83f9c56eef94e8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 4 Jan 2022 16:27:43 +0100 Subject: [PATCH] Forward declare std::contiguous_iterator_tag only when the standard library defines it --- include/boost/move/detail/iterator_traits.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/boost/move/detail/iterator_traits.hpp b/include/boost/move/detail/iterator_traits.hpp index d31a72c..640fbff 100644 --- a/include/boost/move/detail/iterator_traits.hpp +++ b/include/boost/move/detail/iterator_traits.hpp @@ -33,8 +33,17 @@ struct forward_iterator_tag; struct bidirectional_iterator_tag; struct random_access_iterator_tag; struct output_iterator_tag; + +#if ( (defined(BOOST_GNU_STDLIB) && (__cplusplus > 201703L))\ + || (defined(_LIBCPP_VERSION) && (_LIBCPP_STD_VER > 17))\ + || (defined(_YVALS) && defined(_CPPLIB_VER) && defined(__cpp_lib_concepts))\ + || (__cplusplus >= 202002L)\ + ) +# define BOOST_MOVE_CONTIGUOUS_ITERATOR_TAG struct contiguous_iterator_tag; +#endif + BOOST_MOVE_STD_NS_END #include