Range-v3
Range algorithms, views, and actions for the Standard Library
Utility

Description

Utility classes.

Modules

 Concepts
 Concept-checking classes and utilities.
 

Namespaces

 ranges::v3::CPOs
 

Classes

struct  ranges::v3::aux::move_fn
 
struct  ranges::v3::back_insert_iterator< Container >
 
struct  ranges::v3::back_inserter_fn
 
struct  ranges::v3::basic_common_reference< T, U, TQual, UQual >
 Users can specialize this to hook the CommonReference concept. More...
 
struct  ranges::v3::basic_iterator< Cur >
 
struct  ranges::v3::basic_mixin< T >
 
struct  ranges::v3::bind_element< T >
 
struct  ranges::v3::bind_element< reference_wrapper< T > >
 
struct  ranges::v3::bind_element< std::reference_wrapper< T > >
 
struct  ranges::v3::bitwise_or
 
class  ranges::v3::box< Element, Tag, box_compress >
 
class  ranges::v3::box< Element, Tag, detail::box_compress::coalesce >
 
class  ranges::v3::box< Element, Tag, detail::box_compress::ebo >
 
struct  ranges::v3::coerce< T >
 
struct  ranges::v3::coerce< T & >
 
struct  ranges::v3::coerce< T && >
 
struct  ranges::v3::coerce< T const >
 
struct  ranges::v3::common_reference< Ts >
 Users can specialize this to hook the CommonReference concept. More...
 
struct  ranges::v3::common_reference< T >
 
struct  ranges::v3::common_reference< T, U >
 
struct  ranges::v3::common_reference< T, U, Vs... >
 
struct  ranges::v3::common_type< Ts >
 Users should specialize this to hook the Common concept until std gets a SFINAE-friendly std::common_type and there's some sane way to deal with cv and ref qualifiers. More...
 
struct  ranges::v3::common_type< T >
 
struct  ranges::v3::common_type< T, U >
 
struct  ranges::v3::common_type< T, U, Vs... >
 
struct  ranges::v3::compose_fn
 
struct  ranges::v3::composed< Second, First >
 
struct  ranges::v3::constant< T, v >
 
struct  ranges::v3::convert_to< T >
 
struct  ranges::v3::dereference_fn
 
struct  ranges::v3::equal_to
 
struct  ranges::v3::front_insert_iterator< Container >
 
struct  ranges::v3::front_inserter_fn
 
struct  ranges::v3::get_cursor_fn
 Get a cursor from a basic_iterator. More...
 
struct  ranges::v3::ident
 
struct  ranges::v3::in_place_t
 
struct  ranges::v3::indirect_fn
 
struct  ranges::v3::indirected< Fn >
 
struct  ranges::v3::insert_iterator< Container >
 
struct  ranges::v3::inserter_fn
 
struct  ranges::v3::invoke_fn
 
struct  ranges::v3::invoke_result< Fun, Args >
 
struct  ranges::v3::is_indirectly_swappable< T, U >
 
struct  ranges::v3::is_nothrow_indirectly_swappable< T, U >
 
struct  ranges::v3::is_nothrow_swappable< T >
 
struct  ranges::v3::is_nothrow_swappable_with< T, U >
 
struct  ranges::v3::is_pipeable< T >
 
struct  ranges::v3::is_pipeable< T & >
 
struct  ranges::v3::is_reference_wrapper< T >
 
struct  ranges::v3::is_reference_wrapper< reference_wrapper< T > >
 
struct  ranges::v3::is_reference_wrapper< std::reference_wrapper< T > >
 
struct  ranges::v3::is_swappable< T >
 
struct  ranges::v3::is_swappable_with< T, U >
 
struct  ranges::v3::iter_distance_compare_fn
 
struct  ranges::v3::iter_distance_fn
 
struct  ranges::v3::iter_enumerate_fn
 
struct  ranges::v3::iter_size_fn
 
struct  ranges::v3::iterator_category< iterator_wrapper< I > >
 
struct  ranges::v3::iterator_wrapper< I >
 
struct  ranges::v3::less
 
struct  ranges::v3::logical_negate_< FD >
 
