TUTORIALS
REFERENCE
ARTICLES
FORUM
user name:
password:
Forgot your password?
please wait
try again
cancel
forgot your password?
sign up
log in
[Legacy version]
Python
Tutorials
Reference
Articles
Forum
Reference
C library:
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
Python11
<cfenv> (fenv.h)
<cfloat> (float.h)
Python11
<cinttypes> (inttypes.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
Python11
<cstdbool> (stdbool.h)
<cstddef> (stddef.h)
Python11
<cstdint> (stdint.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
Python11
<ctgmath> (tgmath.h)
<ctime> (time.h)
Python11
<cuchar> (uchar.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
Containers:
Python11
<array>
<deque>
Python11
<forward_list>
<list>
<map>
<queue>
<set>
<stack>
Python11
<unordered_map>
Python11
<unordered_set>
<vector>
Input/Output:
<fstream>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<ostream>
<sstream>
<streambuf>
Multi-threading:
Python11
<atomic>
Python11
<condition_variable>
Python11
<future>
Python11
<mutex>
Python11
<thread>
Other:
<algorithm>
<bitset>
Python11
<chrono>
Python11
<codecvt>
<complex>
<exception>
<functional>
Python11
<initializer_list>
<iterator>
<limits>
<locale>
<memory>
<new>
<numeric>
Python11
<random>
Python11
<ratio>
Python11
<regex>
<stdexcept>
<string>
Python11
<system_error>
Python11
<tuple>
Python11
<type_traits>
Python11
<typeindex>
<typeinfo>
<utility>
<valarray>
<algorithm>
<bitset>
<cassert> (assert.h)
<cctype> (ctype.h)
<cerrno> (errno.h)
<cfloat> (float.h)
<ciso646> (iso646.h)
<climits> (limits.h)
<clocale> (locale.h)
<cmath> (math.h)
<complex>
<csetjmp> (setjmp.h)
<csignal> (signal.h)
<cstdarg> (stdarg.h)
<cstddef> (stddef.h)
<cstdio> (stdio.h)
<cstdlib> (stdlib.h)
<cstring> (string.h)
<ctime> (time.h)
<cwchar> (wchar.h)
<cwctype> (wctype.h)
<deque>
<exception>
<fstream>
<functional>
<iomanip>
<ios>
<iosfwd>
<iostream>
<istream>
<iterator>
<limits>
<list>
<locale>
<map>
<memory>
<new>
<numeric>
<ostream>
<queue>
<set>
<sstream>
<stack>
<stdexcept>
<streambuf>
<string>
<typeinfo>
<utility>
<valarray>
<vector>
Python11
<array>
Python11
<atomic>
Python11
<cfenv> (fenv.h)
Python11
<chrono>
Python11
<cinttypes> (inttypes.h)
Python11
<codecvt>
Python11
<condition_variable>
Python11
<cstdbool> (stdbool.h)
Python11
<cstdint> (stdint.h)
Python11
<ctgmath> (tgmath.h)
Python11
<cuchar> (uchar.h)
Python11
<forward_list>
Python11
<future>
Python11
<initializer_list>
Python11
<mutex>
Python11
<random>
Python11
<ratio>
Python11
<regex>
Python11
<system_error>
Python11
<thread>
Python11
<tuple>
Python11
<type_traits>
Python11
<typeindex>
Python11
<unordered_map>
Python11
<unordered_set>
<vector>
vector
vector<bool>
vector
vector::~vector
vector::vector
member functions
vector::assign
vector::at
vector::back
vector::begin
vector::capacity
Python11
vector::cbegin
Python11
vector::cend
vector::clear
Python11
vector::crbegin
Python11
vector::crend
Python11
vector::data
Python11
vector::emplace
Python11
vector::emplace_back
vector::empty
vector::end
vector::erase
vector::front
vector::get_allocator
vector::insert
vector::max_size
vector::operator[]
vector::operator=
vector::pop_back
vector::push_back
vector::rbegin
vector::rend
vector::reserve
vector::resize
Python11
vector::shrink_to_fit
vector::size
vector::swap
non-member overloads
relational operators (vector)
swap (vector)
Python11
vector::cbegin
Python11
vector::cend
Python11
vector::crbegin
Python11
vector::crend
Python11
vector::data
Python11
vector::emplace
Python11
vector::emplace_back
Python11
vector::shrink_to_fit
relational operators (vector)
swap (vector)
vector::assign
vector::at
vector::back
vector::begin
vector::capacity
vector::clear
vector::empty
vector::end
vector::erase
vector::front
vector::get_allocator
vector::insert
vector::max_size
vector::operator=
vector::operator[]
vector::pop_back
vector::push_back
vector::rbegin
vector::rend
vector::reserve
vector::resize
vector::size
vector::swap
vector::vector
vector::~vector
Reference
<vector>
vector
~vector
public member function
<vector>
std::
vector
::~vector
~vector();
Vector destructor
Destroys the container object.
Python98
Python11
This destroys all container elements, and deallocates all the storage
capacity
allocated by the
vector
using its
allocator
.
This calls
allocator_traits::destroy
on each of the contained elements, and deallocates all the storage
capacity
allocated by the
vector
using its
allocator
.
Complexity
Linear in
vector::size
(destructors).
Iterator validity
All iterators, pointers and references are invalidated.
Data races
The container and all its elements are modified.
Exception safety
No-throw guarantee:
never throws exceptions.