diff options
Diffstat (limited to 'contrib/libc++/include/map')
-rw-r--r-- | contrib/libc++/include/map | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/contrib/libc++/include/map b/contrib/libc++/include/map index 9779b70..5c3969a 100644 --- a/contrib/libc++/include/map +++ b/contrib/libc++/include/map @@ -159,7 +159,7 @@ public: template<typename K> const_iterator find(const K& x) const; // C++14 template<typename K> - size_type count(const K& x) const; + size_type count(const K& x) const; // C++14 size_type count(const key_type& k) const; iterator lower_bound(const key_type& k); @@ -353,7 +353,7 @@ public: template<typename K> const_iterator find(const K& x) const; // C++14 template<typename K> - size_type count(const K& x) const; + size_type count(const K& x) const; // C++14 size_type count(const key_type& k) const; iterator lower_bound(const key_type& k); @@ -835,11 +835,18 @@ public: typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator; _LIBCPP_INLINE_VISIBILITY - explicit map(const key_compare& __comp = key_compare()) + map() _NOEXCEPT_( is_nothrow_default_constructible<allocator_type>::value && is_nothrow_default_constructible<key_compare>::value && is_nothrow_copy_constructible<key_compare>::value) + : __tree_(__vc(key_compare())) {} + + _LIBCPP_INLINE_VISIBILITY + explicit map(const key_compare& __comp) + _NOEXCEPT_( + is_nothrow_default_constructible<allocator_type>::value && + is_nothrow_copy_constructible<key_compare>::value) : __tree_(__vc(__comp)) {} _LIBCPP_INLINE_VISIBILITY @@ -1097,6 +1104,12 @@ public: _LIBCPP_INLINE_VISIBILITY size_type count(const key_type& __k) const {return __tree_.__count_unique(__k);} +#if _LIBCPP_STD_VER > 11 + template <typename _K2> + _LIBCPP_INLINE_VISIBILITY + typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type + count(const _K2& __k) {return __tree_.__count_unique(__k);} +#endif _LIBCPP_INLINE_VISIBILITY iterator lower_bound(const key_type& __k) {return __tree_.lower_bound(__k);} @@ -1568,11 +1581,18 @@ public: typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator; _LIBCPP_INLINE_VISIBILITY - explicit multimap(const key_compare& __comp = key_compare()) + multimap() _NOEXCEPT_( is_nothrow_default_constructible<allocator_type>::value && is_nothrow_default_constructible<key_compare>::value && is_nothrow_copy_constructible<key_compare>::value) + : __tree_(__vc(key_compare())) {} + + _LIBCPP_INLINE_VISIBILITY + explicit multimap(const key_compare& __comp) + _NOEXCEPT_( + is_nothrow_default_constructible<allocator_type>::value && + is_nothrow_copy_constructible<key_compare>::value) : __tree_(__vc(__comp)) {} _LIBCPP_INLINE_VISIBILITY @@ -1820,6 +1840,12 @@ public: _LIBCPP_INLINE_VISIBILITY size_type count(const key_type& __k) const {return __tree_.__count_multi(__k);} +#if _LIBCPP_STD_VER > 11 + template <typename _K2> + _LIBCPP_INLINE_VISIBILITY + typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type + count(const _K2& __k) {return __tree_.__count_multi(__k);} +#endif _LIBCPP_INLINE_VISIBILITY iterator lower_bound(const key_type& __k) {return __tree_.lower_bound(__k);} |