使用多态分配器的容器便利别名 (库基础 TS)
来自cppreference.com
下列使用多态分配器的容器便利别名和别名模板,定义于 std::experimental::pmr 命名空间。
字符串
| 别名/别名模板 | 所别名者 |
在标头
<experimental/string> 定义 | |
template<class CharT, class Traits=std::char_traits<CharT>> using basic_string =
|
std::basic_string<CharT, Traits, polymorphic_allocator<CharT>>;
|
using string =
|
pmr::basic_string<char>;
|
using wstring =
|
pmr::basic_string<wchar_t>;
|
using u16string =
|
pmr::basic_string<char16_t>;
|
using u32string =
|
pmr::basic_string<char32_t>;
|
序列容器
| 别名模板 | 所别名者 |
在标头
<experimental/vector> 定义 | |
template<class T> using vector =
|
std::vector<T, polymorphic_allocator<T>>;
|
在标头
<experimental/deque> 定义 | |
template<class T> using deque =
|
std::deque<T, polymorphic_allocator<T>>;
|
在标头
<experimental/forward_list> 定义 | |
template<class T> using forward_list =
|
std::forward_list<T, polymorphic_allocator<T>>;
|
在标头
<experimental/list> 定义 | |
template<class T> using list =
|
std::list<T, polymorphic_allocator<T>>;
|
关联容器
| 别名模板 | 所别名者 |
在标头
<experimental/map> 定义 | |
template<class Key, class T, class Compare=std::less<Key>> using map =
|
std::map<Key, T, Compare, polymorphic_allocator<std::pair<const Key, T>>>;
|
template<class Key, class T, class Compare=std::less<Key>> using multimap =
|
std::multimap<Key, T, Compare, polymorphic_allocator<std::pair<const Key, T>>>;
|
在标头
<experimental/set> 定义 | |
template<class Key, class Compare=std::less<Key>> using set =
|
std::set<Key, Compare, polymorphic_allocator<Key>>;
|
template<class Key, class Compare=std::less<Key>> using multiset =
|
std::multiset<Key, Compare, polymorphic_allocator<Key>>;
|
无序关联容器
| 别名模板 | 所别名者 |
在标头
<experimental/unordered_map> 定义 | |
template<class Key, class T, class Hash = std::hash<Key>, class Pred = std::equal_to<Key>> using unordered_map =
|
std::unordered_map<Key, T, Hash, Pred, polymorphic_allocator<std::pair<const Key, T>>>;
|
template<class Key, class T, class Hash = std::hash<Key>, class Pred = std::equal_to<Key>> using unordered_multimap =
|
std::unordered_multimap<Key, T, Hash, Pred, polymorphic_allocator<std::pair<const Key, T>>>;
|
在标头
<experimental/unordered_set> 定义 | |
template<class Key, class Hash = std::hash<Key>, class Pred = std::equal_to<Key>> using unordered_set =
|
std::unordered_set<Key, Hash, Pred, polymorphic_allocator<Key>>;
|
template<class Key, class Hash = std::hash<Key>, class Pred = std::equal_to<Key>> using unordered_multiset =
|
std::unordered_multiset<Key, Hash, Pred, polymorphic_allocator<Key>>;
|
match_results
| 别名/别名模板 | 所别名者 |
在标头
<experimental/regex> 定义 | |
template<class BidirIt> using match_results =
|
std::match_results<BidirIt, polymorphic_allocator<std::sub_match<BidirIt>>>;
|
using cmatch =
|
pmr::match_results<const char*>;
|
using wcmatch =
|
pmr::match_results<const wchar_t*>;
|
using smatch =
|
pmr::match_results<pmr::string::const_iterator>;
|
using wsmatch =
|
pmr::match_results<pmr::wstring::const_iterator>;
|