is_contiguous_iterator.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // is_contiguous_iterator.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2023 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. #ifndef ASIO_IS_CONTIGUOUS_ITERATOR_HPP
  11. #define ASIO_IS_CONTIGUOUS_ITERATOR_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include "asio/detail/config.hpp"
  16. #include <iterator>
  17. #include "asio/detail/type_traits.hpp"
  18. #include "asio/detail/push_options.hpp"
  19. namespace asio {
  20. /// The is_contiguous_iterator class is a traits class that may be used to
  21. /// determine whether a type is a contiguous iterator.
  22. template <typename T>
  23. struct is_contiguous_iterator :
  24. #if defined(ASIO_HAS_STD_CONCEPTS) \
  25. || defined(GENERATING_DOCUMENTATION)
  26. integral_constant<bool, std::contiguous_iterator<T>>
  27. #else // defined(ASIO_HAS_STD_CONCEPTS)
  28. // || defined(GENERATING_DOCUMENTATION)
  29. is_pointer<T>
  30. #endif // defined(ASIO_HAS_STD_CONCEPTS)
  31. // || defined(GENERATING_DOCUMENTATION)
  32. {
  33. };
  34. } // namespace asio
  35. #include "asio/detail/pop_options.hpp"
  36. #endif // ASIO_IS_CONTIGUOUS_ITERATOR_HPP