VCCC  2024.05
VisualCamp Common C++ library
iterator_t.hpp
Go to the documentation of this file.
1 //
2 // Created by cosge on 2023-12-02.
3 //
4 
5 #ifndef VCCC_RANGES_ITERATOR_T_HPP_
6 #define VCCC_RANGES_ITERATOR_T_HPP_
7 
8 #include <type_traits>
9 
10 #include "vccc/__ranges/begin.hpp"
12 
13 namespace vccc {
14 namespace ranges {
15 
17 
19 struct iterator {};
20 
21 template<typename T>
22 struct iterator<T, true, void_t<decltype( ranges::begin(std::declval<T&>()) )>> {
23  using type = decltype(ranges::begin(std::declval<T&>()));
24 };
25 
27 
30 
31 template<typename T>
32 using iterator_t = typename ranges::iterator<T>::type;
33 
35 
36 } // namespace ranges
37 } // namespace vccc
38 
39 #endif // VCCC_RANGES_ITERATOR_T_HPP_
typename ranges::iterator< T >::type iterator_t
Definition: iterator_t.hpp:32
constexpr VCCC_INLINE_OR_STATIC detail::begin_niebloid begin
returns an iterator to the beginning of a range
Definition: begin.hpp:116
void void_t
Definition: void_t.hpp:19
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35