Added IndexedSet::previous(iterator) const
This commit is contained in:
parent
70bd535707
commit
e58698d6f7
|
@ -527,6 +527,7 @@ TEST_CASE("/flow/IndexedSet/const_iterator") {
|
|||
static_assert(std::is_const_v<typename std::remove_reference_t<decltype(cis)>>);
|
||||
static_assert(std::is_const_v<typename std::remove_reference_t<decltype(*cis.begin())>>);
|
||||
static_assert(std::is_const_v<typename std::remove_reference_t<decltype(*cis.previous(cis.end()))>>);
|
||||
static_assert(std::is_const_v<typename std::remove_reference_t<decltype(*cis.previous(is.end()))>>);
|
||||
static_assert(std::is_const_v<typename std::remove_reference_t<decltype(*cis.index(Metric{ 5 }))>>);
|
||||
static_assert(std::is_const_v<typename std::remove_reference_t<decltype(*cis.find(Key{ 5 }))>>);
|
||||
static_assert(std::is_const_v<typename std::remove_reference_t<decltype(*cis.upper_bound(Key{ 5 }))>>);
|
||||
|
|
|
@ -170,6 +170,7 @@ public:
|
|||
iterator end() { return iterator{}; }
|
||||
|
||||
const_iterator previous(const_iterator i) const { return ConstImpl::previous(*this, i); }
|
||||
const_iterator previous(iterator i) const { return ConstImpl::previous(*this, const_iterator{ i }); }
|
||||
iterator previous(iterator i) { return NonConstImpl::previous(*this, i); }
|
||||
|
||||
const_iterator lastItem() const { return ConstImpl::lastItem(*this); }
|
||||
|
|
Loading…
Reference in New Issue