openMSX
Functions
ranges Namespace Reference

Functions

template<typename ForwardRange >
bool is_sorted (ForwardRange &&range)
 
template<typename ForwardRange , typename Compare >
bool is_sorted (ForwardRange &&range, Compare comp)
 
template<typename RandomAccessRange >
void sort (RandomAccessRange &&range)
 
template<typename RandomAccessRange , typename Compare >
void sort (RandomAccessRange &&range, Compare comp)
 
template<typename RandomAccessRange >
void stable_sort (RandomAccessRange &&range)
 
template<typename RandomAccessRange , typename Compare >
void stable_sort (RandomAccessRange &&range, Compare comp)
 
template<typename ForwardRange , typename T >
bool binary_search (ForwardRange &&range, const T &value)
 
template<typename ForwardRange , typename T , typename Compare >
bool binary_search (ForwardRange &&range, const T &value, Compare comp)
 
template<typename ForwardRange , typename T >
auto lower_bound (ForwardRange &&range, const T &value)
 
template<typename ForwardRange , typename T , typename Compare >
auto lower_bound (ForwardRange &&range, const T &value, Compare comp)
 
template<typename ForwardRange , typename T >
auto upper_bound (ForwardRange &&range, const T &value)
 
template<typename ForwardRange , typename T , typename Compare >
auto upper_bound (ForwardRange &&range, const T &value, Compare comp)
 
template<typename ForwardRange , typename T >
auto equal_range (ForwardRange &&range, const T &value)
 
template<typename ForwardRange , typename T , typename Compare >
auto equal_range (ForwardRange &&range, const T &value, Compare comp)
 
template<typename InputRange , typename T >
auto find (InputRange &&range, const T &value)
 
template<typename InputRange , typename UnaryPredicate >
auto find_if (InputRange &&range, UnaryPredicate pred)
 
template<typename InputRange , typename UnaryPredicate >
bool all_of (InputRange &&range, UnaryPredicate pred)
 
template<typename InputRange , typename UnaryPredicate >
bool any_of (InputRange &&range, UnaryPredicate pred)
 
template<typename InputRange , typename UnaryPredicate >
bool none_of (InputRange &&range, UnaryPredicate pred)
 
template<typename ForwardRange >
auto unique (ForwardRange &&range)
 
template<typename ForwardRange , typename BinaryPredicate >
auto unique (ForwardRange &&range, BinaryPredicate pred)
 
template<typename InputRange , typename OutputIter >
auto copy (InputRange &&range, OutputIter out)
 
template<typename InputRange , typename OutputIter , typename UnaryPredicate >
auto copy_if (InputRange &&range, OutputIter out, UnaryPredicate pred)
 
template<typename InputRange , typename OutputIter , typename UnaryOperation >
auto transform (InputRange &&range, OutputIter out, UnaryOperation op)
 
template<typename ForwardRange , typename T >
void replace (ForwardRange &&range, const T &old_value, const T &new_value)
 
template<typename ForwardRange , typename UnaryPredicate , typename T >
void replace_if (ForwardRange &&range, UnaryPredicate pred, const T &new_value)
 
template<typename ForwardRange , typename T >
void fill (ForwardRange &&range, const T &value)
 
template<typename InputRange , typename T >
accumulate (InputRange &&range, T init)
 
template<typename InputRange , typename T , typename BinaryOperation >
accumulate (InputRange &&range, T init, BinaryOperation op)
 
template<typename InputRange , typename T >
auto count (InputRange &&range, const T &value)
 
template<typename InputRange , typename UnaryPredicate >
auto count_if (InputRange &&range, UnaryPredicate pred)
 
template<typename InputRange1 , typename InputRange2 , typename OutputIter >
auto set_difference (InputRange1 &&range1, InputRange2 &&range2, OutputIter out)
 

Function Documentation

◆ accumulate() [1/2]

template<typename InputRange , typename T >
T ranges::accumulate ( InputRange &&  range,
init 
)

Definition at line 185 of file ranges.hh.

Referenced by sum().

◆ accumulate() [2/2]

template<typename InputRange , typename T , typename BinaryOperation >
T ranges::accumulate ( InputRange &&  range,
init,
BinaryOperation  op 
)

Definition at line 191 of file ranges.hh.

◆ all_of()

template<typename InputRange , typename UnaryPredicate >
bool ranges::all_of ( InputRange &&  range,
UnaryPredicate  pred 
)

◆ any_of()

template<typename InputRange , typename UnaryPredicate >
bool ranges::any_of ( InputRange &&  range,
UnaryPredicate  pred 
)

◆ binary_search() [1/2]

template<typename ForwardRange , typename T >
bool ranges::binary_search ( ForwardRange &&  range,
const T &  value 
)

Definition at line 59 of file ranges.hh.

References begin(), binary_search(), and end().

Referenced by openmsx::OggReader::stopFrame().

◆ binary_search() [2/2]

template<typename ForwardRange , typename T , typename Compare >
bool ranges::binary_search ( ForwardRange &&  range,
const T &  value,
Compare  comp 
)

Definition at line 65 of file ranges.hh.

References begin(), and end().

Referenced by binary_search().

◆ copy()

template<typename InputRange , typename OutputIter >
auto ranges::copy ( InputRange &&  range,
OutputIter  out 
)

◆ copy_if()

template<typename InputRange , typename OutputIter , typename UnaryPredicate >
auto ranges::copy_if ( InputRange &&  range,
OutputIter  out,
UnaryPredicate  pred 
)