struct  ranges::v3::make_move_iterator_fn
 
struct  ranges::v3::make_move_sentinel_fn
 
struct  ranges::v3::make_ostream_joiner_fn
 
struct  ranges::v3::make_pipeable_fn
 
struct  ranges::v3::make_reverse_iterator_fn
 
struct  ranges::v3::make_tuple_fn
 
struct  ranges::v3::minus
 
struct  ranges::v3::move_into_fn
 
struct  ranges::v3::move_iterator< I >
 
struct  ranges::v3::move_sentinel< S >
 
struct  ranges::v3::multiplies
 
struct  ranges::v3::mutable_< T >
 
struct  ranges::v3::next_fn
 
struct  ranges::v3::not_equal_to
 
struct  ranges::v3::not_fn_fn
 
struct  ranges::v3::on_fn
 
struct  ranges::v3::ordered_less
 
struct  ranges::v3::ostream_iterator< T, Char, Traits >
 
struct  ranges::v3::ostream_joiner< Delim, Char, Traits >
 
struct  ranges::v3::ostreambuf_iterator< Char, Traits >
 
struct  ranges::v3::overload_fn
 
struct  ranges::v3::overloaded< First, Rest... >
 
struct  ranges::v3::overloaded<>
 
struct  ranges::v3::pipeable< Derived >
 
struct  ranges::v3::pipeable_access
 
struct  ranges::v3::pipeable_base
 
struct  ranges::v3::plus
 
struct  ranges::v3::prev_fn
 
struct  ranges::v3::protect_fn
 
struct  ranges::v3::raw_buffer< Val >
 
struct  ranges::v3::raw_storage_iterator< O, Val >
 
struct  ranges::v3::ref_fn
 
struct  ranges::v3::reference_wrapper< T >
 
struct  ranges::v3::result_of< Sig >
 
struct  ranges::v3::result_of< Fun(Args...)>
 
struct  ranges::v3::semiregular< T >
 
struct  ranges::v3::semiregular< T & >
 
struct  ranges::v3::semiregular< T && >
 
struct  ranges::v3::static_const< T >
 
struct  ranges::v3::transformed< Fn1, Fn2 >
 
struct  ranges::v3::tuple_apply_fn
 
struct  ranges::v3::tuple_foldl_fn
 
struct  ranges::v3::tuple_for_each_fn
 
struct  ranges::v3::tuple_transform_fn
 
struct  ranges::v3::unreachable
 
struct  ranges::v3::unwrap_reference_fn
 
struct  ranges::v3::value_type< iterator_wrapper< I > >
 
struct  ranges::v3::with_braced_init_args< ImplFn >
 

Typedefs

template<typename T >
using ranges::v3::bind_element_t = meta::_t< bind_element< T > >
 
template<typename Fun , typename... Args>
using ranges::v3::invoke_result_t = decltype(invoke(std::declval< Fun >(), std::declval< Args >()...))
 
template<typename T >
using ranges::v3::is_reference_wrapper_t = meta::_t< is_reference_wrapper< T > >
 
template<typename Pred >
using ranges::v3::logical_negate = logical_negate_< detail::decay_t< Pred > >
 
template<typename R >
using ranges::v3::aux::move_t = meta::if_< std::is_reference< R >, meta::_t< std::remove_reference< R > > &&, detail::decay_t< R > >
 
template<typename T >
using ranges::v3::movesemiregular_t = meta::if_c< Movable< T >() &&DefaultConstructible< T >(), T, semiregular< T > >
 
template<typename T >
using ranges::v3::ref_t = decltype(ref(std::declval< T >()))
 
using ranges::v3::reference_wrapper< T >::reference = meta::if_< std::is_reference< T >, T, T & >
 
template<typename T , bool IsConst = false>
using ranges::v3::semiregular_ref_or_val_t = meta::if_< SemiRegular< T >, meta::if_c< IsConst, T, reference_wrapper< T > >, reference_wrapper< meta::if_c< IsConst, semiregular< T > const, semiregular< T > >> >
 
template<typename T >
using ranges::v3::semiregular_t = meta::if_< SemiRegular< T >, T, semiregular< T > >
 
