Namespaces
Variants
Views
Actions

std::basic_string<CharT,Traits,Allocator>::~basic_string

From cppreference.com
< cpp‎ | string‎ | basic string
 
 
 
std::basic_string
Member functions
basic_string::~basic_string
Element access
Iterators
Capacity
Modifiers
Search
Operations
Constants
Non-member functions
I/O
Comparison
(until C++20)(until C++20)(until C++20)(until C++20)(until C++20)(C++20)
Numeric conversions
(C++11)(C++11)(C++11)
(C++11)(C++11)
(C++11)(C++11)(C++11)
(C++11)
(C++11)
Literals
Helper classes
Deduction guides (C++17)

 
~basic_string();
(constexpr since C++20)

Destructs the basic_string. The destructors of the elements are called and the used storage is deallocated.

[edit] Complexity

Typically constant (formally linear).