Fix http://llvm.org/bugs/show_bug.cgi?id=11461. Credit Alberto Ganesh Barbati.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@146345 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/unordered_map b/include/unordered_map
index 0862e3f..3b1701e 100644
--- a/include/unordered_map
+++ b/include/unordered_map
@@ -325,7 +325,11 @@
_LIBCPP_BEGIN_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 __unordered_map_hasher
: private _Hash
{
@@ -371,7 +375,11 @@
{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 __unordered_map_equal
: private _Pred
{