summaryrefslogtreecommitdiffstats
path: root/contrib/libc++/include/ext/hash_map
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libc++/include/ext/hash_map')
-rw-r--r--contrib/libc++/include/ext/hash_map22
1 files changed, 15 insertions, 7 deletions
diff --git a/contrib/libc++/include/ext/hash_map b/contrib/libc++/include/ext/hash_map
index 9e62e7a..bebdccb 100644
--- a/contrib/libc++/include/ext/hash_map
+++ b/contrib/libc++/include/ext/hash_map
@@ -215,7 +215,11 @@ namespace __gnu_cxx {
using namespace std;
-template <class _Tp, class _Hash, bool = is_empty<_Hash>::value>
+template <class _Tp, class _Hash, bool = is_empty<_Hash>::value
+#if __has_feature(is_final)
+ && !__is_final(_Hash)
+#endif
+ >
class __hash_map_hasher
: private _Hash
{
@@ -247,7 +251,11 @@ public:
{return __hash_(__x);}
};
-template <class _Tp, class _Pred, bool = is_empty<_Pred>::value>
+template <class _Tp, class _Pred, bool = is_empty<_Pred>::value
+#if __has_feature(is_final)
+ && !__is_final(_Pred)
+#endif
+ >
class __hash_map_equal
: private _Pred
{
@@ -499,8 +507,8 @@ private:
typedef typename __table::__node_traits __node_traits;
typedef typename __table::__node_allocator __node_allocator;
typedef typename __table::__node __node;
- typedef __hash_map_node_destructor<__node_allocator> _D;
- typedef unique_ptr<__node, _D> __node_holder;
+ typedef __hash_map_node_destructor<__node_allocator> _Dp;
+ typedef unique_ptr<__node, _Dp> __node_holder;
typedef allocator_traits<allocator_type> __alloc_traits;
public:
typedef typename __alloc_traits::pointer pointer;
@@ -671,7 +679,7 @@ typename hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__node_holder
hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type& __k)
{
__node_allocator& __na = __table_.__node_alloc();
- __node_holder __h(__node_traits::allocate(__na, 1), _D(__na));
+ __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
__node_traits::construct(__na, _VSTD::addressof(__h->__value_.first), __k);
__h.get_deleter().__first_constructed = true;
__node_traits::construct(__na, _VSTD::addressof(__h->__value_.second));
@@ -776,8 +784,8 @@ private:
typedef typename __table::__node_traits __node_traits;
typedef typename __table::__node_allocator __node_allocator;
typedef typename __table::__node __node;
- typedef __hash_map_node_destructor<__node_allocator> _D;
- typedef unique_ptr<__node, _D> __node_holder;
+ typedef __hash_map_node_destructor<__node_allocator> _Dp;
+ typedef unique_ptr<__node, _Dp> __node_holder;
typedef allocator_traits<allocator_type> __alloc_traits;
public:
typedef typename __alloc_traits::pointer pointer;
OpenPOWER on IntegriCloud