This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: std::__debug::vector default ctor must not be defaulted


On 29/04/15 08:31 +0200, Stephan Bergmann wrote:
On 04/28/2015 07:25 PM, Jonathan Wakely wrote:
The disadvantage is that you can't compile almost useless code (an
empty vector that can never be modified to be non-empty) without
adding an explicit initializer.

Turns out there are three places in LibreOffice that use such empty const vectors (to pass into a function that takes a vector const& argument, or to verbosely return an empty vector from a function, [1][2]), but of course no problem to put explicit initializers there.

Yes, as soon as I hit send I thought of some non-useless reasons to do
it, similar to the first of those cases :-)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]