summaryrefslogtreecommitdiffstats
path: root/include/exception
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-06-13 07:08:02 +0000
committerEric Fiselier <eric@efcs.ca>2015-06-13 07:08:02 +0000
commit3a0e430cd45bcaba88d5eb001b7f4865d904b6a6 (patch)
treed95bf8c580a71d4254f6eb08260870f47fa68d56 /include/exception
parent6d7a2cb57d3ed07aadbb47c207d8ec6cbeb706a0 (diff)
downloadexternal_libcxx-3a0e430cd45bcaba88d5eb001b7f4865d904b6a6.tar.gz
external_libcxx-3a0e430cd45bcaba88d5eb001b7f4865d904b6a6.tar.bz2
external_libcxx-3a0e430cd45bcaba88d5eb001b7f4865d904b6a6.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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@239664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/exception')
-rw-r--r--include/exception8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/exception b/include/exception
index 39d251ec4..5a905e7e5 100644
--- a/include/exception
+++ b/include/exception
@@ -195,9 +195,7 @@ void
throw_with_nested(_Tp&& __t, typename enable_if<
is_class<typename remove_reference<_Tp>::type>::value &&
!is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
-#if _LIBCPP_STD_VER > 11 && __has_feature(is_final)
- && !is_final<typename remove_reference<_Tp>::type>::value
-#endif
+ && !__libcpp_is_final<typename remove_reference<_Tp>::type>::value
>::type* = 0)
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
throw_with_nested (_Tp& __t, typename enable_if<
@@ -217,9 +215,7 @@ void
throw_with_nested(_Tp&& __t, typename enable_if<
!is_class<typename remove_reference<_Tp>::type>::value ||
is_base_of<nested_exception, typename remove_reference<_Tp>::type>::value
-#if _LIBCPP_STD_VER > 11 && __has_feature(is_final)
- || is_final<typename remove_reference<_Tp>::type>::value
-#endif
+ || __libcpp_is_final<typename remove_reference<_Tp>::type>::value
>::type* = 0)
#else // _LIBCPP_HAS_NO_RVALUE_REFERENCES
throw_with_nested (_Tp& __t, typename enable_if<