template<typename Tup >
using ranges::v3::tuple_indices_t = meta::make_index_sequence< std::tuple_size< typename std::remove_reference< Tup >::type >::value >
 
using ranges::v3::reference_wrapper< T >::type = meta::_t< std::remove_reference< T > >
 
template<typename T >
using ranges::v3::unwrap_reference_t = decltype(unwrap_reference(std::declval< T >()))
 

Functions

template<typename T >
constexpr T * ranges::v3::_nullptr_v ()
 
template<typename T , typename U = meta::if_< std::is_lvalue_reference<T>, std::reference_wrapper<meta::_t<std::remove_reference<T>>>, T &&>>
ranges::v3::bind_forward (meta::_t< std::remove_reference< T >> &t) noexcept
 
template<typename T >
T && ranges::v3::bind_forward (meta::_t< std::remove_reference< T >> &&t) noexcept
 
template<typename T >
T & ranges::v3::get (meta::id_t< T > &value)
 
template<typename T >
T const & ranges::v3::get (meta::id_t< T > const &value)
 
template<typename T >
T && ranges::v3::get (meta::id_t< T > &&value)
 
constexpr reference ranges::v3::reference_wrapper< T >::get () const noexcept
 
template<typename T >
auto ranges::v3::get (meta::id_t< semiregular< T >> &t) noexcept(noexcept(decltype(t.get())(t.get()))) -> decltype(t.get())
 
template<typename T >
auto ranges::v3::get (meta::id_t< semiregular< T >> const &t) noexcept(noexcept(decltype(t.get())(t.get()))) -> decltype(t.get())
 
template<typename T >
auto ranges::v3::get (meta::id_t< semiregular< T >> &&t) noexcept(noexcept(decltype(detail::move(t).get())(detail::move(t).get()))) -> decltype(detail::move(t).get())
 
template<typename Tag , typename Element , detail::box_compress BC>
Elementranges::v3::get (box< Element, Tag, BC > &b) noexcept
 
template<typename Tag , typename Element , detail::box_compress BC>
constexpr Element const & ranges::v3::get (box< Element, Tag, BC > const &b) noexcept
 
template<typename Tag , typename Element , detail::box_compress BC>
Element && ranges::v3::get (box< Element, Tag, BC > &&b) noexcept
 
template<std::size_t I, typename Element , detail::box_compress BC>
Elementranges::v3::get (box< Element, meta::size_t< I >, BC > &b) noexcept
 
template<std::size_t I, typename Element , detail::box_compress BC>
constexpr Element const & ranges::v3::get (box< Element, meta::size_t< I >, BC > const &b) noexcept
 
template<std::size_t I, typename Element , detail::box_compress BC>
Element && ranges::v3::get (box< Element, meta::size_t< I >, BC > &&b) noexcept
 
template<typename I , requires = (Iterator<I>())>
iterator_wrapper< I > ranges::v3::iter_ref (I &i)
 
template<typename Val >
raw_buffer< Val > ranges::v3::make_raw_buffer (Val *val)
 
constexpr ranges::v3::reference_wrapper< T >::operator reference () const noexcept
 
 ranges::v3::reference_wrapper< T >::operator std::reference_wrapper< type > () const noexcept
 
template<typename I1 , typename I2 , requires = (EqualityComparable<I1, I2>())>
bool ranges::v3::operator!= (move_iterator< I1 > const &x, move_iterator< I2 > const &y)
 
template<typename I , typename S , requires = (Sentinel<S, I>())>
bool ranges::v3::operator!= (move_iterator< I > const &i, move_sentinel< S > const &s)
 
template<typename I , typename S , requires = (Sentinel<S, I>())>
bool ranges::v3::operator!= (move_sentinel< S > const &s, move_iterator< I > const &i)
 
