Http://www.cnblogs.com/fangyukuan/archive/2010/09/21/1832675.html
|
Sequence containers |
Associative containers |
|
Headers |
<vector> |
<deque> |
<list> |
<set> |
|
<bitset> |
Members |
Complex |
Vector |
Deque |
List |
Set |
Multiset |
Map |
Multimap |
Bitset |
|
Constructor |
* |
Constructor |
Constructor |
Constructor |
Constructor |
Constructor |
Constructor |
Constructor |
Constructor |
destructor |
O (N) |
destructor |
destructor |
destructor |
destructor |
destructor |
destructor |
destructor |
|
Operator= |
O (N) |
Operator= |
Operator= |
Operator= |
Operator= |
Operator= |
Operator= |
Operator= |
Operators |
Iterators |
Begin |
O (1) |
Begin |
Begin |
Begin |
Begin |
Begin |
Begin |
Begin |
|
End |
O (1) |
End |
End |
End |
End |
End |
End |
End |
|
Rbegin |
O (1) |
Rbegin |
Rbegin |
Rbegin |
Rbegin |
Rbegin |
Rbegin |
Rbegin |
|
Rend |
O (1) |
Rend |
Rend |
Rend |
Rend |
Rend |
Rend |
Rend |
|
Capacity |
Size |
* |
Size |
Size |
Size |
Size |
Size |
Size |
Size |
Size |
Max_size |
* |
Max_size |
Max_size |
Max_size |
Max_size |
Max_size |
Max_size |
Max_size |
|
Empty |
O (1) |
Empty |
Empty |
Empty |
Empty |
Empty |
Empty |
Empty |
|
Resize |
O (N) |
Resize |
Resize |
Resize |
|
|
|
|
|
Element access |
Front |
O (1) |
Front |
Front |
Front |
|
|
|
|
|
Back |
O (1) |
Back |
Back |
Back |
|
|
|
|
|
Operator[] |
* |
Operator[] |
Operator[] |
|
|
|
Operator[] |
|
Operator[] |
At |
O (1) |
At |
At |
|
|
|
|
|
|
Modifiers |
Assign |
O (N) |
Assign |
Assign |
Assign |
|
|
|
|
|
Insert |
* |
Insert |
Insert |
Insert |
Insert |
Insert |
Insert |
Insert |
|
Erase |
* |
Erase |
Erase |
Erase |
Erase |
Erase |
Erase |
Erase |
|
Swap |
O (1) |
Swap |
Swap |
Swap |
Swap |
Swap |
Swap |
Swap |
|
Clear |
O (N) |
Clear |
Clear |
Clear |
Clear |
Clear |
Clear |
Clear |
|
Push_front |
O (1) |
|
Push_front |
Push_front |
|
|
|
|
|
Pop_front |
O (1) |
|
Pop_front |
Pop_front |
|
|
|
|
|
Push_back |
O (1) |
Push_back |
Push_back |
Push_back |
|
|
|
|
|
Pop_back |
O (1) |
Pop_back |
Pop_back |
Pop_back |
|
|
|
|
|
Observers |
Key_comp |
O (1) |
|
|
|
Key_comp |
Key_comp |
Key_comp |
Key_comp |
|
Value_comp |
O (1) |
|
|
|
Value_comp |
Value_comp |
Value_comp |
Value_comp |
|
Operations |
Find |
O (log n) |
|
|
|
Find |
Find |
Find |
Find |
|
Count |
O (log n) |
|
|
|
Count |
Count |
Count |
Count |
Count |
Lower_bound |
O (log n) |
|
|
|
Lower_bound |
Lower_bound |
Lower_bound |
Lower_bound |
|
Upper_bound |
O (log n) |
|
|
|
Upper_bound |
Upper_bound |
Upper_bound |
Upper_bound |
|
Equal_range |
O (log n) |
|
|
|
Equal_range |
Equal_range |
Equal_range |
Equal_range |
|
Unique Members |
|
Capacity Reserve |
|
Splice Remove Remove_if Unique Merge Sort Reverse |
|
|
|
|
Set Reset Flip To_ulong To_string Test Anynone |
Excerpt from: http://www.cplusplus.com
"STL" Each container member comparison table