#ifndef _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
#define _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
#include <__concepts/arithmetic.h>
#include <__concepts/constructible.h>
#include <__concepts/convertible_to.h>
#include <__concepts/copyable.h>
#include <__concepts/equality_comparable.h>
#include <__concepts/same_as.h>
#include <__concepts/totally_ordered.h>
#include <__config>
#include <__fwd/pair.h>
#include <__iterator/incrementable_traits.h>
#include <__iterator/readable_traits.h>
#include <__type_traits/common_reference.h>
#include <__type_traits/conditional.h>
#include <__type_traits/disjunction.h>
#include <__type_traits/is_convertible.h>
#include <__type_traits/is_object.h>
#include <__type_traits/is_primary_template.h>
#include <__type_traits/is_reference.h>
#include <__type_traits/is_valid_expansion.h>
#include <__type_traits/remove_const.h>
#include <__type_traits/remove_cv.h>
#include <__type_traits/remove_cvref.h>
#include <__type_traits/void_t.h>
#include <__utility/declval.h>
#include <cstddef>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
__with_reference;
__can_reference;
__dereferenceable;
iter_reference_t;
#endif
template <class _Iter>
struct _LIBCPP_TEMPLATE_VIS iterator_traits;
struct _LIBCPP_TEMPLATE_VIS input_iterator_tag { … };
struct _LIBCPP_TEMPLATE_VIS output_iterator_tag { … };
struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag : public input_iterator_tag { … };
struct _LIBCPP_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag { … };
struct _LIBCPP_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag { … };
#if _LIBCPP_STD_VER >= 20
struct _LIBCPP_TEMPLATE_VIS contiguous_iterator_tag : public random_access_iterator_tag { … };
#endif
template <class _Iter>
struct __iter_traits_cache { … };
_ITER_TRAITS;
struct __iter_concept_concept_test { … };
struct __iter_concept_category_test { … };
struct __iter_concept_random_fallback { … };
template <class _Iter, class _Tester>
struct __test_iter_concept : _IsValidExpansion<_Tester::template _Apply, _Iter>, _Tester {};
template <class _Iter>
struct __iter_concept_cache { … };
_ITER_CONCEPT;
template <class _Tp>
struct __has_iterator_typedefs { … };
template <class _Tp>
struct __has_iterator_category { … };
template <class _Tp>
struct __has_iterator_concept { … };
#if _LIBCPP_STD_VER >= 20
namespace __iterator_traits_detail {
__cpp17_iterator;
__cpp17_input_iterator;
__cpp17_forward_iterator;
__cpp17_bidirectional_iterator;
__cpp17_random_access_iterator;
}
__has_member_reference;
__has_member_pointer;
__has_member_iterator_category;
__specifies_members;
template <class>
struct __iterator_traits_member_pointer_or_void { … };
__iterator_traits_member_pointer_or_void<_Tp>;
__cpp17_iterator_missing_members;
__cpp17_input_iterator_missing_members;
template <class>
struct __iterator_traits_member_pointer_or_arrow_or_void { … };
__iterator_traits_member_pointer_or_arrow_or_void<_Ip>;
__iterator_traits_member_pointer_or_arrow_or_void<_Ip>;
template <class _Ip>
struct __iterator_traits_member_reference { … };
__iterator_traits_member_reference<_Ip>;
template <class _Ip>
struct __deduce_iterator_category { … };
__deduce_iterator_category<_Ip>;
__deduce_iterator_category<_Ip>;
__deduce_iterator_category<_Ip>;
template <class _Ip>
struct __iterator_traits_iterator_category : __deduce_iterator_category<_Ip> { … };
__iterator_traits_iterator_category<_Ip>;
template <class>
struct __iterator_traits_difference_type { … };
__iterator_traits_difference_type<_Ip>;
template <class>
struct __iterator_traits { … };
__iterator_traits<_Ip>;
__iterator_traits<_Ip>;
__iterator_traits<_Ip>;
template <class _Ip>
struct iterator_traits : __iterator_traits<_Ip> { … };
#else
template <class _Iter, bool>
struct __iterator_traits {};
template <class _Iter, bool>
struct __iterator_traits_impl {};
template <class _Iter>
struct __iterator_traits_impl<_Iter, true> {
typedef typename _Iter::difference_type difference_type;
typedef typename _Iter::value_type value_type;
typedef typename _Iter::pointer pointer;
typedef typename _Iter::reference reference;
typedef typename _Iter::iterator_category iterator_category;
};
template <class _Iter>
struct __iterator_traits<_Iter, true>
: __iterator_traits_impl< _Iter,
is_convertible<typename _Iter::iterator_category, input_iterator_tag>::value ||
is_convertible<typename _Iter::iterator_category, output_iterator_tag>::value > {};
template <class _Iter>
struct _LIBCPP_TEMPLATE_VIS iterator_traits : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> {
using __primary_template = iterator_traits;
};
#endif
iterator_traits<_Tp *>;
template <class _Tp, class _Up, bool = __has_iterator_category<iterator_traits<_Tp> >::value>
struct __has_iterator_category_convertible_to : is_convertible<typename iterator_traits<_Tp>::iterator_category, _Up> { … };
__has_iterator_category_convertible_to<_Tp, _Up, false>;
template <class _Tp, class _Up, bool = __has_iterator_concept<_Tp>::value>
struct __has_iterator_concept_convertible_to : is_convertible<typename _Tp::iterator_concept, _Up> { … };
__has_iterator_concept_convertible_to<_Tp, _Up, false>;
__has_input_iterator_category;
__has_forward_iterator_category;
__has_bidirectional_iterator_category;
__has_random_access_iterator_category;
#if _LIBCPP_STD_VER >= 20
template <class _Tp>
struct __libcpp_is_contiguous_iterator
: _Or< __has_iterator_category_convertible_to<_Tp, contiguous_iterator_tag>,
__has_iterator_concept_convertible_to<_Tp, contiguous_iterator_tag> > { … };
#else
template <class _Tp>
struct __libcpp_is_contiguous_iterator : false_type {};
#endif
__libcpp_is_contiguous_iterator<_Up *>;
template <class _Iter>
class __wrap_iter;
__has_exactly_input_iterator_category;
__has_exactly_forward_iterator_category;
__has_exactly_bidirectional_iterator_category;
__iter_value_type;
__iter_key_type;
__iter_mapped_type;
__iter_to_alloc_type;
__iterator_category_type;
__iterator_pointer_type;
__iter_diff_t;
__iter_reference;
#if _LIBCPP_STD_VER >= 20
iter_value_t;
#endif
_LIBCPP_END_NAMESPACE_STD
#endif