|
2479 | 2479 | template <class T, class Allocator>
|
2480 | 2480 | void swap(deque<T, Allocator>& x, deque<T, Allocator>& y)
|
2481 | 2481 | noexcept(noexcept(x.swap(y)));
|
| 2482 | + |
| 2483 | + namespace pmr { |
| 2484 | + template <class T> |
| 2485 | + using deque = std::deque<T,polymorphic_allocator<T>>; |
| 2486 | + } |
2482 | 2487 | }
|
2483 | 2488 | \end{codeblock}
|
2484 | 2489 |
|
|
2507 | 2512 | template <class T, class Allocator>
|
2508 | 2513 | void swap(forward_list<T, Allocator>& x, forward_list<T, Allocator>& y)
|
2509 | 2514 | noexcept(noexcept(x.swap(y)));
|
| 2515 | + |
| 2516 | + namespace pmr { |
| 2517 | + template <class T> |
| 2518 | + using forward_list = std::forward_list<T,polymorphic_allocator<T>>; |
| 2519 | + } |
2510 | 2520 | }
|
2511 | 2521 | \end{codeblock}
|
2512 | 2522 |
|
|
2535 | 2545 | template <class T, class Allocator>
|
2536 | 2546 | void swap(list<T, Allocator>& x, list<T, Allocator>& y)
|
2537 | 2547 | noexcept(noexcept(x.swap(y)));
|
| 2548 | + |
| 2549 | + namespace pmr { |
| 2550 | + template <class T> |
| 2551 | + using list = std::list<T,polymorphic_allocator<T>>; |
| 2552 | + } |
2538 | 2553 | }
|
2539 | 2554 | \end{codeblock}
|
2540 | 2555 |
|
|
2570 | 2585 | // hash support
|
2571 | 2586 | template <class T> struct hash;
|
2572 | 2587 | template <class Allocator> struct hash<vector<bool, Allocator>>;
|
| 2588 | + |
| 2589 | + namespace pmr { |
| 2590 | + template <class T> |
| 2591 | + using vector = std::vector<T,polymorphic_allocator<T>>; |
| 2592 | + } |
2573 | 2593 | }
|
2574 | 2594 | \end{codeblock}
|
2575 | 2595 |
|
|
5390 | 5410 | void swap(multimap<Key, T, Compare, Allocator>& x,
|
5391 | 5411 | multimap<Key, T, Compare, Allocator>& y)
|
5392 | 5412 | noexcept(noexcept(x.swap(y)));
|
| 5413 | + |
| 5414 | + namespace pmr { |
| 5415 | + template <class Key, class T, class Compare = less<Key>> |
| 5416 | + using map = std::map<Key, T, Compare, |
| 5417 | + polymorphic_allocator<pair<const Key,T>>>; |
| 5418 | + |
| 5419 | + template <class Key, class T, class Compare = less<Key>> |
| 5420 | + using multimap = std::multimap<Key, T, Compare, |
| 5421 | + polymorphic_allocator<pair<const Key,T>>>; |
| 5422 | + } |
5393 | 5423 | }
|
5394 | 5424 | \end{codeblock}
|
5395 | 5425 |
|
|
5453 | 5483 | void swap(multiset<Key, Compare, Allocator>& x,
|
5454 | 5484 | multiset<Key, Compare, Allocator>& y)
|
5455 | 5485 | noexcept(noexcept(x.swap(y)));
|
| 5486 | + |
| 5487 | + namespace pmr { |
| 5488 | + template <class Key, class Compare = less<Key>> |
| 5489 | + using set = std::set<Key, Compare, |
| 5490 | + polymorphic_allocator<Key>>; |
| 5491 | + |
| 5492 | + template <class Key, class Compare = less<Key>> |
| 5493 | + using multiset = std::multiset<Key, Compare, |
| 5494 | + polymorphic_allocator<Key>>; |
| 5495 | + } |
5456 | 5496 | }
|
5457 | 5497 | \end{codeblock}
|
5458 | 5498 |
|
|
6847 | 6887 | template <class Key, class T, class Hash, class Pred, class Alloc>
|
6848 | 6888 | bool operator!=(const unordered_multimap<Key, T, Hash, Pred, Alloc>& a,
|
6849 | 6889 | const unordered_multimap<Key, T, Hash, Pred, Alloc>& b);
|
| 6890 | + |
| 6891 | + namespace pmr { |
| 6892 | + template <class Key, |
| 6893 | + class T, |
| 6894 | + class Hash = hash<Key>, |
| 6895 | + class Pred = equal_to<Key>> |
| 6896 | + using unordered_map = |
| 6897 | + std::unordered_map<Key, T, Hash, Pred, |
| 6898 | + polymorphic_allocator<pair<const Key,T>>>; |
| 6899 | + template <class Key, |
| 6900 | + class T, |
| 6901 | + class Hash = hash<Key>, |
| 6902 | + class Pred = equal_to<Key>> |
| 6903 | + using unordered_multimap = |
| 6904 | + std::unordered_multimap<Key, T, Hash, Pred, |
| 6905 | + polymorphic_allocator<pair<const Key,T>>>; |
| 6906 | + |
| 6907 | + } |
6850 | 6908 | }
|
6851 | 6909 | \end{codeblock}
|
6852 | 6910 |
|
|
6894 | 6952 | template <class Key, class Hash, class Pred, class Alloc>
|
6895 | 6953 | bool operator!=(const unordered_multiset<Key, Hash, Pred, Alloc>& a,
|
6896 | 6954 | const unordered_multiset<Key, Hash, Pred, Alloc>& b);
|
| 6955 | + |
| 6956 | + namespace pmr { |
| 6957 | + template <class Key, |
| 6958 | + class Hash = hash<Key>, |
| 6959 | + class Pred = equal_to<Key>> |
| 6960 | + using unordered_set = std::unordered_set<Key, Hash, Pred, |
| 6961 | + polymorphic_allocator<Key>>; |
| 6962 | + |
| 6963 | + template <class Key, |
| 6964 | + class Hash = hash<Key>, |
| 6965 | + class Pred = equal_to<Key>> |
| 6966 | + using unordered_multiset = std::unordered_multiset<Key, Hash, Pred, |
| 6967 | + polymorphic_allocator<Key>>; |
| 6968 | + } |
6897 | 6969 | }
|
6898 | 6970 | \end{codeblock}
|
6899 | 6971 |
|
|
0 commit comments