Opened 9 years ago
Closed 9 years ago
#9915 closed Bugs (fixed)
Documentation issues regarding vector constructors and resize methods - value/default initialization
Reported by: | Owned by: | Ion Gaztañaga | |
---|---|---|---|
Milestone: | Boost 1.56.0 | Component: | container |
Version: | Boost 1.55.0 | Severity: | Problem |
Keywords: | vector, documentation | Cc: |
Description
As for Boost 1.54:
The documentation of boost::container::vector::resize(size_type) says the elements are default constructed. The same applies to the respective constructor: boost::container::vector(size_type n). Seems that the implementation is different - the new elements are value-initialized, just as it is defined for the std::vector in C++11.
As for Boost 1.55:
The documentation of boost::container::resize(size_type new_size, default_init_t) says the new elements are value initialized, where it should say they are default initialized. Note that the documentation of the respective constructor is correct and says the elements are default constructed.
Fixed in develop branch:
SHA-1: bffd6c036c4402d91f284bc5c5e755a374e87b3d