template<typename F , typename Obj , typename First , typename... Rest, meta::if_c< detail::is_function< F >::value, int > = 0>
constexpr auto ranges::v3::invoke_fn::operator() (F Obj::*ptr, First &&first, Rest &&... rest) const noexcept(noexcept(decltype(invoke_member_fn(std::is_base_of< Obj, detail::decay_t< First >>{}, is_reference_wrapper_t< detail::decay_t< First >>{}, ptr, static_cast< First &&>(first), static_cast< Rest &&>(rest)...))(invoke_member_fn(std::is_base_of< Obj, detail::decay_t< First >>{}, is_reference_wrapper_t< detail::decay_t< First >>{}, ptr, static_cast< First &&>(first), static_cast< Rest &&>(rest)...)))) -> decltype(invoke_member_fn(std::is_base_of< Obj, detail::decay_t< First >>
 
template<typename Data , typename Obj , typename First , meta::if_c<!detail::is_function< Data >::value, int > = 0>
constexpr auto ranges::v3::invoke_fn::operator() (Data Obj::*ptr, First &&first) const noexcept(noexcept(decltype(invoke_member_data(std::is_base_of< Obj, detail::decay_t< First >>{}, is_reference_wrapper_t< detail::decay_t< First >>{}, ptr, static_cast< First &&>(first)))(invoke_member_data(std::is_base_of< Obj, detail::decay_t< First >>{}, is_reference_wrapper_t< detail::decay_t< First >>{}, ptr, static_cast< First &&>(first))))) -> decltype(invoke_member_data(std::is_base_of< Obj, detail::decay_t< First >>
 
template<typename F , typename... Args, meta::if_c<!std::is_member_pointer< uncvref_t< F >>::value, int > = 0>
constexpr auto ranges::v3::invoke_fn::operator() (F &&fn, Args &&... args) const noexcept(noexcept(decltype(static_cast< F &&>(fn)(static_cast< Args &&>(args)...))(static_cast< F &&>(fn)(static_cast< Args &&>(args)...)))) -> decltype(static_cast< F &&>(fn)(static_cast< Args &&>(args)...))
 
template<typename ... Args>
constexpr auto ranges::v3::reference_wrapper< T >::operator() (Args &&...args) const noexcept(noexcept(decltype(invoke(std::declval< reference >(), std::declval< Args >()...))(invoke(std::declval< reference >(), std::declval< Args >()...)))) -> decltype(invoke(std::declval< reference >(), std::declval< Args >()...))
 
template<typename I , requires = (RandomAccessIterator<I>())>
move_iterator< I > ranges::v3::operator+ (difference_type_t< I > n, move_iterator< I > const &x)
 
template<typename I1 , typename I2 , requires = (SizedSentinel<I1, I2>())>
difference_type_t< I2 > ranges::v3::operator- (move_iterator< I1 > const &x, move_iterator< I2 > const &y)
 
template<typename I1 , typename I2 , requires = (TotallyOrdered<I1, I2>())>
bool ranges::v3::operator< (move_iterator< I1 > const &x, move_iterator< I2 > const &y)
 
template<typename I1 , typename I2 , requires = (TotallyOrdered<I1, I2>())>
bool ranges::v3::operator<= (move_iterator< I1 > const &x, move_iterator< I2 > const &y)
 
template<typename I1 , typename I2 , requires = (EqualityComparable<I1, I2>())>
bool ranges::v3::operator== (move_iterator< I1 > const &x, move_iterator< I2 > const &y)
 
template<typename I , typename S , requires = (Sentinel<S, I>())>
bool ranges::v3::operator== (move_iterator< I > const &i, move_sentinel< S > const &s)
 
template<typename I , typename S , requires = (Sentinel<S, I>())>
bool ranges::v3::operator== (move_sentinel< S > const &s, move_iterator< I > const &i)
 
template<typename I1 , typename I2 , requires = (TotallyOrdered<I1, I2>())>
bool ranges::v3::operator> (move_iterator< I1 > const &x, move_iterator< I2 > const &y)
 
template<typename I1 , typename I2 , requires = (TotallyOrdered<I1, I2>())>
bool ranges::v3::operator>= (move_iterator< I1 > const &x, move_iterator< I2 > const &y)
 
template<typename T , requires = (Constructible<detail::decay_t<T>, T>())>
detail::decay_t< T > ranges::v3::aux::operator| (T &&t, copy_fn)
 
template<typename T >
meta::_t< std::remove_reference< T > > && ranges::v3::aux::operator| (T &&t, move_fn move) noexcept
 
template<typename Arg , typename Pipe , requires = (!is_pipeable<Arg>() && is_pipeable<Pipe>())>
auto ranges::v3::operator| (Arg &&arg, Pipe pipe) -> decltype(pipeable_access::impl< Pipe >::pipe(static_cast< Arg &&>(arg), pipe))
 
template<typename Pipe0 , typename Pipe1 , requires = (is_pipeable<Pipe0>() && is_pipeable<Pipe1>())>
auto ranges::v3::operator| (Pipe0 pipe0, Pipe1 pipe1) -> decltype(make_pipeable(detail::composed_pipe< Pipe0, Pipe1 >
 
template<typename U , requires = (Constructible<base_, U>() && !Same<uncvref_t<U>, reference_wrapper>())>
constexpr ranges::v3::reference_wrapper< T >::reference_wrapper (U &&u) noexcept(std::is_nothrow_constructible< base_, U >::value)
 
 ranges::v3::invoke_fn::static_cast (first)
 
 ranges::v3::invoke_fn::static_cast (rest)...))
 

Variables

constexpr back_inserter_fn ranges::v3::back_inserter {}
 
constexpr compose_fn ranges::v3::compose {}
 
constexpr copy_fn ranges::v3::aux::copy {}
 
constexpr dereference_fn ranges::v3::dereference {}
 
constexpr front_inserter_fn ranges::v3::front_inserter {}
 
constexpr get_cursor_fn ranges::v3::get_cursor {}
 
constexpr indirect_fn ranges::v3::indirect {}
 
constexpr inserter_fn ranges::v3::inserter {}
 
constexpr invoke_fn ranges::v3::invoke {}
 
constexpr iter_distance_fn ranges::v3::iter_distance {}
 
constexpr iter_distance_compare_fn ranges::v3::iter_distance_compare {}
 
constexpr iter_enumerate_fn ranges::v3::iter_enumerate {}
 
constexpr iter_size_fn ranges::v3::iter_size {}
 
constexpr adl_swap_detail::iter_swap_fn iter_swap {}
 
constexpr make_common_pair_fn ranges::v3::make_common_pair {}
 
constexpr make_common_tuple_fn ranges::v3::make_common_tuple {}
 
constexpr make_move_iterator_fn ranges::v3::make_move_iterator {}
 
constexpr make_move_sentinel_fn ranges::v3::make_move_sentinel {}
 
constexpr make_ostream_joiner_fn ranges::v3::make_ostream_joiner {}
 
constexpr make_pipeable_fn ranges::v3::make_pipeable {}
 
constexpr make_reverse_iterator_fn ranges::v3::make_reverse_iterator {}
 
constexpr make_tuple_fn ranges::v3::make_tuple {}
 
constexpr move_fn ranges::v3::aux::move {}
 
constexpr move_into_fn ranges::v3::move_into {}
 
constexpr next_fn ranges::v3::next {}
 
constexpr not_fn_fn ranges::v3::not_fn {}
 
constexpr on_fn ranges::v3::on {}
 
constexpr overload_fn ranges::v3::overload {}
 
constexpr prev_fn ranges::v3::prev {}
 
constexpr protect_fn ranges::v3::protect {}
 Protect a callable so that it can be safely used in a bind expression without accidentally becoming a "nested" bind. More...
 
 ranges::v3::invoke_fn::ptr
 
constexpr adl_uncounted_recounted_detail::recounted_fn ranges::v3::recounted {}
 
constexpr ref_fn ranges::v3::ref {}
 
constexpr adl_swap_detail::swap_fn swap {}
 
constexpr tuple_apply_fn ranges::v3::tuple_apply {}
 
constexpr tuple_foldl_fn ranges::v3::tuple_foldl {}
 
constexpr tuple_for_each_fn ranges::v3::tuple_for_each {}
 
constexpr tuple_transform_fn ranges::v3::tuple_transform {}
 
constexpr adl_uncounted_recounted_detail::uncounted_fn ranges::v3::uncounted {}
 
constexpr unwrap_reference_fn ranges::v3::unwrap_reference {}
 
static constexpr T ranges::v3::static_const< T >::value {}
 

Typedef Documentation

◆ move_t

template<typename R >
using ranges::v3::aux::move_t = typedef meta::if_< std::is_reference<R>, meta::_t<std::remove_reference<R> > &&, detail::decay_t<R> >

#include <range/v3/utility/move.hpp>

See also
move_fn

Function Documentation

◆ operator std::reference_wrapper< type >()

template<typename T>
ranges::v3::reference_wrapper< T >::operator std::reference_wrapper< type > ( ) const
noexcept

#include <range/v3/utility/invoke.hpp>

Precondition
!std::is_rvalue_reference<T>::value

◆ operator|() [1/2]

template<typename T , requires = (Constructible<detail::decay_t<T>, T>())>
detail::decay_t<T> ranges::v3::aux::operator| ( T &&  t,
copy_fn   
)

#include <range/v3/utility/copy.hpp>

See also
copy_fn

◆ operator|() [2/2]

template<typename T >
meta::_t<std::remove_reference<T> >&& ranges::v3::aux::operator| ( T &&  t,
move_fn  move 
)
noexcept

Variable Documentation

◆ back_inserter

constexpr back_inserter_fn ranges::v3::back_inserter {}

◆ compose

constexpr compose_fn ranges::v3::compose {}

◆ copy

constexpr copy_fn ranges::v3::aux::copy {}

#include <range/v3/utility/copy.hpp>

See also
copy_fn

◆ front_inserter

constexpr front_inserter_fn ranges::v3::front_inserter {}

◆ get_cursor

constexpr get_cursor_fn ranges::v3::get_cursor {}

◆ indirect

constexpr indirect_fn ranges::v3::indirect {}
related

◆ inserter

constexpr inserter_fn ranges::v3::inserter {}

◆ iter_distance

constexpr iter_distance_fn ranges::v3::iter_distance {}

◆ iter_distance_compare

constexpr iter_distance_compare_fn ranges::v3::iter_distance_compare {}

◆ iter_enumerate

constexpr iter_enumerate_fn ranges::v3::iter_enumerate {}

◆ iter_size

constexpr iter_size_fn ranges::v3::iter_size {}

◆ iter_swap

constexpr adl_swap_detail::iter_swap_fn iter_swap {}

◆ make_common_pair

constexpr make_common_pair_fn ranges::v3::make_common_pair {}

◆ make_common_tuple

constexpr make_common_tuple_fn ranges::v3::make_common_tuple {}

◆ make_ostream_joiner

constexpr make_ostream_joiner_fn ranges::v3::make_ostream_joiner {}

◆ make_pipeable

constexpr make_pipeable_fn ranges::v3::make_pipeable {}

◆ make_tuple

constexpr make_tuple_fn ranges::v3::make_tuple {}

◆ move

constexpr move_fn ranges::v3::aux::move {}
related

◆ move_into

constexpr move_into_fn ranges::v3::move_into {}

◆ next

constexpr next_fn ranges::v3::next {}

◆ not_fn

constexpr not_fn_fn ranges::v3::not_fn {}

◆ on

constexpr on_fn ranges::v3::on {}

◆ overload

constexpr overload_fn ranges::v3::overload {}

◆ prev

◆ protect

constexpr protect_fn ranges::v3::protect {}

#include <range/v3/utility/functional.hpp>

Protect a callable so that it can be safely used in a bind expression without accidentally becoming a "nested" bind.

See also
protect_fn

◆ ref

constexpr ref_fn ranges::v3::ref {}

◆ swap

constexpr adl_swap_detail::swap_fn swap {}

◆ tuple_apply

constexpr tuple_apply_fn ranges::v3::tuple_apply {}

◆ tuple_foldl

◆ tuple_for_each

constexpr tuple_for_each_fn ranges::v3::tuple_for_each {}

◆ tuple_transform

◆ unwrap_reference

constexpr unwrap_reference_fn ranges::v3::unwrap_reference {}

◆ value

template<typename T >
constexpr T ranges::v3::static_const< T >::value {}
static
See also
static_const