Closed GoogleCodeExporter closed 9 years ago
The fact that RVO is implemented in many compilers does not really invalidate
the points raised in the original issue.
RVO is not guaranteed, so from the performance perspective you depend on the
compiler implementation; enabling copying for the sake of RVO means that all
other uses become eligible for copying as well, with associated performance and
correctness issues.
Enabling copying for the sake of RVO is nowadays implemented by moving. Upon
further reflection my comment in #166 is not entirely correct - it should be
easy to implement a move ctor that is almost always O(1).
Feel free to open a separate issue for this if you use a C++11 environment and
believe you can benefit from move support.
Original comment by arseny.k...@gmail.com
on 8 Feb 2014 at 11:12
Original issue reported on code.google.com by
nikko...@hates.ms
on 1 Feb 2014 at 1:18