std::__debug::vector default ctor must not be defaulted
Jonathan Wakely
jwakely@redhat.com
Wed Apr 29 10:14:00 GMT 2015
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 :-)
More information about the Libstdc++
mailing list