{ 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } swap(1,2) { 2 1 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } copy(0,8,9) { 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 16 17 18 } copy with back_inserter { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } copy with inserter { 1 2 3 1 2 3 4 5 4 5 } copy_n(0,8,9) { 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 16 17 18 } copy_if(is_even) { 2 4 6 8 10 10 12 14 16 18 } for_each(printint) { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } for_each(reverse_iterator, printint) { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 } find(10) 10 found at offset 9 count(13) 2 values of 13, 1 values of 18 transform(sqr) { 1 4 9 16 25 36 49 64 81 100 100 121 144 169 169 196 225 256 289 324 } replace(13,666) { 1 2 3 4 5 6 7 8 9 10 10 11 12 666 666 14 15 16 17 18 } fill(13) { 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 } fill_n(5, 13) { 13 13 13 13 13 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } fill 64083 uint8_t(0x41) works fill 64083 uint16_t(0x4142) works fill 64083 uint32_t(0x41424344) works fill 64083 float(0.4242) works fill 64083 uint64_t(0x4142434445464748) works copy 64083 uint8_t(0x41) works copy 64083 uint16_t(0x4142) works copy 64083 uint32_t(0x41424344) works copy 64083 float(0.4242) works copy 64083 uint64_t(0x4142434445464748) works generate(genint) { 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 } rotate(4) { 15 16 17 18 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 } merge with (3,5,10,11,11,14) { 1 2 3 3 4 5 5 6 7 8 9 10 10 10 11 11 11 12 13 13 14 14 15 16 17 18 } inplace_merge with (3,5,10,11,11,14) { 1 2 3 3 4 5 5 6 7 8 9 10 10 10 11 11 11 12 13 13 14 14 15 16 17 18 } remove(13) { 1 2 3 4 5 6 7 8 9 10 10 11 12 14 15 16 17 18 } remove (elements 3, 4, 6, 15, and 45) { 1 2 3 6 8 9 10 10 11 12 13 13 15 16 17 18 } unique { 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 } reverse { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 } lower_bound(10) { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } 10 begins at position 9 upper_bound(10) { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } 10 ends at position 11 equal_range(10) { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } Range of 10 is { 9, 11 } Range of 0 is { 0, 0 } Range of 100 is { 20, 20 } sort { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 } { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } stable_sort { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 } { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } is_sorted unsorted=false, sorted=true find_first_of found 14 at position 15 lexicographical_compare LC1 < LC2 == true LC2 < LC2 == false LC3 < LC4 == true LC4 < LC1 == true LC1 < LC4 == false max_element max element is 18 min_element min element is 1 partial_sort { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } partial_sort_copy { 1 2 3 4 5 6 7 8 9 10 10 11 12 13 13 14 15 16 17 18 } partition { 2 4 6 8 10 10 12 14 16 18 1 3 5 7 9 11 13 13 15 17 } stable_partition { 2 4 6 8 10 10 12 14 16 18 1 3 5 7 9 11 13 13 15 17 } next_permutation { 1 2 3 } { 1 3 2 } { 2 1 3 } { 2 3 1 } { 3 1 2 } { 3 2 1 } prev_permutation { 3 2 1 } { 3 1 2 } { 2 3 1 } { 2 1 3 } { 1 3 2 } { 1 2 3 } reverse_copy { 18 17 16 15 14 13 13 12 11 10 10 9 8 7 6 5 4 3 2 1 } rotate_copy { 7 8 9 10 10 11 12 13 13 14 15 16 17 18 1 2 3 4 5 6 } search {5,6,7,8,9} at 4 {10,10,11,14} at 20 find_end {5,6,7,8,9} at 4 {10,10,11,14} at 20 search_n {14} at 15 {13,13} at 13 {10,10,10} at 20 includes includes=true, not includes=false set_difference { 1 2 3 5 } set_symmetric_difference { 1 2 3 4 5 7 8 } set_intersection { 4 6 } set_union { 1 2 3 4 4 5 6 7 8 }