VCCC  2024.05
VisualCamp Common C++ library
is_range.hpp
Go to the documentation of this file.
1 # /*
2 # * Created by YongGyu Lee on 2020/12/08.
3 # */
4 #
5 # ifndef VCCC_TYPE_TRAITS_IS_RANGE_HPP
6 # define VCCC_TYPE_TRAITS_IS_RANGE_HPP
7 #
9 
10 namespace vccc {
11 
25 template<typename T, typename = void>
26 struct is_range : std::false_type {};
27 
28 template<typename T>
29 struct is_range<T, void_t<decltype(std::declval<T>().begin()),
30  decltype(std::declval<T>().end())
31 >> : std::true_type {
32 };
33 
34 template<typename T>
35 using is_range_t = typename is_range<T>::type;
36 
38 
39 } // namespace vccc
40 
41 # endif // VCCC_TYPE_TRAITS_IS_RANGE_HPP
typename is_range< T >::type is_range_t
Definition: is_range.hpp:35
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: matrix.hpp:495
Definition: directory.h:12
check if a type met range requirements(deprecated)
Definition: is_range.hpp:26