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/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/map')
| -rw-r--r-- | libcxx/include/map | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libcxx/include/map b/libcxx/include/map index 4c79662e1ba..14eb4eb23d9 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -428,6 +428,7 @@ swap(multimap<Key, T, Compare, Allocator>& x, #include <utility> #include <functional> #include <initializer_list> +#include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -435,10 +436,8 @@ swap(multimap<Key, T, Compare, Allocator>& x, _LIBCPP_BEGIN_NAMESPACE_STD -template <class _Key, class _CP, class _Compare, bool = is_empty<_Compare>::value -#if __has_feature(is_final) - && !__is_final(_Compare) -#endif +template <class _Key, class _CP, class _Compare, + bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value > class __map_value_compare : private _Compare |

