VCCC  2024.05
VisualCamp Common C++ library
cbegin.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2023/12/24.
3 //
4 
5 #ifndef VCCC_RANGES_CBEGIN_HPP_
6 #define VCCC_RANGES_CBEGIN_HPP_
7 
8 #include <type_traits>
9 
12 #include "vccc/__ranges/begin.hpp"
16 
17 namespace vccc {
18 namespace ranges {
19 namespace detail {
20 
21 struct cbegin_niebloid {
22  template<typename T, std::enable_if_t<disjunction<
23  std::is_lvalue_reference<T>,
24  enable_borrowed_range<std::remove_cv_t<T>>
25  >::value, int> = 0>
26  constexpr auto operator()(T&& t) const {
28  }
29 };
30 
31 } // namespace detail
32 
33 namespace niebloid {
34 
37 
46 VCCC_INLINE_OR_STATIC constexpr detail::cbegin_niebloid cbegin{};
47 
49 
50 } // namespace niebloid
51 using namespace niebloid;
52 
53 } // namespace ranges
54 } // namespace vccc
55 
56 #endif // VCCC_RANGES_CBEGIN_HPP_
std::enable_if_t< input_iterator< I >::value, std::conditional_t< detail::constant_iterator< I >::value, I, basic_const_iterator< I > > > const_iterator
Definition: basic_const_iterator.hpp:377
constexpr VCCC_INLINE_OR_STATIC detail::cbegin_niebloid cbegin
returns an iterator to the beginning of a read-only range
Definition: cbegin.hpp:46
constexpr auto & possibly_const_range(R &r) noexcept
Definition: possibly_const_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
#define VCCC_INLINE_OR_STATIC
Definition: inline_or_static.hpp:9
Definition: directory.h:12
constexpr VCCC_INLINE_OR_STATIC detail::element_niebloid< 1 > value
Definition: key_value.hpp:35