Definition at line 155 of file ranges.hh.

References begin(), and end().

Referenced by openmsx::Scheduler::~Scheduler().

◆ count()

template<typename InputRange , typename T >
auto ranges::count ( InputRange &&  range,
const T &  value 
)

◆ count_if()

template<typename InputRange , typename UnaryPredicate >
auto ranges::count_if ( InputRange &&  range,
UnaryPredicate  pred 
)

Definition at line 203 of file ranges.hh.

References begin(), and end().

◆ equal_range() [1/2]

template<typename ForwardRange , typename T >
auto ranges::equal_range ( ForwardRange &&  range,
const T &  value 
)

◆ equal_range() [2/2]

template<typename ForwardRange , typename T , typename Compare >
auto ranges::equal_range ( ForwardRange &&  range,
const T &  value,
Compare  comp 
)

Definition at line 101 of file ranges.hh.

References begin(), and end().

Referenced by equal_range().

◆ fill()

template<typename ForwardRange , typename T >
void ranges::fill ( ForwardRange &&  range,
const T &  value 
)

◆ find()

template<typename InputRange , typename T >
auto ranges::find ( InputRange &&  range,
const T &  value 
)

◆ find_if()

template<typename InputRange , typename UnaryPredicate >
auto ranges::find_if ( InputRange &&  range,
UnaryPredicate  pred 
)

◆ is_sorted() [1/2]

template<typename ForwardRange >
bool ranges::is_sorted ( ForwardRange &&  range)

Definition at line 23 of file ranges.hh.

References begin(), end(), and is_sorted().

Referenced by openmsx::OSDWidget::deleteWidget().

◆ is_sorted() [2/2]

template<typename ForwardRange , typename Compare >
bool ranges::is_sorted ( ForwardRange &&  range,
Compare  comp 
)

Definition at line 29 of file ranges.hh.

References begin(), and end().

Referenced by is_sorted().

◆ lower_bound() [1/2]

template<typename ForwardRange , typename T >
auto ranges::lower_bound ( ForwardRange &&  range,
const T &  value 
)

◆ lower_bound() [2/2]

template<typename ForwardRange , typename T , typename Compare >
auto ranges::lower_bound ( ForwardRange &&  range,
const T &  value,
Compare  comp 
)

Definition at line 77 of file ranges.hh.

References begin(), and end().

Referenced by lower_bound().

◆ none_of()

template<typename InputRange , typename UnaryPredicate >
bool ranges::none_of ( InputRange &&  range,
UnaryPredicate  pred 
)

◆ replace()

template<typename ForwardRange , typename T >
void ranges::replace ( ForwardRange &&  range,
const T &  old_value,
const T &  new_value 
)

◆ replace_if()

template<typename ForwardRange , typename UnaryPredicate , typename T >
void ranges::replace_if ( ForwardRange &&  range,
UnaryPredicate  pred,
const T &  new_value 
)

Definition at line 173 of file ranges.hh.

References begin(), and end().

◆ set_difference()

template<typename InputRange1 , typename InputRange2 , typename OutputIter >
auto ranges::set_difference ( InputRange1 &&  range1,
InputRange2 &&  range2,
OutputIter  out 
)

Definition at line 209 of file ranges.hh.

References begin(), and end().

Referenced by openmsx::MSXDevice::testRemove(), and openmsx::MSXCPUInterface::testUnsetExpanded().

◆ sort() [1/2]

template<typename RandomAccessRange >
void ranges::sort ( RandomAccessRange &&  range)

◆ sort() [2/2]

template<typename RandomAccessRange , typename Compare >
void ranges::sort ( RandomAccessRange &&  range,
Compare  comp 
)

Definition at line 41 of file ranges.hh.

References begin(), and end().

Referenced by sort().

◆ stable_sort() [1/2]

template<typename RandomAccessRange >
void ranges::stable_sort ( RandomAccessRange &&  range)

Definition at line 47 of file ranges.hh.

References begin(), end(), and stable_sort().

◆ stable_sort() [2/2]

template<typename RandomAccessRange , typename Compare >
void ranges::stable_sort ( RandomAccessRange &&  range,
Compare  comp 
)

Definition at line 53 of file ranges.hh.

References begin(), and end().

Referenced by stable_sort().

◆ transform()

template<typename InputRange , typename OutputIter , typename UnaryOperation >
auto ranges::transform ( InputRange &&  range,
OutputIter  out,
UnaryOperation  op 
)

Definition at line 161 of file ranges.hh.

References begin(), and end().

Referenced by transform_in_place(), and openmsx::SHA1::update().

◆ unique() [1/2]

template<typename ForwardRange >
auto ranges::unique ( ForwardRange &&  range)

◆ unique() [2/2]

template<typename ForwardRange , typename BinaryPredicate >
auto ranges::unique ( ForwardRange &&  range,
BinaryPredicate  pred 
)

Definition at line 143 of file ranges.hh.

References begin(), and end().

Referenced by unique().

◆ upper_bound() [1/2]

template<typename ForwardRange , typename T >
auto ranges::upper_bound ( ForwardRange &&  range,
const T &  value 
)

◆ upper_bound() [2/2]

template<typename ForwardRange , typename T , typename Compare >
auto ranges::upper_bound ( ForwardRange &&  range,
const T &  value,
Compare  comp 
)

Definition at line 89 of file ranges.hh.

References begin(), and end().

Referenced by upper_bound().