forked from qt-creator/qt-creator
Sqlite: Add swap for ConstIterator
Otherwise we get an recursion. Change-Id: Ia8dfcbeae30b25d9d347404ae85b852c4c11c921 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -147,13 +147,19 @@ public:
|
|||||||
ConstIterator &operator=(ConstIterator &&other)
|
ConstIterator &operator=(ConstIterator &&other)
|
||||||
{
|
{
|
||||||
auto tmp = std::move(other);
|
auto tmp = std::move(other);
|
||||||
std::swap(tmp, *this);
|
swap(tmp, *this);
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
~ConstIterator();
|
~ConstIterator();
|
||||||
|
|
||||||
|
friend void swap(ConstIterator &first, ConstIterator &second)
|
||||||
|
{
|
||||||
|
std::swap(first.m_sessionIterator, second.m_sessionIterator);
|
||||||
|
std::swap(first.m_state, second.m_state);
|
||||||
|
}
|
||||||
|
|
||||||
ConstIterator &operator++();
|
ConstIterator &operator++();
|
||||||
|
|
||||||
friend bool operator==(const ConstIterator &first, const ConstIterator &second)
|
friend bool operator==(const ConstIterator &first, const ConstIterator &second)
|
||||||
|
|||||||
Reference in New Issue
Block a user