vector::size_type

J

James Kanze

* James Kanze:
That's what I thought, but as it turned it out that requirement was
removed for all containers except basic_string prior to the 1998
standardization.
See my article elsethread.
If you have information to the contrary, please share;

The only thing I have is my copy of ISO 14882:1998. In §20.4.1,
The default allocator, you have:

template< class T > class allocator {
public:
typedef size_t size_type ;
...
} ;

But you're right that the standard doesn't seem to require it to
be used.

Not requiring its use doesn't really make sense, of
course---suppose I instantiate vector with an allocator where
size_type is an extended unsigned integer, for example---but
then, not much related to allocators makes sense.
also, if anyone has hard information about the rumours about
reversing that decision in C++0x then that would certainly
also be nice!

Agreed. It does seem strange.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top