folly::range

range overloads

Synopses

Declared in <folly/Range.h>

Create a range referencing an initializer list.

template<class T>
constexpr
Range<T const*>
range(std::initializer_list<T> ilist);
» more...

Create a range referencing the contents of a contiguous-storage container.

template<class Collection>
constexpr
Range<decltype(v.data())>
range(Collection& v);
» more...

Create a range referencing the contents of a constant container.

template<class Collection>
constexpr
Range<decltype(v.data())>
range(Collection const& v);
» more...

Create a range referencing a std::array.

template<
    class T,
    size_t n>
constexpr
Range<T*>
range(std::array<T, n>& array);
» more...

Create a range referencing a constant std::array.

template<
    class T,
    size_t n>
constexpr
Range<T const*>
range(std::array<T, n> const& array);
» more...

Create a range referencing a C array.

template<
    class T,
    size_t n>
constexpr
Range<T*>
range(T(& array)[]);
» more...

Create a range referencing a constant C array.

template<
    class T,
    size_t n>
constexpr
Range<T const*>
range(T const(& array)[]);
» more...

Create a range from two iterators, with type deduction.

template<class Iter>
constexpr
Range<Iter>
range(
    Iter first,
    Iter last);
» more...

Return Value

The resulting range.

Parameters

NameDescription
ilistThe initializer list to reference.
vThe container to reference.
arrayThe array to reference.
firstThe iterator to the first element.
lastThe iterator past the last element.