diff options
| author | Eric Fiselier <eric@efcs.ca> | 2015-06-13 07:08:02 +0000 |
|---|---|---|
| committer | Eric Fiselier <eric@efcs.ca> | 2015-06-13 07:08:02 +0000 |
| commit | ee187e247bc2c7b97eb345e1de7f5ccf151e24e5 (patch) | |
| tree | 8c11cf17b11efa5d05ba2350281d9ebf93964029 /libcxx/include/unordered_map | |
| parent | 8fcf50515b554bacfb8bc7307149d862b6c2cb93 (diff) | |
| download | bcm5719-llvm-ee187e247bc2c7b97eb345e1de7f5ccf151e24e5.tar.gz bcm5719-llvm-ee187e247bc2c7b97eb345e1de7f5ccf151e24e5.zip | |
[libcxx] Fix detection of __is_final.
Summary: Currently we only enable the use of __is_final(...) with Clang. GCC also provides __is_final(...) since 4.7 in all standard modes. This patch creates the macro _LIBCPP_HAS_IS_FINAL to note the availability of `__is_final`.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D8795
llvm-svn: 239664
Diffstat (limited to 'libcxx/include/unordered_map')
| -rw-r--r-- | libcxx/include/unordered_map | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map index 6cd82f5c9f5..15d5176f7ce 100644 --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -361,10 +361,8 @@ template <class Key, class T, class Hash, class Pred, class Alloc> _LIBCPP_BEGIN_NAMESPACE_STD -template <class _Key, class _Cp, class _Hash, bool = is_empty<_Hash>::value -#if __has_feature(is_final) - && !__is_final(_Hash) -#endif +template <class _Key, class _Cp, class _Hash, + bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value > class __unordered_map_hasher : private _Hash @@ -412,10 +410,8 @@ public: {return __hash_(__x);} }; -template <class _Key, class _Cp, class _Pred, bool = is_empty<_Pred>::value -#if __has_feature(is_final) - && !__is_final(_Pred) -#endif +template <class _Key, class _Cp, class _Pred, + bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value > class __unordered_map_equal : private _Pred |

