replace overloads

Synopses

Declared in <llvm/ADT/STLExtras.h>

Provide wrappers to std::replace which take ranges instead of having to pass begin/end explicitly.

template<
    typename R,
    typename T>
void
replace(
    R&& Range,
    T const& OldValue,
    T const& NewValue);

Given a sequence container Cont, replace the range [ContIt, ContEnd) with] the range R.

template<
    typename Container,
    typename Range = std::initializer_list<Container::value_type>>
void
replace(
    Container& Cont,
    Container::iterator ContIt,
    Container::iterator ContEnd,
    Range&& R);

Given a sequence container Cont, replace the range [ContIt, ContEnd) with] the range [ValIt, ValEnd) (which is not from the same container).]

template<
    typename Container,
    typename RandomAccessIterator>
void
replace(
    Container& Cont,
    Container::iterator ContIt,
    Container::iterator ContEnd,
    RandomAccessIterator ValIt,
    RandomAccessIterator ValEnd);

Created with MrDocs