-
Notifications
You must be signed in to change notification settings - Fork 3.3k
container
Junyan Liu edited this page Aug 16, 2017
·
3 revisions
以下列出主要容器以及它们主要的接口,详情请到项目中查看。
-
vector(向量)
- constructor
- destructor
- operator=
- Iterators
- begin
- cbegin
- end
- cend
- rbegin
- crbegin
- rend
- crend
- Capacity
- empty
- size
- max_size
- capacity
- reserve
- shrink_to_fit
- Element access
- operator[]
- at
- front
- back
- data
- Modifiers
- assign
- emplace
- emplace_back
- push_back
- pop_back
- insert
- erase
- clear
- resize
- reverse
- swap
-
list(双向链表)
- constructor
- destructor
- operator=
- Iterators
- begin
- cbegin
- end
- cend
- rbegin
- crbegin
- rend
- crend
- Capacity
- empty
- size
- max_size
- Element access
- front
- back
- Modifiers
- assign
- push_front
- push_back
- pop_front
- pop_back
- emplace
- emplace_front
- emplace_back
- insert
- erase
- clear
- resize
- swap
- Operations
- splice
- remove
- remove_if
- unique
- merge
- sort
- reverse
-
deque(双端队列)
- constructor
- destructor
- operator=
- Iterators
- begin
- cbegin
- end
- cend
- rbegin
- crbegin
- rend
- crend
- Capacity
- empty
- size
- max_size
- resize
- shrink_to_fit
- Element access
- operator[]
- at
- front
- back
- Modifiers
- assign
- push_front
- push_back
- pop_front
- pop_back
- emplace
- emplace_front
- emplace_back
- insert
- erase
- clear
- swap
-
map/multimap(映射)
- constructor
- operator=
- Iterators
- begin
- cbegin
- end
- cend
- rbegin
- crbegin
- rend
- crend
- Capacity
- empty
- size
- max_size
- Element access
- at
- operator[]
- Modifiers
- emplace
- emplace_hint
- insert
- erase
- clear
- swap
- Operations
- find
- count
- lower_bound
- upper_bound
- equal_range
-
set/multiset(集合)
- constructor
- operator=
- Iterators
- begin
- cbegin
- end
- cend
- rbegin
- crbegin
- rend
- crend
- Capacity
- empty
- size
- max_size
- Modifiers
- emplace
- emplace_hint
- insert
- erase
- clear
- swap
- Operations
- find
- count
- lower_bound
- upper_bound
- equal_range
-
unordered_map/unordered_multimap(无序映射)
- constructor
- operator=
- Iterators
- begin
- end
- cbegin
- cend
- Capacity
- empty
- size
- max_size
- Element access
- at
- operator[]
- Modifiers
- emplace
- emplace_hint
- insert
- erase
- clear
- swap
- Operations
- find
- count
- equal_range
- Buckets
- begin
- end
- cbegin
- cend
- bucket_count
- max_bucket_count
- bucket_size
- bucket
-
unordered_set/unordered_multiset(无序集合)
- constructor
- operator=
- Iterators
- begin
- end
- cbegin
- cend
- Capacity
- size
- max_size
- empty
- Modifiers
- emplace
- emplace_hint
- insert
- erase
- clear
- swap
- Operations
- find
- count
- equal_range
- Buckets
- begin
- end
- cbegin
- cend
- bucket_count
- max_bucket_count
- bucket_size
- bucket
-
basic_string (字符序列)
- constructor
- destructor
- operator=
- Iterators
- begin
- cbegin
- end
- cend
- rbegin
- crbegin
- rend
- crend
- Capacity
- empty
- size
- length
- max_size
- capacity
- reserve
- shrink_to_fit
- Element access
- operator[]
- at
- front
- back
- data
- c_str
- Modifiers
- append
- insert
- erase
- push_back
- pop_back
- clear
- resize
- operator+=
- Operations
- compare
- substr
- replace
- reverse
- find
- rfind
- find_first_of
- find_first_not_of
- find_last_of
- find_last_not_of
- count
- swap