R
Rui Maciel
What requirements should a class fulfil in order to be able to be used with a STL container class?
Thanks in advance,
Rui Maciel
Thanks in advance,
Rui Maciel
What requirements should a class fulfil in order to be able to be used with a STL container class?
Copy constructible and Assignable are the two requirements for
all container classes in general. Further, if the container is
associative container, then the members (for set) and keys
(for map) must have strict weak ordering. The comparsion
operator can be explicitly provided. If not, it defaults to
operator<
What requirements should a class fulfil in order to be able to be
used with a STL container class?
Copy constructible and Assignable are the two requirements for all
container classes in general. [...]
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.