VCCC  2024.05
VisualCamp Common C++ library
common_range.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/24.
3 //
4 
5 #ifndef VCCC_RANGES_COMMON_RANGE_HPP_
6 #define VCCC_RANGES_COMMON_RANGE_HPP_
7 
8 #include <type_traits>
9 
13 #include "vccc/__ranges/range.hpp"
16 
17 namespace vccc {
18 namespace ranges {
19 namespace detail {
20 
21 template<
22  typename T,
23  bool =
24  conjunction<
25  range<T>,
26  has_typename_type<iterator<T>>,
27  has_typename_type<sentinel<T>>
28  >::value
29 >
30 struct common_range_impl : std::false_type {};
31 
32 template<typename T>
33 struct common_range_impl<T, true> : same_as<iterator_t<T>, sentinel_t<T>> {};
34 
35 } // namespace ranges
36 
39 
40 template<typename T>
41 struct common_range : detail::common_range_impl<T> {};
42 
44 
45 } // namespace vccc
46 } // namespace ranges
47 
48 #endif // VCCC_RANGES_COMMON_RANGE_HPP_
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: common_range.hpp:41