Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::common_view< Rng, bool > Struct Template Reference
+ Inheritance diagram for ranges::common_view< Rng, bool >:

Public Member Functions

Rng base () const
 
detail::common_view_iterator_t< Rng > begin ()
 
template<bool Const = true>
requires range< meta::const_if_c< Const, Rng > > auto begin () const -> detail::common_view_iterator_t< meta::const_if_c< Const, Rng >>
 
 common_view (Rng rng)
 
detail::common_view_iterator_t< Rng > end ()
 
template<bool Const = true>
requires range< meta::const_if_c< Const, Rng > > auto end () const -> detail::common_view_iterator_t< meta::const_if_c< Const, Rng >>
 
auto size () const requires ` sized_range< Rng const > `
 
auto size () requires ` sized_range< Rng > `
 
- Public Member Functions inherited from ranges::view_interface< common_view< Rng >, range_cardinality< Rng >::value >
constexpr auto empty () const noexcept -> bool requires `(detail::has_fixed_size_< Cardinality >) `
 Test whether a range can be empty:
 
view_interfaceoperator= (view_interface &&)=default
 
view_interfaceoperator= (view_interface const &)=default
 
 view_interface (view_interface &&)=default
 
 view_interface (view_interface const &)=default
 

Additional Inherited Members

- Public Attributes inherited from ranges::view_interface< common_view< Rng >, range_cardinality< Rng >::value >
requires True &&Cardinality< 0) &&(Cardinality !=infinite) &&(!forward_range< D< True >>) &&sized_range< D< True > >` constexpr bool empty() noexcept(noexcept(bool(ranges::size(std::declval< D< True > & >))==0))) { return ranges::size(derived())==0;} template< bool True=true > requires ` True &&(Cardinality< 0) &&(Cardinality !=infinite) &&(!forward_range< D< True > const >) &&sized_range< D< True > const >` constexpr bool empty() const noexcept(noexcept(bool(ranges::size(std::declval< D< True > const & >))==0))) { return ranges::size(derived())==0;} template< bool True=true > requires ` True &&(!detail::has_fixed_size_< Cardinality >) &&forward_range< D< True > >` constexpr bool empty() noexcept(noexcept(bool(ranges::begin(std::declval< D< True > & >))==ranges::end(std::declval< D< True > & >))))) { return bool(ranges::begin(derived())==ranges::end(derived()));} template< bool True=true > requires ` True &&(!detail::has_fixed_size_< Cardinality >) &&forward_range< D< True > const >` constexpr bool empty() const noexcept(noexcept(bool(ranges::begin(std::declval< D< True > const & >))==ranges::end(std::declval< D< True > const & >))))) { return bool(ranges::begin(derived())==ranges::end(derived()));} template< bool True=true > requires ` True &&detail::can_empty_< D< True > >` constexpr explicit operator bool() noexcept(noexcept(ranges::empty(std::declval< D< True > & >)))) { return !ranges::empty(derived());} template< bool True=true > requires ` True &&detail::can_empty_< D< True > const >` constexpr explicit operator bool() const noexcept(noexcept(ranges::empty(std::declval< D< True > const & >)))) { return !ranges::empty(derived());} template< bool True=true, int=42 > requires ` True &&(Cardinality >=0)` static constexpr std::size_t size() noexcept { return static_cast< std::size_t >Cardinality);} template< bool True=true > requires ` True &&(Cardinality< 0) &&sized_sentinel_for< sentinel_t< D< True > >, iterator_t< D< True > > > &&forward_range< D< True > >` constexpr detail::iter_size_t< iterator_t< D< True > > > size() { using size_type=detail::iter_size_t< iterator_t< D< True > > >;return static_cast< size_type >derived().end() - derived().begin());} template< bool True=true > requires ` True &&(Cardinality< 0) &&sized_sentinel_for< sentinel_t< D< True > const >, iterator_t< D< True > const > > &&forward_range< D< True > const >` constexpr detail::iter_size_t< iterator_t< D< True > > > size() const { using size_type=detail::iter_size_t< iterator_t< D< True > > >;return static_cast< size_type >derived().end() - derived().begin());} template< bool True=true > requires ` True &&forward_range< D< True > >` constexpr range_reference_t< D< True > > front() { return *derived().begin();} template< bool True=true > requires ` True &&forward_range< D< True > const >` constexpr range_reference_t< D< True > const > front() const { return *derived().begin();} template< bool True=true > requires ` True &&common_range< D< True > > &&bidirectional_range< D< True > >` constexpr range_reference_t< D< True > > back() { return *prev(derived().end());} template< bool True=true > requires ` True &&common_range< D< True > const > &&bidirectional_range< D< True > const >` constexpr range_reference_t< D< True > const > back() const { return *prev(derived().end());} template< bool True=true > requires ` True &&random_access_range< D< True > >` constexpr range_reference_t< D< True > > operator[](range_difference_t< D< True >> n) { return derived().begin()[n];} template< bool True=true > requires ` True &&random_access_range< D< True > const >` constexpr range_reference_t< D< True > const > operator[](range_difference_t< D< True >> n) const { return derived().begin()[n];} template< bool True=true > requires ` True &&contiguous_iterator< iterator_t< D< True > > >` constexpr std::add_pointer_t< range_reference_t< D< True > > > data() { return std::addressof(*ranges::begin(derived()));} template< bool True=true > requires ` True &&contiguous_iterator< iterator_t< D< True > const > >` constexpr std::add_pointer_t< range_reference_t< D< True > const > > data() const { return std::addressof(*ranges::begin(derived()));} template< bool True=true > requires ` True &&random_access_range< D< True > > &&sized_range< D< True > >` constexpr range_reference_t< D< True > > at(range_difference_t< D< True >> n) { using size_type=range_size_t< common_view< Rng > >;if(n< 0||size_type(n) >=ranges::size(derived())) { throw std::out_of_range("view_interface::at");} return derived().begin()[n];} template< bool True=true > requires ` True &&random_access_range< D< True > const > &&sized_range< D< True > const >` constexpr range_reference_t< D< True > const > at(range_difference_t< D< True >> n) const { using size_type=range_size_t< common_view< Rng > const >;if(n< 0||size_type(n) >=ranges::size(derived())) { throw std::out_of_range("view_interface::at");} return derived().begin()[n];} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > & >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>> offs) &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > const & >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>> offs) const &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>> offs) &&{ return Slice{}(detail::move(derived()), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > & > &&sized_range< D< True > & >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>, detail::from_end_of_t< D< True >>> offs) &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > const & > &&sized_range< D< True > const & >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>, detail::from_end_of_t< D< True >>> offs) const &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > > &&sized_range< D< True > >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>, detail::from_end_of_t< D< True >>> offs) &&{ return Slice{}(detail::move(derived()), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&(forward_range< D< True > & >||(input_range< D< True > & > &&sized_range< D< True > & >))` constexpr auto operator[](detail::slice_bounds< detail::from_end_of_t< D< True >>, detail::from_end_of_t< D< True >>> offs) &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&(forward_range< D< True > const & >||(input_range< D< True > const & > &&sized_range< D< True > const & >))` constexpr auto operator[](detail::slice_bounds< detail::from_end_of_t< D< True >>, detail::from_end_of_t< D< True >>> offs) const &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&(forward_range< D< True >>||(input_range< D< True >> &&sized_range< D< True >>))` constexpr auto operator[](detail::slice_bounds< detail::from_end_of_t< D< True >>, detail::from_end_of_t< D< True >>> offs) &&{ return Slice{}(detail::move(derived()), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > & >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>, end_fn > offs) &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > const & >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>, end_fn > offs) const &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&input_range< D< True > >` constexpr auto operator[](detail::slice_bounds< range_difference_t< D< True >>, end_fn > offs) &&{ return Slice{}(detail::move(derived()), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&(forward_range< D< True > & >||(input_range< D< True > & > &&sized_range< D< True > & >))` constexpr auto operator[](detail::slice_bounds< detail::from_end_of_t< D< True >>, end_fn > offs) &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&(forward_range< D< True > const & >||(input_range< D< True > const & > &&sized_range< D< True > const & >))` constexpr auto operator[](detail::slice_bounds< detail::from_end_of_t< D< True >>, end_fn > offs) const &{ return Slice{}(derived(), offs.from, offs.to);} template< bool True=true, typename Slice=views::slice_fn > requires ` True &&(forward_range< D< True >>||(input_range< D< True >> &&sized_range< D< True >>))` constexpr auto operator[](detail::slice_bounds< detail::from_end_of_t< D< True >>, end_fn > offs) &&{ return Slice{}(detail::move(derived()), offs.from, offs.to);} private:template< bool True=true > friend auto operator<<(std::ostream &sout, common_view< Rng > const &rng) -> std::ostream &requires True && input_range< D< True > const >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
- Protected Types inherited from ranges::view_interface< common_view< Rng >, range_cardinality< Rng >::value >
using D = meta::invoke< detail::dependent_< B >, common_view< Rng > >
 
- Protected Member Functions inherited from ranges::view_interface< common_view< Rng >, range_cardinality< Rng >::value >
constexpr common_view< Rng > const & derived () const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
constexpr common_view< Rng > & derived () noexcept