di 0.1.0
Loading...
Searching...
No Matches
di::container::View< Iter, Sent, is_sized > Class Template Reference

#include <di/container/view/view.h>

Inheritance diagram for di::container::View< Iter, Sent, is_sized >:
di::container::ViewInterface< Self > di::meta::EnableBorrowedContainer< Self, should_enable > di::util::AddMemberGet< Self > di::meta::EnableView< Self, should_enable >

Public Member Functions

constexpr View ()=default
constexpr View (concepts::ConvertibleToNonSlicing< Iter > auto iterator, Sent sentinel)
constexpr View (concepts::ConvertibleToNonSlicing< Iter > auto iterator, Sent sentinel, SizeType size)
template<typename Cont>
requires (!concepts::DecaySameAs<Cont, View> && concepts::BorrowedContainer<Cont> && concepts::ConvertibleToNonSlicing<meta::ContainerIterator<Cont>, Iter> && concepts::ConvertibleTo<meta::ContainerSentinel<Cont>, Sent>) (!store_size || concepts::SizedContainer<Cont>)
constexpr View (Cont &&container)
template<concepts::BorrowedContainer Cont>
requires (concepts::ConvertibleToNonSlicing<meta::ContainerIterator<Cont>, Iter> && concepts::ConvertibleTo<meta::ContainerSentinel<Cont>, Sent>) (is_sized)
constexpr View (Cont &&container, SizeType size)
constexpr auto begin () const -> Iter requires(concepts::Copyable< Iter >)
constexpr auto begin () -> Iter requires(!concepts::Copyable< Iter >)
constexpr auto end () const -> Sent
constexpr auto empty () const -> bool
constexpr auto size () const -> SizeType requires(is_sized)
constexpr auto advance (SSizeType n) -> View &
constexpr auto prev (SSizeType n=1) const -> View requires(concepts::BidirectionalIterator< Iter >)
constexpr auto next (SSizeType n=1) const &-> View requires(concepts::ForwardIterator< Iter >)
constexpr auto next (SSizeType n=1) &&-> View
Public Member Functions inherited from di::container::ViewInterface< Self >
constexpr auto empty () -> bool requires(concepts::SizedContainer< Self >||concepts::ForwardContainer< Self >)
constexpr auto empty () const -> bool requires(concepts::SizedContainer< Self const >||concepts::ForwardContainer< Self const >)
constexpr operator bool ()
constexpr operator bool () const
constexpr auto cbegin ()
constexpr auto cbegin () const
constexpr auto cend ()
constexpr auto cend () const
constexpr auto data ()
constexpr auto data () const
constexpr auto size ()
constexpr auto size () const
constexpr auto front ()
constexpr auto front () const
constexpr auto back ()
constexpr auto back () const
template<concepts::RandomAccessContainer Cont = Self>
constexpr auto operator[] (meta::ContainerSSizeType< Cont > n) -> decltype(auto)
template<concepts::RandomAccessContainer Cont = Self const>
constexpr auto operator[] (meta::ContainerSSizeType< Cont > n) const -> decltype(auto)
template<concepts::RandomAccessContainer Cont = Self>
constexpr auto at (meta::ContainerSSizeType< Cont > n) -> Optional< meta::ContainerReference< Cont > >
template<concepts::RandomAccessContainer Cont = Self const>
constexpr auto at (meta::ContainerSSizeType< Cont > n) const -> Optional< meta::ContainerReference< Cont > >
Public Member Functions inherited from di::util::AddMemberGet< Self >
template<types::size_t index>
requires (requires(Self& self) { util::get<index>(self); })
constexpr auto get () &-> decltype(auto)
template<types::size_t index>
requires (requires(Self const& self) { util::get<index>(self); })
constexpr auto get () const &-> decltype(auto)
template<types::size_t index>
requires (requires(Self&& self) { util::get<index>(util::move(self)); })
constexpr auto get () &&-> decltype(auto)
template<types::size_t index>
requires (requires(Self const&& self) { util::get<index>(util::move(self)); })
constexpr auto get () const &&-> decltype(auto)
template<typename T>
requires (requires(Self& self) { util::get<T>(self); })
constexpr auto get () &-> decltype(auto)
template<typename T>
requires (requires(Self const& self) { util::get<T>(self); })
constexpr auto get () const &-> decltype(auto)
template<typename T>
requires (requires(Self&& self) { util::get<T>(util::move(self)); })
constexpr auto get () &&-> decltype(auto)
template<typename T>
requires (requires(Self const&& self) { util::get<T>(util::move(self)); })
constexpr auto get () const &&-> decltype(auto)

Friends

constexpr friend auto tag_invoke (types::Tag< vocab::tuple_element >, types::InPlaceType< View >, Constexpr< 0ZU >) -> InPlaceType< Iter >
constexpr friend auto tag_invoke (types::Tag< vocab::tuple_element >, types::InPlaceType< View >, Constexpr< 1ZU >) -> InPlaceType< Sent >
constexpr friend auto tag_invoke (types::Tag< vocab::tuple_element >, types::InPlaceType< View const >, Constexpr< 0ZU >) -> InPlaceType< Iter const >
constexpr friend auto tag_invoke (types::Tag< vocab::tuple_element >, types::InPlaceType< View const >, Constexpr< 1ZU >) -> InPlaceType< Sent const >
constexpr friend auto tag_invoke (types::Tag< vocab::tuple_size >, types::InPlaceType< View >) -> types::size_t
template<concepts::DecaySameAs< View > Self>
constexpr friend auto tag_invoke (types::Tag< util::get_in_place >, Constexpr< 0ZU >, Self &&self) -> meta::Like< Self, Iter >
template<concepts::DecaySameAs< View > Self>
constexpr friend auto tag_invoke (types::Tag< util::get_in_place >, Constexpr< 1ZU >, Self &&self) -> meta::Like< Self, Sent >
template<concepts::DecaySameAs< View > Self, typename T>
requires (!concepts::SameAs<Iter, Sent> && (concepts::SameAs<T, Iter> || concepts::SameAs<T, Sent>) )
constexpr friend auto tag_invoke (types::Tag< util::get_in_place >, types::InPlaceType< T >, Self &&self) -> decltype(auto)

