VCCC  2024.05
VisualCamp Common C++ library
iter_val_t.hpp
Go to the documentation of this file.
1 //
2 // Created by cosge on 2024-01-13.
3 //
4 
5 #ifndef VCCC_ITERATOR_ITER_VAL_T_HPP_
6 #define VCCC_ITERATOR_ITER_VAL_T_HPP_
7 
10 
11 namespace vccc {
12 namespace detail {
13 
14 template<typename I, bool = has_typename_value_type< cxx20_iterator_traits<I> >::value /* true */>
15 struct iter_val_impl {
16  using type = typename cxx20_iterator_traits<I>::value_type;
17 };
18 template<typename I>
19 struct iter_val_impl<I, false> {};
20 
21 } // namespace detail
22 
25 
26 template<typename T>
27 struct iter_val : detail::iter_val_impl<T> {};
28 
30 template<typename T>
31 using iter_val_t = typename iter_val<T>::type;
32 
34 
35 } // namespace vccc
36 
37 #endif // VCCC_ITERATOR_ITER_VAL_T_HPP_
typename iter_val< T >::type iter_val_t
Definition: iter_val_t.hpp:31
Definition: directory.h:12
Definition: iter_val_t.hpp:27