##standard methods (incl. operators) in all STL container templates — CCC

Every STL container exposes these 3 groups of non-static methods — Copy, Compare and Count — Based on ObjectSpace manual. (Note All operators except “=” are inherited, so in this article, we treat them as methods.)

Count – empty()
Count – size()
Count – max_size()

Compare – op== deep-compares 2 containers by content. Practically used — see [[STL tutorial]]
Compare – op!=
Compare – operator-less-than, greater-than etc

Copy – swap() — swap 2 containers. seem to be a non-standard feature. See http://www.cplusplus.com/reference/algorithm/swap/
Copy – copy-ctor — copy entire container
Copy – op= — assigns entire container

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s