Constructor & Destructor Documentation

◆ View() [1/5]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
di::container::View< Iter, Sent, is_sized >::View ( )
constexprdefault

◆ View() [2/5]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
di::container::View< Iter, Sent, is_sized >::View ( concepts::ConvertibleToNonSlicing< Iter > auto iterator,
Sent sentinel )
inlineconstexpr

◆ View() [3/5]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
di::container::View< Iter, Sent, is_sized >::View ( concepts::ConvertibleToNonSlicing< Iter > auto iterator,
Sent sentinel,
SizeType size )
inlineconstexpr

◆ View() [4/5]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
template<typename Cont>
requires (!concepts::DecaySameAs<Cont, View> && concepts::BorrowedContainer<Cont> && concepts::ConvertibleToNonSlicing<meta::ContainerIterator<Cont>, Iter> && concepts::ConvertibleTo<meta::ContainerSentinel<Cont>, Sent>) (!store_size || concepts::SizedContainer<Cont>)
di::container::View< Iter, Sent, is_sized >::View ( Cont && container)
inlineconstexpr

◆ View() [5/5]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
template<concepts::BorrowedContainer Cont>
requires (concepts::ConvertibleToNonSlicing<meta::ContainerIterator<Cont>, Iter> && concepts::ConvertibleTo<meta::ContainerSentinel<Cont>, Sent>) (is_sized)
di::container::View< Iter, Sent, is_sized >::View ( Cont && container,
SizeType size )
inlineconstexpr

Member Function Documentation

◆ advance()

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::advance ( SSizeType n) ->View &
inlineconstexpr

◆ begin() [1/2]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::begin ( ) ->Iterrequires(!concepts::Copyable< Iter >)
inlinenodiscardconstexpr

◆ begin() [2/2]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::begin ( ) const->Iterrequires(concepts::Copyable< Iter >)
inlineconstexpr

◆ empty()

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::empty ( ) const->bool
inlineconstexpr

◆ end()

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::end ( ) const->Sent
inlineconstexpr

◆ next() [1/2]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::next ( SSizeType n = 1) &&->View
inlinenodiscardconstexpr

◆ next() [2/2]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::next ( SSizeType n = 1) const &->Viewrequires(concepts::ForwardIterator< Iter >)
inlinenodiscardconstexpr

◆ prev()

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::prev ( SSizeType n = 1) const->Viewrequires(concepts::BidirectionalIterator< Iter >)
inlinenodiscardconstexpr

◆ size()

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
auto di::container::View< Iter, Sent, is_sized >::size ( ) const->SizeTyperequires(is_sized)
inlineconstexpr

◆ tag_invoke [1/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
template<concepts::DecaySameAs< View > Self>
friend auto tag_invoke ( types::Tag< util::get_in_place > ,
Constexpr< 0ZU > ,
Self && self )->meta::Like< Self, Iter >
friend

◆ tag_invoke [2/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
template<concepts::DecaySameAs< View > Self>
friend auto tag_invoke ( types::Tag< util::get_in_place > ,
Constexpr< 1ZU > ,
Self && self )->meta::Like< Self, Sent >
friend

◆ tag_invoke [3/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
template<concepts::DecaySameAs< View > Self, typename T>
requires (!concepts::SameAs<Iter, Sent> && (concepts::SameAs<T, Iter> || concepts::SameAs<T, Sent>) )
friend auto tag_invoke ( types::Tag< util::get_in_place > ,
types::InPlaceType< T > ,
Self && self )->decltype(auto)
friend

◆ tag_invoke [4/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
friend auto tag_invoke ( types::Tag< vocab::tuple_element > ,
types::InPlaceType< View< Iter, Sent, is_sized > > ,
Constexpr< 0ZU >  )->InPlaceType< Iter >
friend

◆ tag_invoke [5/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
friend auto tag_invoke ( types::Tag< vocab::tuple_element > ,
types::InPlaceType< View< Iter, Sent, is_sized > > ,
Constexpr< 1ZU >  )->InPlaceType< Sent >
friend

◆ tag_invoke [6/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
friend auto tag_invoke ( types::Tag< vocab::tuple_element > ,
types::InPlaceType< View< Iter, Sent, is_sized > const > ,
Constexpr< 0ZU >  )->InPlaceType< Iterconst >
friend

◆ tag_invoke [7/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
friend auto tag_invoke ( types::Tag< vocab::tuple_element > ,
types::InPlaceType< View< Iter, Sent, is_sized > const > ,
Constexpr< 1ZU >  )->InPlaceType< Sentconst >
friend

◆ tag_invoke [8/8]

template<concepts::Iterator Iter, concepts::SentinelFor< Iter > Sent = Iter, bool is_sized = concepts::SizedSentinelFor<Sent, Iter>>
friend auto tag_invoke ( types::Tag< vocab::tuple_size > ,
types::InPlaceType< View< Iter, Sent, is_sized > >  )->types::size_t
friend

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