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: Vector's ctor.


Dhruv Matani <dhruvbird@gmx.net> writes:

| Hello,
| 	I wanted to know if such a construct is a valid according to the C++
| standard. If it is then there is a problem in the library.
| 
| std::vector<int> iv(0, 1);

Yes.  There is no requirement that n shall be nonzero.

-- Gaby


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