diff options
author | David Chisnall <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
---|---|---|
committer | David Chisnall <theraven@FreeBSD.org> | 2012-03-14 00:09:36 +0000 |
commit | 94e3ee44c3581ff37c5e01b5ffe5eb16d30079a7 (patch) | |
tree | 077f044b08d256dd8348f977fe56d18c08fccd78 /contrib/libc++/include/ext | |
parent | 064f517d2b6ebfc42bf636d3fb85ac815196f134 (diff) | |
parent | 362d815b81e2b4b66c33b99203d821b8928607e1 (diff) |
Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!
Approved by: dim (mentor)
Notes
Notes:
svn path=/head/; revision=232950
Diffstat (limited to 'contrib/libc++/include/ext')
-rw-r--r-- | contrib/libc++/include/ext/hash_map | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/contrib/libc++/include/ext/hash_map b/contrib/libc++/include/ext/hash_map index 9e62e7a777d6..bebdccb3c41c 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; |