-
Notifications
You must be signed in to change notification settings - Fork 3.3k
container
刘俊延 edited this page Jan 31, 2017
·
3 revisions
##容器 以下列出主要容器以及它们主要的接口,详情请到项目中查看。
-
vector(向量)
- constructor
- destructor
- operator=
- Iterators
- begin
- end
- rbegin
- rend
- Capacity
- empty
- size
- max_size
- capacity
- shrink_to_fit
- Element access
- operator[]
- at
- front
- back
- Modifiers
- assign
- push_back
- pop_back
- insert
- erase
- clear
- resize
- reserve
- swap
- Operations
- reverse
-
list(双向链表)
- constructor
- destructor
- operator=
- Iterators
- begin
- end
- rbegin
- rend
- Capacity
- empty
- size
- max_size
- Element access
- front
- back
- Modifiers
- assign
- push_front
- push_back
- pop_front
- pop_back
- insert
- erase
- clear
- resize
- swap
- Operations
- splice
- remove
- remove_if
- unique
- merge
- sort
- reverse
-
deque(双端队列)
- constructor
- destructor
- operator=
- Iterators
- begin
- end
- rbegin
- rend
- Capacity
- empty
- size
- max_size
- Element access
- operator[]
- at
- front
- back
- Modifiers
- assign
- push_front
- push_back
- pop_front
- pop_back
- insert
- erase
- clear
- resize
- swap
-
map(映射)
- constructor
- operator=
- Iterators
- begin
- end
- rbegin
- rend
- Capacity
- empty
- size
- max_size
- Element access
- operator[]
- Modifiers
- insert
- erase
- clear
- swap
- Operations
- find
- count
- lower_bound
- upper_bound
- equal_range
-
set(集合)
- constructor
- operator=
- Iterators
- begin
- end
- rbegin
- rend
- Capacity
- empty
- size
- max_size
- Element access
- operator[]
- at
- Modifiers
- insert
- erase
- clear
- swap
- Operations
- find
- count
- lower_bound
- upper_bound
- equal_range
-
unordered_map(无序映射)
- constructor
- operator=
- Iterators
- begin
- end
- Capacity
- empty
- size
- max_size
- Element access
- operator[]
- Modifiers
- insert
- insert_noresize
- erase
- clear
- swap
- Operations
- find
- count
- equal_range
- Buckets
- reserve
- bucker_count
- max_bucket_count
- elems_in_bucket
-
unordered_set(无序集合)
- constructor
- operator=
- Iterators
- begin
- end
- Capacity
- size
- max_size
- empty
- Modifiers
- insert
- insert_noresize
- erase
- clear
- swap
- Operations
- find
- count
- equal_range
- Buckets
- reserve
- bucker_count
- max_bucket_count
- elems_in_bucket
-
basic_string (字符序列)
- constructor
- destructor
- operator=
- Iterators
- begin
- end
- rbegin
- rend
- Capacity
- empty
- size
- length
- max_size
- capacity
- shrink_to_fit
- Element access
- operator[]
- at
- front
- back
- data
- c_str
- Modifiers
- insert
- erase
- clear
- add_back
- add_front
- operator+=
- Operations
- compare
- substr
- remove
- remove_if
- replace
- replace
- find
- rfind
- count
- reverse
- swap