std::vector works with classes that are not default constructible?

Viewed 3890

I've read in several places that std::vector requires it's template argument to be default constructible. Today I just tried it with one of my classes that has a deleted default constructor, and to my surprise it seems to be working just fine (with std::vector's default constructor). Is this portable behavior, or is this an implementation detail of gcc's STL and should I assume vector to require it's template argument to be default constructible?

4 Answers
Related