Chris@102: /* Chris@102: template , class Pred = equal_to, Chris@102: class Allocator = allocator > Chris@102: class hash_set Chris@102: { Chris@102: public: Chris@102: // types Chris@102: typedef Value key_type; Chris@102: typedef key_type value_type; Chris@102: typedef Hash hasher; Chris@102: typedef Pred key_equal; Chris@102: typedef Allocator allocator_type; Chris@102: typedef value_type& reference; Chris@102: typedef const value_type& const_reference; Chris@102: typedef typename allocator_traits::pointer pointer; Chris@102: typedef typename allocator_traits::const_pointer const_pointer; Chris@102: typedef typename allocator_traits::size_type size_type; Chris@102: typedef typename allocator_traits::difference_type difference_type; Chris@102: Chris@102: typedef /unspecified/ iterator; Chris@102: typedef /unspecified/ const_iterator; Chris@102: typedef /unspecified/ local_iterator; Chris@102: typedef /unspecified/ const_local_iterator; Chris@102: Chris@102: hash_set() Chris@102: noexcept( Chris@102: is_nothrow_default_constructible::value && Chris@102: is_nothrow_default_constructible::value && Chris@102: is_nothrow_default_constructible::value); Chris@102: explicit hash_set(size_type n, const hasher& hf = hasher(), Chris@102: const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: template Chris@102: hash_set(InputIterator f, InputIterator l, Chris@102: size_type n = 0, const hasher& hf = hasher(), Chris@102: const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: explicit hash_set(const allocator_type&); Chris@102: hash_set(const hash_set&); Chris@102: hash_set(const hash_set&, const Allocator&); Chris@102: hash_set(hash_set&&) Chris@102: noexcept( Chris@102: is_nothrow_move_constructible::value && Chris@102: is_nothrow_move_constructible::value && Chris@102: is_nothrow_move_constructible::value); Chris@102: hash_set(hash_set&&, const Allocator&); Chris@102: hash_set(initializer_list, size_type n = 0, Chris@102: const hasher& hf = hasher(), const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: ~hash_set(); Chris@102: hash_set& operator=(const hash_set&); Chris@102: hash_set& operator=(hash_set&&) Chris@102: noexcept( Chris@102: allocator_type::propagate_on_container_move_assignment::value && Chris@102: is_nothrow_move_assignable::value && Chris@102: is_nothrow_move_assignable::value && Chris@102: is_nothrow_move_assignable::value); Chris@102: hash_set& operator=(initializer_list); Chris@102: Chris@102: allocator_type get_allocator() const noexcept; Chris@102: Chris@102: bool empty() const noexcept; Chris@102: size_type size() const noexcept; Chris@102: size_type max_size() const noexcept; Chris@102: Chris@102: iterator begin() noexcept; Chris@102: iterator end() noexcept; Chris@102: const_iterator begin() const noexcept; Chris@102: const_iterator end() const noexcept; Chris@102: const_iterator cbegin() const noexcept; Chris@102: const_iterator cend() const noexcept; Chris@102: Chris@102: template Chris@102: pair emplace(BOOST_FWD_REF(Args)... args); Chris@102: template Chris@102: iterator emplace_hint(const_iterator position, BOOST_FWD_REF(Args)... args); Chris@102: pair insert(const value_type& obj); Chris@102: pair insert(value_type&& obj); Chris@102: iterator insert(const_iterator hint, const value_type& obj); Chris@102: iterator insert(const_iterator hint, value_type&& obj); Chris@102: template Chris@102: void insert(InputIterator first, InputIterator last); Chris@102: void insert(initializer_list); Chris@102: Chris@102: iterator erase(const_iterator position); Chris@102: size_type erase(const key_type& k); Chris@102: iterator erase(const_iterator first, const_iterator last); Chris@102: void clear() noexcept; Chris@102: Chris@102: void swap(hash_set&) Chris@102: noexcept( Chris@102: (!allocator_type::propagate_on_container_swap::value || Chris@102: __is_nothrow_swappable::value) && Chris@102: __is_nothrow_swappable::value && Chris@102: __is_nothrow_swappable::value); Chris@102: Chris@102: hasher hash_function() const; Chris@102: key_equal key_eq() const; Chris@102: Chris@102: iterator find(const key_type& k); Chris@102: const_iterator find(const key_type& k) const; Chris@102: size_type count(const key_type& k) const; Chris@102: pair equal_range(const key_type& k); Chris@102: pair equal_range(const key_type& k) const; Chris@102: Chris@102: size_type bucket_count() const noexcept; Chris@102: size_type max_bucket_count() const noexcept; Chris@102: Chris@102: size_type bucket_size(size_type n) const; Chris@102: size_type bucket(const key_type& k) const; Chris@102: Chris@102: local_iterator begin(size_type n); Chris@102: local_iterator end(size_type n); Chris@102: const_local_iterator begin(size_type n) const; Chris@102: const_local_iterator end(size_type n) const; Chris@102: const_local_iterator cbegin(size_type n) const; Chris@102: const_local_iterator cend(size_type n) const; Chris@102: Chris@102: float load_factor() const noexcept; Chris@102: float max_load_factor() const noexcept; Chris@102: void max_load_factor(float z); Chris@102: void rehash(size_type n); Chris@102: void reserve(size_type n); Chris@102: }; Chris@102: Chris@102: template , class Pred = equal_to, Chris@102: class Allocator = allocator > > Chris@102: class hash_map Chris@102: { Chris@102: public: Chris@102: // types Chris@102: typedef Key key_type; Chris@102: typedef T mapped_type; Chris@102: typedef Hash hasher; Chris@102: typedef Pred key_equal; Chris@102: typedef Allocator allocator_type; Chris@102: typedef pair value_type; Chris@102: typedef value_type& reference; Chris@102: typedef const value_type& const_reference; Chris@102: typedef typename allocator_traits::pointer pointer; Chris@102: typedef typename allocator_traits::const_pointer const_pointer; Chris@102: typedef typename allocator_traits::size_type size_type; Chris@102: typedef typename allocator_traits::difference_type difference_type; Chris@102: Chris@102: typedef /unspecified/ iterator; Chris@102: typedef /unspecified/ const_iterator; Chris@102: typedef /unspecified/ local_iterator; Chris@102: typedef /unspecified/ const_local_iterator; Chris@102: Chris@102: hash_map() Chris@102: noexcept( Chris@102: is_nothrow_default_constructible::value && Chris@102: is_nothrow_default_constructible::value && Chris@102: is_nothrow_default_constructible::value); Chris@102: explicit hash_map(size_type n, const hasher& hf = hasher(), Chris@102: const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: template Chris@102: hash_map(InputIterator f, InputIterator l, Chris@102: size_type n = 0, const hasher& hf = hasher(), Chris@102: const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: explicit hash_map(const allocator_type&); Chris@102: hash_map(const hash_map&); Chris@102: hash_map(const hash_map&, const Allocator&); Chris@102: hash_map(hash_map&&) Chris@102: noexcept( Chris@102: is_nothrow_move_constructible::value && Chris@102: is_nothrow_move_constructible::value && Chris@102: is_nothrow_move_constructible::value); Chris@102: hash_map(hash_map&&, const Allocator&); Chris@102: hash_map(initializer_list, size_type n = 0, Chris@102: const hasher& hf = hasher(), const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: ~hash_map(); Chris@102: hash_map& operator=(const hash_map&); Chris@102: hash_map& operator=(hash_map&&) Chris@102: noexcept( Chris@102: allocator_type::propagate_on_container_move_assignment::value && Chris@102: is_nothrow_move_assignable::value && Chris@102: is_nothrow_move_assignable::value && Chris@102: is_nothrow_move_assignable::value); Chris@102: hash_map& operator=(initializer_list); Chris@102: Chris@102: allocator_type get_allocator() const noexcept; Chris@102: Chris@102: bool empty() const noexcept; Chris@102: size_type size() const noexcept; Chris@102: size_type max_size() const noexcept; Chris@102: Chris@102: iterator begin() noexcept; Chris@102: iterator end() noexcept; Chris@102: const_iterator begin() const noexcept; Chris@102: const_iterator end() const noexcept; Chris@102: const_iterator cbegin() const noexcept; Chris@102: const_iterator cend() const noexcept; Chris@102: Chris@102: template Chris@102: pair emplace(BOOST_FWD_REF(Args)... args); Chris@102: template Chris@102: iterator emplace_hint(const_iterator position, BOOST_FWD_REF(Args)... args); Chris@102: pair insert(const value_type& obj); Chris@102: template Chris@102: pair insert(P&& obj); Chris@102: iterator insert(const_iterator hint, const value_type& obj); Chris@102: template Chris@102: iterator insert(const_iterator hint, P&& obj); Chris@102: template Chris@102: void insert(InputIterator first, InputIterator last); Chris@102: void insert(initializer_list); Chris@102: Chris@102: iterator erase(const_iterator position); Chris@102: size_type erase(const key_type& k); Chris@102: iterator erase(const_iterator first, const_iterator last); Chris@102: void clear() noexcept; Chris@102: Chris@102: void swap(hash_map&) Chris@102: noexcept( Chris@102: (!allocator_type::propagate_on_container_swap::value || Chris@102: __is_nothrow_swappable::value) && Chris@102: __is_nothrow_swappable::value && Chris@102: __is_nothrow_swappable::value); Chris@102: Chris@102: hasher hash_function() const; Chris@102: key_equal key_eq() const; Chris@102: Chris@102: iterator find(const key_type& k); Chris@102: const_iterator find(const key_type& k) const; Chris@102: size_type count(const key_type& k) const; Chris@102: pair equal_range(const key_type& k); Chris@102: pair equal_range(const key_type& k) const; Chris@102: Chris@102: mapped_type& operator[](const key_type& k); Chris@102: mapped_type& operator[](key_type&& k); Chris@102: Chris@102: mapped_type& at(const key_type& k); Chris@102: const mapped_type& at(const key_type& k) const; Chris@102: Chris@102: size_type bucket_count() const noexcept; Chris@102: size_type max_bucket_count() const noexcept; Chris@102: Chris@102: size_type bucket_size(size_type n) const; Chris@102: size_type bucket(const key_type& k) const; Chris@102: Chris@102: local_iterator begin(size_type n); Chris@102: local_iterator end(size_type n); Chris@102: const_local_iterator begin(size_type n) const; Chris@102: const_local_iterator end(size_type n) const; Chris@102: const_local_iterator cbegin(size_type n) const; Chris@102: const_local_iterator cend(size_type n) const; Chris@102: Chris@102: float load_factor() const noexcept; Chris@102: float max_load_factor() const noexcept; Chris@102: void max_load_factor(float z); Chris@102: void rehash(size_type n); Chris@102: void reserve(size_type n); Chris@102: }; Chris@102: Chris@102: */ Chris@102: Chris@102: template , class Pred = equal_to, Chris@102: class Allocator = allocator > Chris@102: class hash_table Chris@102: { Chris@102: public: Chris@102: // types Chris@102: typedef Value key_type; Chris@102: typedef key_type value_type; Chris@102: typedef Hash hasher; Chris@102: typedef Pred key_equal; Chris@102: typedef Allocator allocator_type; Chris@102: typedef value_type& reference; Chris@102: typedef const value_type& const_reference; Chris@102: typedef typename allocator_traits::pointer pointer; Chris@102: typedef typename allocator_traits::const_pointer const_pointer; Chris@102: typedef typename allocator_traits::size_type size_type; Chris@102: typedef typename allocator_traits::difference_type difference_type; Chris@102: Chris@102: typedef /unspecified/ iterator; Chris@102: typedef /unspecified/ const_iterator; Chris@102: typedef /unspecified/ local_iterator; Chris@102: typedef /unspecified/ const_local_iterator; Chris@102: Chris@102: hash_set() Chris@102: noexcept( Chris@102: is_nothrow_default_constructible::value && Chris@102: is_nothrow_default_constructible::value && Chris@102: is_nothrow_default_constructible::value); Chris@102: explicit hash_set(size_type n, const hasher& hf = hasher(), Chris@102: const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: template Chris@102: hash_set(InputIterator f, InputIterator l, Chris@102: size_type n = 0, const hasher& hf = hasher(), Chris@102: const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: explicit hash_set(const allocator_type&); Chris@102: hash_set(const hash_set&); Chris@102: hash_set(const hash_set&, const Allocator&); Chris@102: hash_set(hash_set&&) Chris@102: noexcept( Chris@102: is_nothrow_move_constructible::value && Chris@102: is_nothrow_move_constructible::value && Chris@102: is_nothrow_move_constructible::value); Chris@102: hash_set(hash_set&&, const Allocator&); Chris@102: hash_set(initializer_list, size_type n = 0, Chris@102: const hasher& hf = hasher(), const key_equal& eql = key_equal(), Chris@102: const allocator_type& a = allocator_type()); Chris@102: ~hash_set(); Chris@102: hash_set& operator=(const hash_set&); Chris@102: hash_set& operator=(hash_set&&) Chris@102: noexcept( Chris@102: allocator_type::propagate_on_container_move_assignment::value && Chris@102: is_nothrow_move_assignable::value && Chris@102: is_nothrow_move_assignable::value && Chris@102: is_nothrow_move_assignable::value); Chris@102: hash_set& operator=(initializer_list); Chris@102: Chris@102: allocator_type get_allocator() const noexcept; Chris@102: Chris@102: bool empty() const noexcept; Chris@102: size_type size() const noexcept; Chris@102: size_type max_size() const noexcept; Chris@102: Chris@102: iterator begin() noexcept; Chris@102: iterator end() noexcept; Chris@102: const_iterator begin() const noexcept; Chris@102: const_iterator end() const noexcept; Chris@102: const_iterator cbegin() const noexcept; Chris@102: const_iterator cend() const noexcept; Chris@102: Chris@102: template Chris@102: pair emplace(BOOST_FWD_REF(Args)... args); Chris@102: template Chris@102: iterator emplace_hint(const_iterator position, BOOST_FWD_REF(Args)... args); Chris@102: pair insert(const value_type& obj); Chris@102: pair insert(value_type&& obj); Chris@102: iterator insert(const_iterator hint, const value_type& obj); Chris@102: iterator insert(const_iterator hint, value_type&& obj); Chris@102: template Chris@102: void insert(InputIterator first, InputIterator last); Chris@102: void insert(initializer_list); Chris@102: Chris@102: iterator erase(const_iterator position); Chris@102: size_type erase(const key_type& k); Chris@102: iterator erase(const_iterator first, const_iterator last); Chris@102: void clear() noexcept; Chris@102: Chris@102: void swap(hash_set&) Chris@102: noexcept( Chris@102: (!allocator_type::propagate_on_container_swap::value || Chris@102: __is_nothrow_swappable::value) && Chris@102: __is_nothrow_swappable::value && Chris@102: __is_nothrow_swappable::value); Chris@102: Chris@102: hasher hash_function() const; Chris@102: key_equal key_eq() const; Chris@102: Chris@102: iterator find(const key_type& k); Chris@102: const_iterator find(const key_type& k) const; Chris@102: size_type count(const key_type& k) const; Chris@102: pair equal_range(const key_type& k); Chris@102: pair equal_range(const key_type& k) const; Chris@102: Chris@102: size_type bucket_count() const noexcept; Chris@102: size_type max_bucket_count() const noexcept; Chris@102: Chris@102: size_type bucket_size(size_type n) const; Chris@102: size_type bucket(const key_type& k) const; Chris@102: Chris@102: local_iterator begin(size_type n); Chris@102: local_iterator end(size_type n); Chris@102: const_local_iterator begin(size_type n) const; Chris@102: const_local_iterator end(size_type n) const; Chris@102: const_local_iterator cbegin(size_type n) const; Chris@102: const_local_iterator cend(size_type n) const; Chris@102: Chris@102: float load_factor() const noexcept; Chris@102: float max_load_factor() const noexcept; Chris@102: void max_load_factor(float z); Chris@102: void rehash(size_type n); Chris@102: void reserve(size_type n); Chris@102: };