Fixed error in CSequence::useImplOf.

This commit is contained in:
Mathew Sutcliffe
2014-12-21 16:59:06 +00:00
parent 77efea3377
commit 4960ba5170

View File

@@ -96,7 +96,7 @@ namespace BlackMisc
* \brief Like changeImpl, but uses the implementation type of another sequence.
* \pre The other sequence must be initialized.
*/
void useImplOf(const CSequence &other) { PimplPtr p = other.pimpl()->cloneEmpty(); std::move(begin(), end(), std::inserter(*p, p->begin())); m_pimpl.reset(p.take()); }
void useImplOf(const CSequence &other) { CSequence c(other.pimpl()->cloneEmpty()); std::move(begin(), end(), std::inserter(c, c.begin())); *this = std::move(c); }
/*!
* \brief Returns iterator at the beginning of the sequence.