Michael DOUBEZ wrote:
saneman a écrit :
C++ contains the following containers:
- Vector
- List
- Dequeue
- Queue
- Stack
- Map
- Set
- Bitset
Is there a single common interface for all these containers or do they
each implement their own interface?
They implement different concept ("Back insertion Container",
"Associative container" ...) to which correspond specific interface.
Please, refer to SGI STL for comprehensive reading.
http://www.sgi.com/tech/stl/
Michael
Ok but in the C++ Standard it seems that there is some basic requirement
that all containers must fulfill. In section 23.1 table 65 these
requirements are listed.
So would it be correct to say that table 65 works as a basic interface
for associative containers and sequences (but not adaptors)?
Adaptors as I understand is a subset of sequences that not necessary
fulfill all container or sequence requirements.
.