@@ -1504,299 +1504,6 @@ template <typename T> struct remove_reference<T&&> { using type = T; };
15041504 OutputIt merge(InputIt1 first1, InputIt1 last1, InputIt2 first2,
15051505 InputIt2 last2, OutputIt d_first);
15061506
1507- template <class Key, class T, class Compare = less<Key>,
1508- class Allocator = allocator<pair<const Key, T>>>
1509- class map {
1510- public:
1511- map();
1512- ~map();
1513-
1514- typedef pair<const Key, T> value_type;
1515- struct iterator {
1516- struct reference {};
1517- reference operator*() const;
1518- struct pointer {};
1519- pointer operator->() const;
1520-
1521- friend bool operator==(const iterator& lhs, const iterator& rhs);
1522- friend bool operator!=(const iterator& lhs, const iterator& rhs);
1523- iterator& operator++();
1524- iterator operator++(int);
1525- };
1526- struct const_iterator {
1527- struct reference {};
1528- reference operator*() const;
1529- struct pointer {};
1530- pointer operator->() const;
1531-
1532- friend bool operator==(const const_iterator& lhs,
1533- const const_iterator& rhs);
1534- friend bool operator!=(const const_iterator& lhs,
1535- const const_iterator& rhs);
1536- const_iterator& operator++();
1537- const_iterator operator++(int);
1538- };
1539-
1540- iterator begin();
1541- iterator end();
1542- const_iterator begin() const;
1543- const_iterator end() const;
1544-
1545- bool empty() const;
1546- iterator find(const Key& key);
1547- const_iterator find(const Key& key) const;
1548- T& operator[](const Key& key);
1549- T& at(const Key& key);
1550- const T& at(const Key& key) const;
1551- pair<iterator, bool> insert(const value_type& value);
1552- template <class P>
1553- pair<iterator, bool> insert(P&& value);
1554- size_t count(const Key& key) const;
1555- };
1556-
1557- // <unordered_map>
1558- template <class Key, class T, class Hash = hash<Key>,
1559- class Pred = equal_to<Key>,
1560- class Alloc = allocator<pair<const Key, T>>>
1561- class unordered_map {
1562- public:
1563- // types
1564- typedef Key key_type;
1565- typedef T mapped_type;
1566- typedef Hash hasher;
1567- typedef Pred key_equal;
1568- typedef Alloc allocator_type;
1569- typedef pair<const key_type, mapped_type> value_type;
1570- typedef value_type& reference;
1571- typedef const value_type& const_reference;
1572- typedef typename allocator_traits<allocator_type>::pointer pointer;
1573- typedef
1574- typename allocator_traits<allocator_type>::const_pointer const_pointer;
1575- typedef typename allocator_traits<allocator_type>::size_type size_type;
1576- typedef typename allocator_traits<allocator_type>::difference_type
1577- difference_type;
1578-
1579- struct iterator {
1580- struct reference {};
1581- reference operator*() const;
1582- struct pointer {};
1583- pointer operator->() const;
1584-
1585- friend bool operator==(const iterator& lhs, const iterator& rhs);
1586- friend bool operator!=(const iterator& lhs, const iterator& rhs);
1587- iterator& operator++();
1588- iterator operator++(int);
1589- };
1590- struct const_iterator {
1591- struct reference {};
1592- reference operator*() const;
1593- struct pointer {};
1594- pointer operator->() const;
1595-
1596- friend bool operator==(const const_iterator& lhs,
1597- const const_iterator& rhs);
1598- friend bool operator!=(const const_iterator& lhs,
1599- const const_iterator& rhs);
1600- const_iterator& operator++();
1601- const_iterator operator++(int);
1602- };
1603-
1604- unordered_map() noexcept;
1605- explicit unordered_map(size_type n, const hasher& hf = hasher(),
1606- const key_equal& eql = key_equal(),
1607- const allocator_type& a = allocator_type());
1608- template <class InputIterator>
1609- unordered_map(InputIterator f, InputIterator l, size_type n = 0,
1610- const hasher& hf = hasher(),
1611- const key_equal& eql = key_equal(),
1612- const allocator_type& a = allocator_type());
1613- explicit unordered_map(const allocator_type&);
1614- unordered_map(const unordered_map&);
1615- unordered_map(const unordered_map&, const Alloc&);
1616- unordered_map(unordered_map&&) noexcept;
1617- unordered_map(unordered_map&&, const Alloc&);
1618- ~unordered_map();
1619- unordered_map& operator=(const unordered_map&);
1620-
1621- allocator_type get_allocator() const noexcept;
1622-
1623- bool empty() const noexcept;
1624- size_type size() const noexcept;
1625- size_type max_size() const noexcept;
1626-
1627- iterator begin() noexcept;
1628- iterator end() noexcept;
1629- const_iterator begin() const noexcept;
1630- const_iterator end() const noexcept;
1631- const_iterator cbegin() const noexcept;
1632- const_iterator cend() const noexcept;
1633-
1634- hasher hash_function() const;
1635- key_equal key_eq() const;
1636-
1637- iterator find(const key_type& k);
1638- const_iterator find(const key_type& k) const;
1639- size_type count(const key_type& k) const;
1640- bool contains(const key_type& k) const; // C++20
1641- pair<iterator, iterator> equal_range(const key_type& k);
1642- pair<const_iterator, const_iterator> equal_range(const key_type& k) const;
1643-
1644- mapped_type& operator[](const key_type& k);
1645- mapped_type& operator[](key_type&& k);
1646-
1647- mapped_type& at(const key_type& k);
1648- const mapped_type& at(const key_type& k) const;
1649- };
1650-
1651- template <class Key, class Compare = less<Key>,
1652- class Allocator = allocator<Key>>
1653- class set {
1654- public:
1655- typedef Key key_type;
1656- typedef key_type value_type;
1657- typedef Compare key_compare;
1658- typedef key_compare value_compare;
1659-
1660- set();
1661- set(initializer_list<value_type> l, const value_compare& c = value_compare());
1662- ~set();
1663-
1664- struct iterator {
1665- Key& operator*();
1666- friend bool operator==(const iterator& lhs, const iterator& rhs);
1667- friend bool operator!=(const iterator& lhs, const iterator& rhs);
1668- iterator& operator++();
1669- };
1670- struct const_iterator {
1671- Key& operator*() const;
1672- friend bool operator==(const const_iterator& lhs,
1673- const const_iterator& rhs);
1674- friend bool operator!=(const const_iterator& lhs,
1675- const const_iterator& rhs);
1676- const_iterator& operator++();
1677- };
1678-
1679- iterator begin();
1680- iterator end();
1681- const_iterator begin() const;
1682- const_iterator end() const;
1683-
1684- bool empty() const;
1685- iterator find(const key_type& key);
1686- const_iterator find(const key_type& key) const;
1687- pair<iterator, bool> insert(const value_type& value);
1688- size_t count(const key_type& key) const;
1689- };
1690-
1691- template <class Key, class Hash = hash<Key>, class KeyEqual = equal_to<Key>,
1692- class Allocator = allocator<Key>>
1693- class unordered_set {
1694- public:
1695- using key_type = Key;
1696- using value_type = Key;
1697- using size_type = typename allocator_traits<Allocator>::size_type;
1698- using difference_type = typename allocator_traits<Allocator>::difference_type;
1699- using hasher = Hash;
1700- using key_equal = KeyEqual;
1701- using allocator_type = Allocator;
1702- using reference = value_type&;
1703- using const_reference = const value_type&;
1704- using pointer = typename allocator_traits<Allocator>::pointer;
1705- using const_pointer = typename allocator_traits<Allocator>::const_pointer;
1706-
1707- struct iterator {
1708- reference operator*() const;
1709- pointer operator->() const;
1710-
1711- friend bool operator==(const iterator& lhs, const iterator& rhs);
1712- friend bool operator!=(const iterator& lhs, const iterator& rhs);
1713- iterator& operator++();
1714- iterator operator++(int);
1715- };
1716- struct const_iterator {
1717- const_reference operator*() const;
1718- const_pointer operator->() const;
1719-
1720- friend bool operator==(const const_iterator& lhs,
1721- const const_iterator& rhs);
1722- friend bool operator!=(const const_iterator& lhs,
1723- const const_iterator& rhs);
1724- const_iterator& operator++();
1725- const_iterator operator++(int);
1726- };
1727-
1728- unordered_set() noexcept;
1729- explicit unordered_set(size_type bucket_count, const Hash& hash = Hash(),
1730- const key_equal& equal = key_equal(),
1731- const Allocator& alloc = Allocator());
1732- unordered_set(size_type bucket_count, const Allocator& alloc);
1733- unordered_set(size_type bucket_count, const Hash& hash,
1734- const Allocator& alloc);
1735- explicit unordered_set(const Allocator& alloc);
1736- template <class InputIt>
1737- unordered_set(InputIt first, InputIt last, size_type bucket_count = 1,
1738- const Hash& hash = Hash(),
1739- const key_equal& equal = key_equal(),
1740- const Allocator& alloc = Allocator());
1741- template <class InputIt>
1742- unordered_set(InputIt first, InputIt last, size_type bucket_count,
1743- const Allocator& alloc);
1744- template <class InputIt>
1745- unordered_set(InputIt first, InputIt last, size_type bucket_count,
1746- const Hash& hash, const Allocator& alloc);
1747- unordered_set(const unordered_set& other);
1748- unordered_set(const unordered_set& other, const Allocator& alloc);
1749- unordered_set(unordered_set&& other);
1750- unordered_set(unordered_set&& other, const Allocator& alloc);
1751- unordered_set(initializer_list<value_type> init, size_type bucket_count = 1,
1752- const Hash& hash = Hash(),
1753- const key_equal& equal = key_equal(),
1754- const Allocator& alloc = Allocator());
1755- unordered_set(initializer_list<value_type> init, size_type bucket_count,
1756- const Allocator& alloc);
1757- unordered_set(initializer_list<value_type> init, size_type bucket_count,
1758- const Hash& hash, const Allocator& alloc);
1759-
1760- ~unordered_set();
1761-
1762- unordered_set& operator=(const unordered_set& other);
1763- unordered_set& operator=(unordered_set&& other);
1764- unordered_set& operator=(initializer_list<value_type> ilist);
1765-
1766- iterator begin() noexcept;
1767- const_iterator begin() const noexcept;
1768- const_iterator cbegin() const noexcept;
1769- iterator end() noexcept;
1770- const_iterator end() const noexcept;
1771- const_iterator cend() const noexcept;
1772-
1773- bool empty() const noexcept;
1774- size_type size() const noexcept;
1775-
1776- void clear() noexcept;
1777-
1778- std::pair<iterator, bool> insert(const value_type& value);
1779- std::pair<iterator, bool> insert(value_type&& value);
1780- iterator insert(const_iterator hint, const value_type& value);
1781- iterator insert(const_iterator hint, value_type&& value);
1782- template <class InputIt>
1783- void insert(InputIt first, InputIt last);
1784- void insert(initializer_list<value_type> ilist);
1785-
1786- template <class... Args>
1787- pair<iterator, bool> emplace(Args&&... args);
1788-
1789- iterator erase(const_iterator pos);
1790- iterator erase(const_iterator first, const_iterator last);
1791- size_type erase(const key_type& key);
1792-
1793- void swap(unordered_set& other);
1794-
1795- size_type count(const Key& key) const;
1796- iterator find(const Key& key);
1797- const_iterator find(const Key& key) const;
1798- };
1799-
18001507 template <typename T, class Allocator = allocator<T>>
18011508 class vector {
18021509 public:
@@ -1845,75 +1552,6 @@ template <typename T> struct remove_reference<T&&> { using type = T; };
18451552 size_t size() const;
18461553 };
18471554
1848- template <typename T, class Allocator = allocator<T>>
1849- class deque {
1850- public:
1851- using value_type = T;
1852- using size_type = typename allocator_traits<Allocator>::size_type;
1853-
1854- // Constructors.
1855- deque() {}
1856- deque(size_type, const Allocator& = Allocator()) {}
1857- deque(initializer_list<T> initializer_list, const Allocator& = Allocator()) {}
1858- deque(const deque& deque) {}
1859- ~deque();
1860-
1861- // Modifiers.
1862- void push_back(const T& value);
1863- void push_back(T&& value);
1864- void push_front(const T& value);
1865- void push_front(T&& value);
1866- template <typename... Args>
1867- T& emplace_back(Args&&... args);
1868- template <typename... Args>
1869- T& emplace_front(Args&&... args);
1870-
1871- // Iterators
1872- class InputIterator {
1873- public:
1874- InputIterator(const InputIterator&);
1875- ~InputIterator();
1876- InputIterator& operator=(const InputIterator&);
1877- InputIterator& operator++();
1878- T& operator*() const;
1879- bool operator!=(const InputIterator&) const;
1880- bool operator==(const InputIterator&) const;
1881- };
1882- typedef InputIterator iterator;
1883- typedef const InputIterator const_iterator;
1884- iterator begin() noexcept;
1885- const_iterator begin() const noexcept;
1886- iterator end() noexcept;
1887- const_iterator end() const noexcept;
1888- T* data() noexcept;
1889- const T* data() const noexcept;
1890- T& operator[](size_t n);
1891- const T& operator[](size_t n) const;
1892- T& at(size_t n);
1893- const T& at(size_t n) const;
1894- size_t size() const;
1895- };
1896-
1897- template <class T, size_t N>
1898- struct array {
1899- using value_type = T;
1900- void fill(const T& value);
1901- void swap(array& other) noexcept;
1902- size_t size() const noexcept;
1903- size_t max_size() const noexcept;
1904- bool empty() const noexcept;
1905- T& operator[](size_t n) noexcept;
1906- const T& operator[](size_t n) const noexcept;
1907- T& at(size_t n);
1908- const T& at(size_t n) const;
1909- T& front() noexcept;
1910- const T& front() const noexcept;
1911- T& back() noexcept;
1912- const T& back() const noexcept;
1913- T* data() noexcept;
1914- const T* data() const noexcept;
1915- };
1916-
19171555 template <typename T>
19181556 struct default_delete {};
19191557
0 commit comments