VCCC  2024.05
VisualCamp Common C++ library
subrange< I, S, K > Class Template Reference

#include </home/jarvis/actions-runner/jarvis-vccc-2/_work/vccc/vccc/include/vccc/__ranges/subrange.hpp>

+ Inheritance diagram for subrange< I, S, K >:

Public Member Functions

 subrange ()=default
 
template<typename I2 , std::enable_if_t< conjunction< detail::convertible_to_non_slicing< I2, I >, negation< store_size > >::value, int > = 0>
constexpr subrange (I2 i, S s)
 
template<typename I2 , std::enable_if_t< conjunction< detail::convertible_to_non_slicing< I2, I >, bool_constant< K==subrange_kind::sized > >::value, int > = 0>
constexpr subrange (I2 i, S s, detail::make_unsigned_like_t< iter_difference_t< I >> n)
 
template<typename R , std::enable_if_t< conjunction< detail::different_from< subrange, R >, detail::subrange_ctor_range< I, S, R >, disjunction< negation< store_size >, sized_range< R > > >::value, int > = 0>
constexpr subrange (R &&r)
 
template<typename R , std::enable_if_t< conjunction< detail::subrange_ctor_range< I, S, R >, bool_constant< K==subrange_kind::sized > >::value, int > = 0>
constexpr subrange (R &&r, detail::make_unsigned_like_t< iter_difference_t< I >> n)
 
template<typename PairLike , std::enable_if_t< conjunction< negation< same_as< remove_cvref_t< PairLike >, subrange > >, detail::pair_like_convertible_from< PairLike, const I &, const S & > >::value, int > = 0>
constexpr operator PairLike () const
 
template<typename I2 = I, std::enable_if_t< copyable< I2 >::value, int > = 0>
constexpr I begin () const
 
template<typename I2 = I, std::enable_if_t< copyable< I2 >::value==false, int > = 0>
constexpr VCCC_NODISCARDbegin ()
 
constexpr S end () const
 
constexpr bool empty () const
 
template<subrange_kind K2 = K, std::enable_if_t< conjunction< bool_constant< K2==subrange_kind::sized >, sized_sentinel_for< S, I > >::value, int > = 0>
constexpr detail::make_unsigned_like_t< iter_difference_t< I > > size () const
 
template<subrange_kind K2 = K, std::enable_if_t< conjunction< bool_constant< K2==subrange_kind::sized >, negation< sized_sentinel_for< S, I > > >::value, int > = 0>
constexpr detail::make_unsigned_like_t< iter_difference_t< I > > size () const
 
constexpr subrangeadvance (iter_difference_t< I > n)
 
template<typename I2 = I, std::enable_if_t< bidirectional_iterator< I2 >::value, int > = 0>
constexpr VCCC_NODISCARD subrange_kind prev (iter_difference_t< I > n=1) const
 
template<typename I2 = I, std::enable_if_t< forward_iterator< I2 >::value, int > = 0>
constexpr VCCC_NODISCARD subrange_kind next (iter_difference_t< I > n=1) const &
 
template<typename I2 = I, std::enable_if_t< forward_iterator< I2 >::value, int > = 0>
constexpr VCCC_NODISCARD subrange_kind next (iter_difference_t< I > n=1) &&
 
- Public Member Functions inherited from view_interface< subrange< I, I, sized_sentinel_for< I, I >::value ? subrange_kind::sized :subrange_kind::unsized > >
constexpr bool empty ()
 
constexpr bool empty ()
 
constexpr bool empty () const
 
constexpr bool empty () const
 
constexpr auto cbegin ()
 
constexpr auto cbegin () const
 
constexpr auto cend ()
 
constexpr auto cend () const
 
constexpr operator bool ()
 
constexpr operator bool () const
 
constexpr auto data ()
 
constexpr auto data () const
 
constexpr auto size ()
 
constexpr auto size () const
 
constexpr decltype(auto) front ()
 
constexpr decltype(auto) front () const
 
constexpr decltype(auto) back ()
 
constexpr decltype(auto) back () const
 
constexpr decltype(auto) operator[] (range_difference_t< R > n)
 
constexpr decltype(auto) operator[] (range_difference_t< R > n) const
 

Additional Inherited Members

- Public Types inherited from view_interface< subrange< I, I, sized_sentinel_for< I, I >::value ? subrange_kind::sized :subrange_kind::unsized > >
using $vccc_derived = subrange< I, I, sized_sentinel_for< I, I >::value ? subrange_kind::sized :subrange_kind::unsized >
 

Constructor & Destructor Documentation

◆ subrange() [1/5]

subrange ( )
default

◆ subrange() [2/5]

constexpr subrange ( I2  i,
s 
)
inlineconstexpr

◆ subrange() [3/5]

constexpr subrange ( I2  i,
s,
detail::make_unsigned_like_t< iter_difference_t< I >>  n 
)
inlineconstexpr

◆ subrange() [4/5]

constexpr subrange ( R &&  r)
inlineconstexpr

◆ subrange() [5/5]

constexpr subrange ( R &&  r,
detail::make_unsigned_like_t< iter_difference_t< I >>  n 
)
inlineconstexpr

Member Function Documentation

◆ advance()

constexpr subrange& advance ( iter_difference_t< I >  n)
inlineconstexpr

◆ begin() [1/2]

constexpr VCCC_NODISCARD I begin ( )
inlineconstexpr

◆ begin() [2/2]

constexpr I begin ( ) const
inlineconstexpr

◆ empty()

constexpr bool empty ( ) const
inlineconstexpr

◆ end()

constexpr S end ( ) const
inlineconstexpr

◆ next() [1/2]

constexpr VCCC_NODISCARD subrange_kind next ( iter_difference_t< I >  n = 1) &&
inlineconstexpr

◆ next() [2/2]

constexpr VCCC_NODISCARD subrange_kind next ( iter_difference_t< I >  n = 1) const &
inlineconstexpr

◆ operator PairLike()

constexpr operator PairLike ( ) const
inlineconstexpr

◆ prev()

constexpr VCCC_NODISCARD subrange_kind prev ( iter_difference_t< I >  n = 1) const
inlineconstexpr

◆ size() [1/2]

constexpr detail::make_unsigned_like_t<iter_difference_t<I> > size ( ) const
inlineconstexpr

◆ size() [2/2]

constexpr detail::make_unsigned_like_t<iter_difference_t<I> > size ( ) const
inlineconstexpr

The documentation for this class was generated from the following file: