VCCC  2024.05
VisualCamp Common C++ library
bidirectional_range.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/24.
3 //
4 
5 #ifndef VCCC_RANGES_BIDIRECTIONAL_RANGE_HPP_
6 #define VCCC_RANGES_BIDIRECTIONAL_RANGE_HPP_
7 
8 #include <type_traits>
9 
15 
16 namespace vccc {
17 namespace ranges {
18 namespace detail {
19 
20 template<
21  typename T,
22  bool =
23  conjunction<
24  forward_range<T>,
25  has_typename_type<iterator<T>>
26  >::value
27 >
28 struct bidirectional_range_impl : std::false_type {};
29 
30 template<typename T>
31 struct bidirectional_range_impl<T, true> : bidirectional_iterator<iterator_t<T>> {};
32 
33 } // namespace ranges
34 
37 
48 template<typename T>
49 struct bidirectional_range : detail::bidirectional_range_impl<T> {};
50 
51 
53 
54 } // namespace vccc
55 } // namespace ranges
56 
57 #endif // VCCC_RANGES_BIDIRECTIONAL_RANGE_HPP_
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
specifies a range whose iterator type satisfies bidirectional_iterator
Definition: bidirectional_range.hpp:49