| Container |
Iterateur par déf. |
Constructeurs |
Accesseurs |
Méthodes |
| array |
- |
- |
op[] |
- |
| vector |
random-acc |
copy |
front(), back(), op[], at() |
push_back(), pop_back() |
| bit_vector |
random-acc |
copy |
front(), back(), op[] |
push_front(), pop_back(), flip(), assign() |
| list |
bidirectional |
copy |
front(), back() |
push_front(), push_back(), pop_front(), pop_back, sort(), splice(),
remove(), reverse(), unique(), merge() |
| deque |
random-acc |
copy |
front(), back(), op[], at() |
push_front(), push_back(), pop_front(), pop_back() |
| Associative |
| set |
bidirectional |
copy |
find(), lower_bound(), upper_bound(), equal_range() |
count() |
| multiset |
bidirectional |
copy |
find(), lower_bound(), upper_bound(), equal_range() |
count() |
| map |
bidirectional |
copy |
find(), lower_bound(), upper_bound(), equal_range() |
count(), op[] |
| multimap |
bidirectional |
copy |
find(), lower_bound(), upper_bound(), equal_range() |
count() |
| Adaptor |
| stack |
n/a |
copy |
top() |
push(), pop() |
| queue |
n/a |
copy |
front(), back() |
push(), pop() |
| priority_queue |
n/a |
copy |
top() |
push(), pop() |
| Special |
| bitset |
n/a |
copy |
front(), back(), op[] |
push_front(), pop_back(), test(), any(), none(), op&=, op|=,
op^=, op<<, op>>, set(), reset(), to_ulong(), to_string(), count(),
flip() |
| Nom |
Retourne |
Arguments |
Description |
| Finding |
| adjacent_find |
i |
i,i[,p2] |
find sequence of equal elements |
| binary_search |
B |
f,f,V[,c] |
find a value in a sorted range |
| count |
void |
i,i,V,R |
count matching elements |
| count_if |
void |
i,i,p,R |
count elements which satisfy p |
| find |
i |
i,i,V |
locate an equal element |
| find_if |
i |
i,i,p |
locate an element which satisfies p |
| search |
f |
f,f,f,f[,p2] |
locate a subrange within a range |
| search |
f |
f,f,n,V[,p2] |
locate a subrange within a range |
| find_end |
f |
f,f,f,f[,p2] |
find the last subrange which satisfies; like search but from the end |
| lower_bound |
f |
f,f,V[,c] |
returns the first possible insert location into a sorted collection |
| upper_bound |
f |
f,f,V[,c] |
returns the last possible insert location into a sorted collection |
| equal_range |
P |
f,f,V[,c] |
returns the range of possible insert locations into a sorted collection |
| min_element |
i |
i,i[,c] |
find the smallest |
| max_element |
i |
i,i[,c] |
find the largest |
| Applying |
| for_each |
F |
f,f,F |
apply a function to a range |
| transform |
o |
i,i,o,F or i,i,i,o,F2 |
apply an operation against a range |
| replace |
v |
f,f,V,V |
replace all matching elements with a new one |
| replace_if |
v |
f,f,p,V |
replace all matching elements with a new one |
| replace_copy |
o |
i,i,o,V,V |
replace during copy, all matching elements with a new one |
| replace_copy_if |
o |
i,i,o,p,V |
replace during copy, all matching elements with a new one |
| Filling |
| fill |
v |
f,f,V |
fill with a value |
| fill_n |
v |
f,n,V |
fill with a single value |
| generate |
v |
f,f,unary_op |
fill with generated values |
| generate_n |
v |
f,n,unary_op |
fill with generated values |
| Enumerating |
| count |
v |
i,i,V,R |
count the number of matches |
| count_if |
v |
i,i,p2,R |
count the number of matches, using pred |
| mismatch |
P |
i,i,i[,p2] |
returns the first subrange than does not match |
| equal |
B |
i,i,i[,p2] |
true if the ranges match |
| lexicographical_compare |
B |
i,i,i,[,c] |
true if the ranges match |
| Nom |
Retourne |
Arguments |
Description |
| Copying |
| copy |
o |
i,i,o |
copy one range to another |
| copy_backward |
b |
b,b,b |
reverse copy one range to another |
| swap_ranges |
f |
f,f,f |
swap one range with another |
| Ordering |
| remove |
f |
f,f,V |
move unwanted entries to the end of the range |
| remove_if |
f |
f,f,p |
move unwanted entries to the end of the range |
| remove_copy |
o |
i,i,o,V |
copy and remove unwanted entries |
| remove_copy_if |
o |
i,i,o,p |
copy and remove unwanted entries |
| unique |
f |
f,f[,p2] |
collapse the range so that multiple copies of equal elements are removed |
| unique_copy |
o |
i.i,o[,p2] |
copy the range skipping multiple copies of equal elements |
| reverse |
v |
b,b |
reverse the order of a range |
| reverse_copy |
o |
b,b,o |
reverse the order of a range |
| rotate |
v |
f,f,f |
rotate a range, given first, middle and last |
| rotate_copy |
o |
f,f,f,o |
rotate and copy, given first, middle and last |
| random_shuffle |
v |
r,r[,rand_gen] |
shuffle the order of a range |
| Sorting |
| partition |
b |
b,b,p |
swaps to make all the pred-successes precede the pred-failures |
| stable_partition |
b |
b,b,p |
swaps to make all the pred-successes precede the pred-failures; preserves relative order |
| sort |
v |
r,r[,c] |
sorts the elements in the range |
| stable_sort |
v |
r,r[,c] |
sorts the range; preserve relative order on the "equal" ones |
| partial_sort |
v |
r,r,r[,c] |
sorts the range into the subrange |
| partial_sort_copy |
r |
i,i,r,r[,c] |
sorts the range into the subrange at a new location |
| nth_element |
v |
r,r,r[,c] |
sorts the range so that one specific one is in the right place |
| next_permutation |
B |
b,b[,c] |
transforms range to next permutation |
| prev_permutation |
B |
b,b[,c] |
tranforms range to previous permutation |