Kaydet (Commit) bd8cb3ff authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Iterators must be CopyAssignable

...so make sure the (implicitly defined) copy assignment op is not deleted and
has sane semantics

Change-Id: If34cb5bd1ef250505a4c876ab78aba2a3d5dfc21
Reviewed-on: https://gerrit.libreoffice.org/58039
Tested-by: Jenkins
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 11d87b35
......@@ -143,21 +143,17 @@ public:
typedef size_t difference_type;
OUStringBufferAppender(OUStringBuffer & i_rBuffer)
: m_rBuffer(i_rBuffer) { }
Self & operator=(Self const &)
{ // MSVC 2013 with non-debug runtime requires this in xutility.hpp:289
return *this;
}
: m_rBuffer(&i_rBuffer) { }
Self & operator=(OUString const & i_rStr)
{
m_rBuffer.append( i_rStr );
m_rBuffer->append( i_rStr );
return *this;
}
Self & operator*() { return *this; } // so operator= works
Self & operator++() { return *this; }
private:
OUStringBuffer & m_rBuffer;
OUStringBuffer * m_rBuffer;
};
/** algorithm similar to std::copy, but inserts a separator between elements.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment