VCCC  2024.05
VisualCamp Common C++ library
forward_iterator.hpp
Go to the documentation of this file.
1 //
2 // Created by cosge on 2023-12-03.
3 //
4 
5 #ifndef VCCC_ITERATOR_FORWARD_ITERATOR_HPP_
6 #define VCCC_ITERATOR_FORWARD_ITERATOR_HPP_
7 
8 #include <type_traits>
9 
18 
19 namespace vccc {
20 namespace detail {
21 
23 struct forward_iterator_impl : std::false_type {};
24 
25 template<typename I>
26 struct forward_iterator_impl<I, true>
27  : conjunction<
28  derived_from<ITER_CONCEPT<I>, forward_iterator_tag>,
29  incrementable<I>,
30  sentinel_for<I, I>
31  > {};
32 
33 } // namespace detail
34 
37 
52 template<typename I>
53 struct forward_iterator : detail::forward_iterator_impl<I> {};
54 
56 
57 } // namespace vccc
58 
59 #endif // VCCC_ITERATOR_FORWARD_ITERATOR_HPP_
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
specifies that an input_iterator is a forward iterator, supporting equality comparison and multi-pass
Definition: forward_iterator.hpp:53