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/tuple b/include/tuple
index d0f832e..9ae0587 100644
--- a/include/tuple
+++ b/include/tuple
@@ -146,7 +146,11 @@
 
 // __tuple_leaf
 
-template <size_t _Ip, class _Hp, bool=is_empty<_Hp>::value>
+template <size_t _Ip, class _Hp, bool=is_empty<_Hp>::value
+#if __has_feature(is_final)
+                                 && !__is_final(_Hp)
+#endif
+         >
 class __tuple_leaf;
 
 template <size_t _Ip, class _Hp, bool _Ep>