Move constructors for Reference?
Stephan Bergmann
sbergman at redhat.com
Mon Nov 2 00:27:18 PST 2015
On 11/01/2015 09:47 AM, Noel Grandin wrote:
> Do we need move constructors for our Reference classes? Or will the
> compiler currently generate them automatically?
The compiler will not provide implicit move constructors or move
assignment operators for those classes.
We could provide ones (for LIBO_INTERNAL_ONLY), the benefit would be
that some of the acquire/release calls could be spared. How much of an
actual improvement that would be would be open to evaluation.
> Also , do we need to write specializations of std::move for moving our
> References and collections of References around?
It is never necessary to write specializations of std::move.
> Asking because I converted some data structures to be things like:
> std::vector<Reference<x>>
> And now I wondering if that might not be all that efficient.
Should be just fine (modulo that potential improvement of sparing some
acquire/release calls).
More information about the LibreOffice
mailing list