[RFC] libstdc++/9626 and std::vector constructors
Paolo Carlini
pcarlini@unitus.it
Sat Feb 8 17:33:00 GMT 2003
Nathan Myers wrote:
>They are not equivalent, but the standard explicitly allows specified
>default-argument functions to be expanded into overloads. Wherever
>practical, our library should do it. We should do it as much as
>possible now, because it risks breaking the ABI to do it later.
>Breaking up the interface very often creates optimization opportunities.
>Not breaking it up may foreclose those opportunities until the next time
>we choose to break the ABI.
>
>In the case of the vector constructor, *not* overloading would mean that
>you construct an extra copy of the object, unnecessarily.
>
Ah! I suspected that could have to do with optimizations...
Anyway, many thanks Nathan! As often happens, I learned _very_ interesting
things from your reply.
Paolo.
More information about the Libstdc++
mailing list