Can I construct a std :: vector with null elements via a non-default constructor
I mean something like this:
std::vector<T> v(0);
Everything is good? In the Standard, I don't see a requirement like this.
+3
FrozenHeart
source
to share
1 answer
This is clearly defined. The standard places no restrictions on the value n
passed to this constructor. 0
- a valid value of the type size_type
(whatever is).
+6
Brian
source
to share