|
Boost Users : |
Subject: Re: [Boost-users] [container] vector::resize() - value-initialization vs default-initialization
From: Adam Romanek (romanek.adam_at_[hidden])
Date: 2014-04-16 08:38:04
On 04/16/2014 02:13 PM, Ion Gaztañaga wrote:
> El 16/04/2014 13:29, Adam Romanek escribió:
>> Is the documentation of Boost.Container wrong in this case? Or the
>> behavior of the container differs from the one defined by the standard?
>
> The documentation is wrong, value initialization was used.
Interesting, since the implementation of resize() calls something like
"container_detail::insert_default_constructed_n_proxy" I assumed the
documentation was OK.
> Do you think something like:
>
> "if T's default constructor throws" -> "if T's value/default
> initialization throws" is clear enough?
Yes, this should be enough, provided that the "Effects" sentences are
also corrected, i.e. "New elements are default constructed" will be
changed to something like "New elements are value/default -initialized"
(both for the constructor and resize() method).
> If you don't mind, a single ticket with the comments of your post will
> be enough to do all the changes.
Will do.
WBR,
Adam Romanek
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net