[RFA] Algorithms vs operator* and operator==
Joe Buck
Joe.Buck@synopsys.COM
Sun Nov 7 04:46:00 GMT 2004
On Sat, Nov 06, 2004 at 08:22:16PM -0800, Matt Austern wrote:
> We're reinventing what Howard Hinnant calls "move semantics".
> If we're going down this route, let's build on his work.
Agreed (though I'd been pushing this idea for years on an independent
basis; I even had some stupid extension ideas back before templates were
officially in the language). It seems some people have objected to his
work because of conflicts between derivation and move semantics, but such
objections ignore that you can't store derived classes in a vector<Base>
anyway so it doesn't matter.
Anyway, I think trying to use swap() might be a reasonable approach
for std::sort, but not for most of the other cases.
More information about the Libstdc++
mailing list