VCCC  2024.05
VisualCamp Common C++ library
range_size_t.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2024/01/06.
3 //
4 
5 #ifndef VCCC_RANGES_RANGE_SIZE_T_HPP
6 #define VCCC_RANGES_RANGE_SIZE_T_HPP
7 
8 #include <type_traits>
9 
10 #include "vccc/__ranges/size.hpp"
12 
13 namespace vccc {
14 namespace ranges {
15 namespace detail {
16 
18 struct range_size_impl {
19  using type = decltype(ranges::size(std::declval<R&>()));
20 };
21 
22 template<typename R>
23 struct range_size_impl<R, false> {};
24 
25 } // namespace detail
26 
27 template<typename R>
28 struct range_size : detail::range_size_impl<R> {};
29 
32 
38 template<typename R>
39 using range_size_t = typename range_size<R>::type;
40 
42 
43 } // namespace vccc
44 } // namespace ranges
45 
46 #endif // VCCC_RANGES_RANGE_SIZE_T_HPP
constexpr VCCC_INLINE_OR_STATIC detail::size_niebloid size
returns the size of a container or array
Definition: size.hpp:145
typename range_size< R >::type range_size_t
Used to obtain the size type of the sized_range type R.
Definition: range_size_t.hpp:39
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35
Definition: range_size_t.hpp:28