Standard interface for containers?

S

saneman

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?
 
M

Michael DOUBEZ

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
 
S

saneman

Michael said:
saneman a écrit :

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.
 

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,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top