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/exception | |
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/exception')
-rw-r--r-- | libcxx/include/exception | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libcxx/include/exception b/libcxx/include/exception index 39d251ec499..5a905e7e58d 100644 --- a/libcxx/include/exception +++ b/libcxx/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< |