std::ranges::subrange< _It, _Sent, _Kind >(3cxx) | std::ranges::subrange< _It, _Sent, _Kind >(3cxx) |
NAME¶
std::ranges::subrange< _It, _Sent, _Kind > - The ranges::subrange class template.
SYNOPSIS¶
#include <ranges>
Inherits std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >.
Public Member Functions¶
constexpr subrange
(__detail::__convertible_to_non_slicing< _It > auto __i, _Sent __s)
noexcept(is_nothrow_constructible_v< _It, decltype(__i)>
&&is_nothrow_constructible_v< _Sent, _Sent & >)
constexpr subrange (__detail::__convertible_to_non_slicing< _It >
auto __i, _Sent __s, __size_type __n)
noexcept(is_nothrow_constructible_v< _It, decltype(__i)>
&&is_nothrow_constructible_v< _Sent, _Sent & >)
template<__detail::__different_from< subrange > _Rng>
requires borrowed_range<_Rng> &&
__detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It>
&& convertible_to<sentinel_t<_Rng>, _Sent>constexpr
subrange (_Rng &&__r) noexcept(noexcept(subrange(__r,
ranges::size(__r)))) _S_store_size &&sized_range< _Rng >"
template<__detail::__different_from< subrange > _Rng>
requires borrowed_range<_Rng> &&
__detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It>
&& convertible_to<sentinel_t<_Rng>, _Sent>
(!_S_store_size)constexpr subrange (_Rng &&__r)
noexcept(noexcept(subrange(ranges::begin(__r),
ranges::end(__r))))"
template<borrowed_range _Rng>
requires __detail::__convertible_to_non_slicing<iterator_t<_Rng>,
_It> && convertible_to<sentinel_t<_Rng>, _Sent>
(_Kind == subrange_kind::sized)constexpr subrange (_Rng
&&__r, __size_type __n)
noexcept(noexcept(subrange(ranges::begin(__r), ranges::end(__r),
__n)))"
constexpr subrange & advance (iter_difference_t< _It >
__n)
constexpr decltype(auto) back ()
constexpr decltype(auto) back () const
constexpr _It begin ()
constexpr _It begin () const
constexpr auto data () const
noexcept(noexcept(ranges::begin(_M_derived())))
constexpr auto data () noexcept(noexcept(ranges::begin(_M_derived())))
constexpr bool empty () const
constexpr bool empty () noexcept(noexcept(_S_empty(_M_derived())))
constexpr _Sent end () const
constexpr decltype(auto) front ()
constexpr decltype(auto) front () const
constexpr subrange next (iter_difference_t< _It > __n=1)
&&
constexpr subrange next (iter_difference_t< _It > __n=1)
const &
template<__detail::__different_from< subrange > _PairLike>
requires __detail::__pair_like_convertible_from<_PairLike, const _It&,
const _Sent&>constexpr operator _PairLike () const"
constexpr operator bool () const
noexcept(noexcept(ranges::empty(_M_derived())))
constexpr operator bool ()
noexcept(noexcept(ranges::empty(_M_derived())))
constexpr decltype(auto) operator[] (range_difference_t< _Range >
__n)
constexpr decltype(auto) operator[] (range_difference_t< _Range >
__n) const
constexpr subrange prev (iter_difference_t< _It > __n=1)
const
constexpr __size_type size () const
constexpr auto size () noexcept(noexcept(_S_size(_M_derived())))
Friends¶
struct views::_Drop
Detailed Description¶
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized>¶
requires (_Kind == subrange_kind::sized ||
!sized_sentinel_for<_Sent, _It>)
class std::ranges::subrange< _It, _Sent, _Kind >"The
ranges::subrange class template.
Definition at line 228 of file ranges.
Constructor & Destructor Documentation¶
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr std::ranges::subrange< _It, _Sent, _Kind >::subrange (__detail::__convertible_to_non_slicing< _It > auto __i, _Sent __s) [inline], [constexpr], [noexcept]¶
Definition at line 256 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr std::ranges::subrange< _It, _Sent, _Kind >::subrange (__detail::__convertible_to_non_slicing< _It > auto __i, _Sent __s, __size_type __n) [inline], [constexpr], [noexcept]¶
Definition at line 264 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> template<__detail::__different_from< subrange > _Rng> ¶
requires borrowed_range<_Rng> && __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It> && convertible_to<sentinel_t<_Rng>, _Sent>constexpr std::ranges::subrange< _It, _Sent, _Kind >::subrange (_Rng && __r) && [inline], [constexpr], [noexcept]"
Definition at line 280 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> template<__detail::__different_from< subrange > _Rng> ¶
requires borrowed_range<_Rng> && __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It> && convertible_to<sentinel_t<_Rng>, _Sent> (!_S_store_size)constexpr std::ranges::subrange< _It, _Sent, _Kind >::subrange (_Rng && __r) [inline], [constexpr], [noexcept]"
Definition at line 291 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> template<borrowed_range _Rng> ¶
requires __detail::__convertible_to_non_slicing<iterator_t<_Rng>, _It> && convertible_to<sentinel_t<_Rng>, _Sent> (_Kind == subrange_kind::sized)constexpr std::ranges::subrange< _It, _Sent, _Kind >::subrange (_Rng && __r, __size_type __n) [inline], [constexpr], [noexcept]"
Definition at line 301 of file ranges.
Member Function Documentation¶
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr subrange & std::ranges::subrange< _It, _Sent, _Kind >::advance (iter_difference_t< _It > __n) [inline], [constexpr]¶
Definition at line 361 of file ranges.
constexpr decltype(auto) std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::back () [inline], [constexpr], [inherited]¶
Definition at line 158 of file ranges.
constexpr decltype(auto) std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::back () const [inline], [constexpr], [inherited]¶
Definition at line 166 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr _It std::ranges::subrange< _It, _Sent, _Kind >::begin () [inline], [constexpr]¶
Definition at line 319 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr _It std::ranges::subrange< _It, _Sent, _Kind >::begin () const [inline], [constexpr]¶
Definition at line 315 of file ranges.
constexpr auto std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::data () const [inline], [constexpr], [noexcept], [inherited]¶
Definition at line 125 of file ranges.
constexpr auto std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::data () [inline], [constexpr], [noexcept], [inherited]¶
Definition at line 120 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr bool std::ranges::subrange< _It, _Sent, _Kind >::empty () const [inline], [constexpr]¶
Definition at line 324 of file ranges.
constexpr bool std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::empty () [inline], [constexpr], [noexcept], [inherited]¶
Definition at line 98 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr _Sent std::ranges::subrange< _It, _Sent, _Kind >::end () const [inline], [constexpr]¶
Definition at line 322 of file ranges.
constexpr decltype(auto) std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::front () [inline], [constexpr], [inherited]¶
Definition at line 144 of file ranges.
constexpr decltype(auto) std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::front () const [inline], [constexpr], [inherited]¶
Definition at line 151 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr subrange std::ranges::subrange< _It, _Sent, _Kind >::next (iter_difference_t< _It > __n = 1) && [inline], [constexpr]¶
Definition at line 345 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr subrange std::ranges::subrange< _It, _Sent, _Kind >::next (iter_difference_t< _It > __n = 1) const & [inline], [constexpr]¶
Definition at line 336 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> template<__detail::__different_from< subrange > _PairLike> ¶
requires __detail::__pair_like_convertible_from<_PairLike, const _It&, const _Sent&>constexpr std::ranges::subrange< _It, _Sent, _Kind >::operator _PairLike () const [inline], [constexpr]"
Definition at line 311 of file ranges.
constexpr std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::operator bool () const [inline], [explicit], [constexpr], [noexcept], [inherited]¶
Definition at line 115 of file ranges.
constexpr std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::operator bool () [inline], [explicit], [constexpr], [noexcept], [inherited]¶
Definition at line 110 of file ranges.
constexpr decltype(auto) std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::operator[] (range_difference_t< _Range > __n) [inline], [constexpr], [inherited]¶
Definition at line 176 of file ranges.
constexpr decltype(auto) std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::operator[] (range_difference_t< _Range > __n) const [inline], [constexpr], [inherited]¶
Definition at line 181 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr subrange std::ranges::subrange< _It, _Sent, _Kind >::prev (iter_difference_t< _It > __n = 1) const [inline], [constexpr]¶
Definition at line 352 of file ranges.
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> constexpr __size_type std::ranges::subrange< _It, _Sent, _Kind >::size () const [inline], [constexpr]¶
Definition at line 327 of file ranges.
constexpr auto std::ranges::view_interface< subrange< _It, _It, sized_sentinel_for< _It, _It > ? subrange_kind::sized :subrange_kind::unsized > >::size () [inline], [constexpr], [noexcept], [inherited]¶
Definition at line 131 of file ranges.
Friends And Related Function Documentation¶
template<input_or_output_iterator _It, sentinel_for< _It > _Sent = _It, subrange_kind _Kind = sized_sentinel_for<_Sent, _It> ? subrange_kind::sized : subrange_kind::unsized> friend struct views::_Drop [friend]¶
Definition at line 234 of file ranges.
Author¶
Generated automatically by Doxygen for libstdc++ from the source code.
Sun Jan 8 2023 | libstdc++ |