VCCC  2024.05
VisualCamp Common C++ library
drop_while.hpp
Go to the documentation of this file.
1 //
2 // Created by yonggyulee on 2024/02/20.
3 //
4 
5 #ifndef VCCC_RANGES_VIEWS_DROP_WHILE_HPP
6 #define VCCC_RANGES_VIEWS_DROP_WHILE_HPP
7 
8 #include <type_traits>
9 #include <utility>
10 
15 
16 namespace vccc {
17 namespace ranges {
18 namespace views {
19 namespace detail {
20 
23  constexpr auto operator()(R&& r, Pred&& pred) const {
24  return drop_while_view<all_t<R>, std::decay_t<Pred>>(std::forward<R>(r), std::forward<Pred>(pred));
25  }
26 
27  template<typename Pred, std::enable_if_t<std::is_object<std::decay_t<Pred>>::value, int> = 0>
28  constexpr auto operator()(Pred&& pred) const {
29  return range_adaptor<drop_while_niebloid, std::decay_t<Pred>>(std::forward<Pred>(pred));
30  }
31 };
32 
33 } // namespace detail
34 
37 
39 
41 
42 } // namespace views
43 } // namespace ranges
44 } // namespace vccc
45 
46 #endif // VCCC_RANGES_VIEWS_DROP_WHILE_HPP
Definition: drop_while_view.hpp:33
Definition: range_adaptor.hpp:25
constexpr VCCC_INLINE_OR_STATIC detail::drop_while_niebloid drop_while
Definition: drop_while.hpp:38
#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
constexpr auto operator()(Pred &&pred) const
Definition: drop_while.hpp:28
constexpr auto operator()(R &&r, Pred &&pred) const
Definition: drop_while.hpp:23