is_contiguous_iterator.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef BOOST_ASIO_IS_CONTIGUOUS_ITERATOR_HPP
  11. #define BOOST_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 <boost/asio/detail/config.hpp>
  16. #include <iterator>
  17. #include <boost/asio/detail/type_traits.hpp>
  18. #include <boost/asio/detail/push_options.hpp>
  19. namespace boost {
  20. namespace asio {
  21. /// The is_contiguous_iterator class is a traits class that may be used to
  22. /// determine whether a type is a contiguous iterator.
  23. template <typename T>
  24. struct is_contiguous_iterator :
  25. #if defined(BOOST_ASIO_HAS_STD_CONCEPTS) \
  26. || defined(GENERATING_DOCUMENTATION)
  27. integral_constant<bool, std::contiguous_iterator<T>>
  28. #else // defined(BOOST_ASIO_HAS_STD_CONCEPTS)
  29. // || defined(GENERATING_DOCUMENTATION)
  30. is_pointer<T>
  31. #endif // defined(BOOST_ASIO_HAS_STD_CONCEPTS)
  32. // || defined(GENERATING_DOCUMENTATION)
  33. {
  34. };
  35. } // namespace asio
  36. } // namespace boost
  37. #include <boost/asio/detail/pop_options.hpp>
  38. #endif // BOOST_ASIO_IS_CONTIGUOUS_ITERATOR_HPP