| 1 | // |
| 2 | // is_contiguous_iterator.hpp |
| 3 | // ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 4 | // |
| 5 | // Copyright (c) 2003-2024 Christopher M. Kohlhoff (chris at kohlhoff dot com) |
| 6 | // |
| 7 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 8 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 9 | // |
| 10 | |
| 11 | #ifndef BOOST_ASIO_IS_CONTIGUOUS_ITERATOR_HPP |
| 12 | #define BOOST_ASIO_IS_CONTIGUOUS_ITERATOR_HPP |
| 13 | |
| 14 | #if defined(_MSC_VER) && (_MSC_VER >= 1200) |
| 15 | # pragma once |
| 16 | #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) |
| 17 | |
| 18 | #include <boost/asio/detail/config.hpp> |
| 19 | #include <iterator> |
| 20 | #include <boost/asio/detail/type_traits.hpp> |
| 21 | |
| 22 | #include <boost/asio/detail/push_options.hpp> |
| 23 | |
| 24 | namespace boost { |
| 25 | namespace asio { |
| 26 | |
| 27 | /// The is_contiguous_iterator class is a traits class that may be used to |
| 28 | /// determine whether a type is a contiguous iterator. |
| 29 | template <typename T> |
| 30 | struct is_contiguous_iterator : |
| 31 | #if defined(BOOST_ASIO_HAS_STD_CONCEPTS) \ |
| 32 | || defined(GENERATING_DOCUMENTATION) |
| 33 | integral_constant<bool, std::contiguous_iterator<T>> |
| 34 | #else // defined(BOOST_ASIO_HAS_STD_CONCEPTS) |
| 35 | // || defined(GENERATING_DOCUMENTATION) |
| 36 | is_pointer<T> |
| 37 | #endif // defined(BOOST_ASIO_HAS_STD_CONCEPTS) |
| 38 | // || defined(GENERATING_DOCUMENTATION) |
| 39 | { |
| 40 | }; |
| 41 | |
| 42 | } // namespace asio |
| 43 | } // namespace boost |
| 44 | |
| 45 | #include <boost/asio/detail/pop_options.hpp> |
| 46 | |
| 47 | #endif // BOOST_ASIO_IS_CONTIGUOUS_ITERATOR_HPP |
| 48 | |