openMSX
Concepts | Functions
ranges Namespace Reference

Concepts

concept  range
 
concept  sized_range
 

Functions

template<typename ForwardRange , typename Compare = std::less<>, typename Proj = std::identity>
bool is_sorted (ForwardRange &&range, Compare comp={}, Proj proj={})
 
template<typename RandomAccessRange >
constexpr void sort (RandomAccessRange &&range)
 
template<typename RandomAccessRange , typename Compare >
constexpr void sort (RandomAccessRange &&range, Compare comp)
 
template<typename RAIter , typename Compare = std::less<>, typename Proj >
constexpr void sort (RAIter first, RAIter last, Compare comp, Proj proj)
 
template<typename RandomAccessRange , typename Compare = std::less<>, typename Proj >
constexpr 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 RAIter , typename Compare = std::less<>, typename Proj >
void stable_sort (RAIter first, RAIter last, Compare comp, Proj proj)
 
template<typename RandomAccessRange , typename Compare = std::less<>, typename Proj >
void stable_sort (RandomAccessRange &&range, Compare comp, Proj proj)
 
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 = std::identity>
auto lower_bound (ForwardRange &&range, const T &value, Compare comp={}, Proj proj={})
 
template<typename ForwardRange , typename T , typename Compare = std::less<>, typename Proj = std::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 = std::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 >
constexpr bool all_of (InputRange &&range, UnaryPredicate pred)
 
template<typename InputRange , typename UnaryPredicate >
constexpr bool any_of (InputRange &&range, UnaryPredicate pred)
 
template<typename InputRange , typename UnaryPredicate >
constexpr 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 RAIter , typename Compare = std::equal_to<>, typename Proj >
auto unique (RAIter first, RAIter last, Compare comp, Proj proj)
 
template<typename RandomAccessRange , typename Compare = std::equal_to<>, typename Proj >
auto unique (RandomAccessRange &&range, Compare comp, Proj proj)
 
template<typename InputRange , typename OutputIter >
requires (!range<OutputIter>)
constexpr auto copy (InputRange &&range, OutputIter out)
 
template<sized_range Input, sized_range Output>
constexpr auto copy (Input &&in, Output &&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 >
constexpr 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 >
constexpr 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)
 
template<range InputRange1, range InputRange2, typename Pred = std::equal_to<void>, typename Proj1 = std::identity, typename Proj2 = std::identity>
constexpr bool equal (InputRange1 &&range1, InputRange2 &&range2, Pred pred={}, Proj1 proj1={}, Proj2 proj2={})
 
template<sized_range SizedRange1, sized_range SizedRange2, typename Pred = std::equal_to<void>, typename Proj1 = std::identity, typename Proj2 = std::identity>
constexpr bool equal (SizedRange1 &&range1, SizedRange2 &&range2, Pred pred={}, Proj1 proj1={}, Proj2 proj2={})
 
template<typename InputRange , typename Proj = std::identity>
bool all_equal (InputRange &&range, Proj proj={})
 

Function Documentation

◆ accumulate() [1/2]

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

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

◆ all_equal()

template<typename InputRange , typename Proj = std::identity>
bool ranges::all_equal ( InputRange &&  range,
Proj  proj = {} 
)

Definition at line 415 of file ranges.hh.

Referenced by openmsx::OSDImageBasedWidget::hasConstantAlpha(), and TEST_CASE().

◆ all_of()

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

◆ any_of()

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

◆ binary_search() [1/2]

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

Definition at line 105 of file ranges.hh.

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 111 of file ranges.hh.

◆ copy() [1/2]

template<sized_range Input, sized_range Output>
constexpr auto ranges::copy ( Input &&  in,
Output &&  out 
)
constexpr

Definition at line 258 of file ranges.hh.

◆ copy() [2/2]

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

◆ copy_if()

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

Definition at line 273 of file ranges.hh.

◆ count()

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

Definition at line 349 of file ranges.hh.

Referenced by count_if().

◆ count_if()

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

Definition at line 355 of file ranges.hh.

References count().

Referenced by openmsx::CartridgeSlotManager::getNumberOfSlots().

◆ equal() [1/2]

template<range InputRange1, range InputRange2, typename Pred = std::equal_to<void>, typename Proj1 = std::identity, typename Proj2 = std::identity>
constexpr bool ranges::equal ( InputRange1 &&  range1,
InputRange2 &&  range2,
Pred  pred = {},
Proj1  proj1 = {},
Proj2  proj2 = {} 
)
constexpr

◆ equal() [2/2]

template<sized_range SizedRange1, sized_range SizedRange2, typename Pred = std::equal_to<void>, typename Proj1 = std::identity, typename Proj2 = std::identity>
constexpr bool ranges::equal ( SizedRange1 &&  range1,
SizedRange2 &&  range2,
Pred  pred = {},
Proj1  proj1 = {},
Proj2  proj2 = {} 
)
constexpr

Definition at line 396 of file ranges.hh.

◆ equal_range() [1/2]

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

Definition at line 140 of file ranges.hh.

◆ 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 >
constexpr void ranges::fill ( ForwardRange &&  range,
const T &  value 
)
constexpr

