openMSX
Functions
ranges Namespace Reference

Functions

template<typename ForwardRange , typename Compare = std::less<>, typename Proj = identity>
bool is_sorted (ForwardRange &&range, Compare comp={}, Proj proj={})
 
template<typename RandomAccessRange >
void sort (RandomAccessRange &&range)
 
template<typename RandomAccessRange , typename Compare >
void sort (RandomAccessRange &&range, Compare comp)
 
template<typename RAIter , typename Compare = std::less<>, typename Proj >
void sort (RAIter first, RAIter last, Compare comp, Proj proj)
 
template<typename RandomAccessRange , typename Compare = std::less<>, typename Proj >
void sort (RandomAccessRange &&range, Compare comp, Proj proj)
 
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 , typename Compare = std::less<>, typename Proj = identity>
auto lower_bound (ForwardRange &&range, const T &value, Compare comp={}, Proj proj={})
 
template<typename ForwardRange , typename T , typename Compare = std::less<>, typename Proj = identity>
auto upper_bound (ForwardRange &&range, const T &value, Compare comp={}, Proj proj={})
 
template<typename ForwardRange , typename T , typename Compare = std::less<>>
auto equal_range (ForwardRange &&range, const T &value, Compare comp={})
 
template<typename ForwardRange , typename T , typename Compare = std::less<>, typename Proj = identity>
auto equal_range (ForwardRange &&range, const T &value, Compare comp, Proj proj)
 
template<typename InputRange , typename T >
auto find (InputRange &&range, const T &value)
 
template<typename InputRange , typename T , typename Proj >
auto find (InputRange &&range, const T &value, Proj proj)
 
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 Generator >
void generate (ForwardRange &&range, Generator &&g)
 
template<typename ForwardRange , typename T >
auto remove (ForwardRange &&range, const T &value)
 
template<typename ForwardRange , typename UnaryPredicate >
auto remove_if (ForwardRange &&range, UnaryPredicate pred)
 
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 ForwardIt , typename T >
constexpr void iota (ForwardIt first, ForwardIt last, T value)
 
template<typename ForwardRange , typename T >
constexpr void iota (ForwardRange &&range, 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 248 of file ranges.hh.

◆ accumulate() [2/2]

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

Definition at line 254 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 
)

Definition at line 154 of file ranges.hh.

References begin(), and end().

Referenced by openmsx::SoundDevice::mixChannels(), and openmsx::MSXMixer::needStereoRecording().

◆ binary_search() [1/2]

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

Definition at line 72 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 78 of file ranges.hh.

References begin(), openmsx::comp(), 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 184 of file ranges.hh.

References begin(), and end().

◆ count()

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

Definition at line 260 of file ranges.hh.

References begin(), and end().

◆ count_if()

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

Definition at line 266 of file ranges.hh.

References begin(), and end().

◆ equal_range() [1/2]

template<typename ForwardRange , typename T , typename Compare = std::less<>, typename Proj = identity>
auto ranges::equal_range ( ForwardRange &&  range,
const T &  value,
Compare  comp,
Proj  proj 
)

Definition at line 107 of file ranges.hh.

References begin(), openmsx::comp(), end(), openmsx::R, and openmsx::x.

◆ equal_range() [2/2]

template<typename ForwardRange , typename T , typename Compare = std::less<>>
auto ranges::equal_range ( ForwardRange &&  range,
const T &  value,
Compare  comp = {} 
)

◆ fill()

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

◆ find() [1/2]

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

◆ find() [2/2]

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

Definition at line 135 of file ranges.hh.

References find_if().

Referenced by find().

◆ find_if()

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

◆ generate()

template<typename ForwardRange , typename Generator >
void ranges::generate ( ForwardRange &&  range,
Generator &&  g 
)

Definition at line 196 of file ranges.hh.

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

Referenced by openmsx::GLSnow::GLSnow().

◆ iota() [1/2]

template<typename ForwardIt , typename T >
constexpr void ranges::iota ( ForwardIt  first,
ForwardIt  last,
value 
)
constexpr

◆ iota() [2/2]

template<typename ForwardRange , typename T >
constexpr void ranges::iota ( ForwardRange &&  range,
T &&  value 
)
constexpr

Definition at line 242 of file ranges.hh.

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

◆ is_sorted()

template<typename ForwardRange , typename Compare = std::less<>, typename Proj = identity>
bool ranges::is_sorted ( ForwardRange &&  range,
Compare  comp = {},
Proj  proj = {} 
)

Definition at line 24 of file ranges.hh.

◆ lower_bound()

template<typename ForwardRange , typename T , typename Compare = std::less<>, typename Proj = identity>
auto ranges::lower_bound ( ForwardRange &&  range,
const T &  value,
Compare  comp = {},
Proj  proj = {} 
)

◆ none_of()

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

Definition at line 160 of file ranges.hh.

References begin(), and end().

Referenced by openmsx::MSXMultiMemDevice::canAdd().

◆ remove()

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

Definition at line 202 of file ranges.hh.

References begin(), and end().

Referenced by openmsx::Subject< T >::notify().

◆ remove_if()

template<typename ForwardRange , typename UnaryPredicate >
auto ranges::remove_if ( ForwardRange &&  range,
UnaryPredicate  pred 
)

Definition at line 208 of file ranges.hh.

References begin(), and end().

Referenced by openmsx::SchedulerQueue< T >::remove_all().

◆ replace()

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

Definition at line 214 of file ranges.hh.

References begin(), and end().

◆ replace_if()

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

Definition at line 220 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 272 of file ranges.hh.

References begin(), and end().

◆ sort() [1/4]

template<typename RAIter , typename Compare = std::less<>, typename Proj >
void ranges::sort ( RAIter  first,
RAIter  last,
Compare  comp,
Proj  proj 
)

Definition at line 45 of file ranges.hh.

References openmsx::comp(), sort(), and openmsx::x.

◆ sort() [2/4]

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

◆ sort() [3/4]

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

Definition at line 39 of file ranges.hh.

References begin(), openmsx::comp(), end(), and sort().

◆ sort() [4/4]

template<typename RandomAccessRange , typename Compare = std::less<>, typename Proj >
void ranges::sort ( RandomAccessRange &&  range,
Compare  comp,
Proj  proj 
)

Definition at line 54 of file ranges.hh.

References begin(), openmsx::comp(), end(), and sort().

Referenced by sort().

◆ stable_sort() [1/2]

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

Definition at line 60 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 66 of file ranges.hh.

References begin(), openmsx::comp(), 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 190 of file ranges.hh.

References begin(), and end().

Referenced by TEST_CASE(), and transform_in_place().

◆ unique() [1/2]

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

Definition at line 166 of file ranges.hh.

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

Referenced by openmsx::Reactor::getHwConfigs(), and test().

◆ unique() [2/2]

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

Definition at line 172 of file ranges.hh.

References begin(), and end().

Referenced by unique().

◆ upper_bound()

template<typename ForwardRange , typename T , typename Compare = std::less<>, typename Proj = identity>
auto ranges::upper_bound ( ForwardRange &&  range,
const T &  value,
Compare  comp = {},
Proj  proj = {} 
)