Changeset 784c8b6 in mainline
- Timestamp:
- 2018-07-05T21:41:22Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bd2baf8
- Parents:
- a2f01c4
- git-author:
- Dzejrou <dzejrou@…> (2018-04-30 20:19:12)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/impl/unordered_map.hpp
ra2f01c4 r784c8b6 757 757 758 758 explicit unordered_multimap(size_type bucket_count, 759 const hasher& hf = hasher{},760 const key_equal& eql = key_equal{},761 const allocator_type& alloc = allocator_type{})759 const hasher& hf = hasher{}, 760 const key_equal& eql = key_equal{}, 761 const allocator_type& alloc = allocator_type{}) 762 762 : table_{bucket_count, hf, eql}, allocator_{alloc} 763 763 { /* DUMMY BODY */ } … … 765 765 template<class InputIterator> 766 766 unordered_multimap(InputIterator first, InputIterator last, 767 size_type bucket_count = default_bucket_count_,768 const hasher& hf = hasher{},769 const key_equal& eql = key_equal{},770 const allocator_type& alloc = allocator_type{})767 size_type bucket_count = default_bucket_count_, 768 const hasher& hf = hasher{}, 769 const key_equal& eql = key_equal{}, 770 const allocator_type& alloc = allocator_type{}) 771 771 : unordered_multimap{bucket_count, hf, eql, alloc} 772 772 { … … 795 795 796 796 unordered_multimap(initializer_list<value_type> init, 797 size_type bucket_count = default_bucket_count_,798 const hasher& hf = hasher{},799 const key_equal& eql = key_equal{},800 const allocator_type& alloc = allocator_type{})797 size_type bucket_count = default_bucket_count_, 798 const hasher& hf = hasher{}, 799 const key_equal& eql = key_equal{}, 800 const allocator_type& alloc = allocator_type{}) 801 801 : unordered_multimap{bucket_count, hf, eql, alloc} 802 802 { … … 808 808 { /* DUMMY BODY */ } 809 809 810 unordered_multimap(size_type bucket_count, const hasher& hf, const allocator_type& alloc) 810 unordered_multimap(size_type bucket_count, const hasher& hf, 811 const allocator_type& alloc) 811 812 : unordered_multimap{bucket_count, hf, key_equal{}, alloc} 812 813 { /* DUMMY BODY */ } … … 814 815 template<class InputIterator> 815 816 unordered_multimap(InputIterator first, InputIterator last, 816 size_type bucket_count, const allocator_type& alloc)817 size_type bucket_count, const allocator_type& alloc) 817 818 : unordered_multimap{first, last, bucket_count, hasher{}, key_equal{}, alloc} 818 819 { /* DUMMY BODY */ } … … 820 821 template<class InputIterator> 821 822 unordered_multimap(InputIterator first, InputIterator last, 822 size_type bucket_count, const hasher& hf, const allocator_type& alloc) 823 size_type bucket_count, const hasher& hf, 824 const allocator_type& alloc) 823 825 : unordered_multimap{first, last, bucket_count, hf, key_equal{}, alloc} 824 826 { /* DUMMY BODY */ } 825 827 826 828 unordered_multimap(initializer_list<value_type> init, size_type bucket_count, 827 const allocator_type& alloc)829 const allocator_type& alloc) 828 830 : unordered_multimap{init, bucket_count, hasher{}, key_equal{}, alloc} 829 831 { /* DUMMY BODY */ } 830 832 831 833 unordered_multimap(initializer_list<value_type> init, size_type bucket_count, 832 const hasher& hf, const allocator_type& alloc)834 const hasher& hf, const allocator_type& alloc) 833 835 : unordered_multimap{init, bucket_count, hf, key_equal{}, alloc} 834 836 { /* DUMMY BODY */ } … … 917 919 918 920 template<class... Args> 919 pair<iterator, bool>emplace(Args&&... args)921 iterator emplace(Args&&... args) 920 922 { 921 923 return table_.emplace(forward<Args>(args)...); … … 925 927 iterator emplace_hint(const_iterator, Args&&... args) 926 928 { 927 return emplace(forward<Args>(args)...) .first;928 } 929 930 pair<iterator, bool>insert(const value_type& val)929 return emplace(forward<Args>(args)...); 930 } 931 932 iterator insert(const value_type& val) 931 933 { 932 934 return table_.insert(val); 933 935 } 934 936 935 pair<iterator, bool>insert(value_type&& val)937 iterator insert(value_type&& val) 936 938 { 937 939 return table_.insert(forward<value_type>(val)); … … 942 944 class = enable_if_t<is_constructible_v<value_type, T&&>, void> 943 945 > 944 pair<iterator, bool>insert(T&& val)946 iterator insert(T&& val) 945 947 { 946 948 return emplace(forward<T>(val)); … … 949 951 iterator insert(const_iterator, const value_type& val) 950 952 { 951 return insert(val) .first;953 return insert(val); 952 954 } 953 955 954 956 iterator insert(const_iterator, value_type&& val) 955 957 { 956 return insert(forward<value_type>(val)) .first;958 return insert(forward<value_type>(val)); 957 959 } 958 960
Note:
See TracChangeset
for help on using the changeset viewer.