Definition at line 315 of file ranges.hh.

Referenced by openmsx::AbstractIDEDevice::AbstractIDEDevice(), openmsx::Rom::addPadding(), openmsx::AY8910::AY8910(), openmsx::BlipBuffer::BlipBuffer(), openmsx::Sha1Sum::clear(), openmsx::V9990VRAM::clear(), openmsx::VDPVRAM::clear(), openmsx::Ram::clear(), strCatImpl::ConcatSpaces::copy(), openmsx::EmptyPatch::copyBlock(), PerfectMinimalHash::create(), openmsx::DirAsDSK::DirAsDSK(), openmsx::V9990SDLRasterizer::drawBorder(), openmsx::MemoryOps::fill_2(), openmsx::DiskImageUtils::format(), openmsx::SpriteChecker::frameStart(), openmsx::YM2413Burczynski::YM2413::generateChannels(), openmsx::HardwareConfig::HardwareConfig(), inplace_buffer< T, BUF_SIZE >::inplace_buffer(), openmsx::MSXCPU::invalidateAllSlotsRWCache(), openmsx::Keyboard::Keyboard(), openmsx::MB89352::MB89352(), openmsx::SRAM::memset(), openmsx::SoundDevice::mixChannels(), openmsx::MsxChar2Unicode::MsxChar2Unicode(), openmsx::MSXCPUInterface::MSXCPUInterface(), openmsx::MSXDeviceSwitch::MSXDeviceSwitch(), openmsx::MSXSCCPlusCart::MSXSCCPlusCart(), openmsx::NinjaTap::NinjaTap(), openmsx::OSDImageBasedWidget::OSDImageBasedWidget(), openmsx::Paper::Paper(), openmsx::SCC::powerUp(), openmsx::VLM5030::reset(), openmsx::YM2413Okazaki::Slot::reset(), openmsx::YM2413NukeYKT::YM2413::reset(), openmsx::YM2413OriginalNukeYKT::YM2413::reset(), openmsx::WD33C93::reset(), openmsx::Y8950::reset(), openmsx::MSXMemoryMapperBase::reset(), openmsx::RomHolyQuran2::reset(), openmsx::ROMHunterMk2::reset(), openmsx::RomNettouYakyuu::reset(), openmsx::RomPanasonic::reset(), openmsx::V9990::reset(), openmsx::FrameSource::scaleLine(), openmsx::SCC::SCC(), openmsx::SpriteChecker::serialize(), small_buffer< T, BUF_SIZE >::small_buffer(), openmsx::SoundDevice::SoundDevice(), openmsx::AbstractIDEDevice::startShortReadTransfer(), TEST_CASE(), openmsx::GLHQScaler::uploadBlock(), openmsx::WD33C93::WD33C93(), openmsx::ImagePrinter::write(), openmsx::YM2413OriginalNukeYKT::YM2413::writePort(), openmsx::YM2413Burczynski::YM2413::YM2413(), openmsx::YM2413Okazaki::YM2413::YM2413(), and openmsx::YMF278::YMF278().

◆ 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 168 of file ranges.hh.

References find_if().

◆ 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 285 of file ranges.hh.

References 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 331 of file ranges.hh.

References iota().

◆ is_sorted()

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

Definition at line 42 of file ranges.hh.

◆ lower_bound()

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

◆ none_of()

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

◆ remove()

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

Definition at line 291 of file ranges.hh.

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

◆ remove_if()

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

Definition at line 297 of file ranges.hh.

◆ replace()

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

◆ replace_if()

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

Definition at line 309 of file ranges.hh.

◆ set_difference()

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

Definition at line 368 of file ranges.hh.

◆ sort() [1/4]

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

Definition at line 63 of file ranges.hh.

◆ sort() [2/4]

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

◆ sort() [3/4]

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

Definition at line 57 of file ranges.hh.

◆ sort() [4/4]

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

Definition at line 72 of file ranges.hh.

References sort().

◆ stable_sort() [1/4]

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

Definition at line 90 of file ranges.hh.

◆ stable_sort() [2/4]

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

Definition at line 78 of file ranges.hh.

Referenced by openmsx::sortUpDown_String(), openmsx::sortUpDown_T(), and stable_sort().

◆ stable_sort() [3/4]

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

Definition at line 84 of file ranges.hh.

◆ stable_sort() [4/4]

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

Definition at line 99 of file ranges.hh.

References stable_sort().

◆ transform()

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

◆ unique() [1/4]

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

Definition at line 224 of file ranges.hh.

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

◆ unique() [2/4]

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

Definition at line 230 of file ranges.hh.

◆ unique() [3/4]

template<typename RAIter , typename Compare = std::equal_to<>, typename Proj >
auto ranges::unique ( RAIter  first,
RAIter  last,
Compare  comp,
Proj  proj 
)

Definition at line 236 of file ranges.hh.

◆ unique() [4/4]

template<typename RandomAccessRange , typename Compare = std::equal_to<>, typename Proj >
auto ranges::unique ( RandomAccessRange &&  range,
Compare  comp,
Proj  proj 
)

Definition at line 245 of file ranges.hh.

References unique().

◆ upper_bound()

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