From a5bd48939cdfdfbc9871d8d80ec1cb0e3d91c745 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Fri, 19 Jul 2019 17:13:39 +0000 Subject: [PATCH] [libc++] Use _EnableIf instead of std::enable_if in deduction guides for map and set llvm-svn: 366594 --- libcxx/include/map | 24 ++++++++++++------------ libcxx/include/set | 24 ++++++++++++------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/libcxx/include/map b/libcxx/include/map index eb6ae57..b6f89bf 100644 --- a/libcxx/include/map +++ b/libcxx/include/map @@ -1474,26 +1474,26 @@ private: #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, - class = enable_if_t::value, void>, - class = enable_if_t<__is_allocator<_Allocator>::value, void>> + class = _EnableIf::value, void>, + class = _EnableIf<__is_allocator<_Allocator>::value, void>> map(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare, _Allocator>; template>, class _Allocator = allocator>, - class = enable_if_t::value, void>, - class = enable_if_t<__is_allocator<_Allocator>::value, void>> + class = _EnableIf::value, void>, + class = _EnableIf<__is_allocator<_Allocator>::value, void>> map(initializer_list>, _Compare = _Compare(), _Allocator = _Allocator()) -> map, _Tp, _Compare, _Allocator>; template::value, void>> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> map(_InputIterator, _InputIterator, _Allocator) -> map<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, less<__iter_key_type<_InputIterator>>, _Allocator>; template::value, void>> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> map(initializer_list>, _Allocator) -> map, _Tp, less>, _Allocator>; #endif @@ -2131,26 +2131,26 @@ private: #ifndef _LIBCPP_HAS_NO_DEDUCTION_GUIDES template>, class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>, - class = enable_if_t::value, void>, - class = enable_if_t<__is_allocator<_Allocator>::value, void>> + class = _EnableIf::value, void>, + class = _EnableIf<__is_allocator<_Allocator>::value, void>> multimap(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, _Compare, _Allocator>; template>, class _Allocator = allocator>, - class = enable_if_t::value, void>, - class = enable_if_t<__is_allocator<_Allocator>::value, void>> + class = _EnableIf::value, void>, + class = _EnableIf<__is_allocator<_Allocator>::value, void>> multimap(initializer_list>, _Compare = _Compare(), _Allocator = _Allocator()) -> multimap, _Tp, _Compare, _Allocator>; template::value, void>> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> multimap(_InputIterator, _InputIterator, _Allocator) -> multimap<__iter_key_type<_InputIterator>, __iter_mapped_type<_InputIterator>, less<__iter_key_type<_InputIterator>>, _Allocator>; template::value, void>> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> multimap(initializer_list>, _Allocator) -> multimap, _Tp, less>, _Allocator>; #endif diff --git a/libcxx/include/set b/libcxx/include/set index 70ab4d3..ac3fbbe 100644 --- a/libcxx/include/set +++ b/libcxx/include/set @@ -852,26 +852,26 @@ public: template::value_type>, class _Allocator = allocator::value_type>, - class = typename enable_if<__is_allocator<_Allocator>::value, void>::type, - class = typename enable_if::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>, + class = _EnableIf::value, void>> set(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> set::value_type, _Compare, _Allocator>; template, class _Allocator = allocator<_Key>, - class = typename enable_if<__is_allocator<_Allocator>::value, void>::type, - class = typename enable_if::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>, + class = _EnableIf::value, void>> set(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator()) -> set<_Key, _Compare, _Allocator>; template::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> set(_InputIterator, _InputIterator, _Allocator) -> set::value_type, less::value_type>, _Allocator>; template::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> set(initializer_list<_Key>, _Allocator) -> set<_Key, less<_Key>, _Allocator>; #endif @@ -1377,26 +1377,26 @@ public: template::value_type>, class _Allocator = allocator::value_type>, - class = typename enable_if<__is_allocator<_Allocator>::value, void>::type, - class = typename enable_if::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>, + class = _EnableIf::value, void>> multiset(_InputIterator, _InputIterator, _Compare = _Compare(), _Allocator = _Allocator()) -> multiset::value_type, _Compare, _Allocator>; template, class _Allocator = allocator<_Key>, - class = typename enable_if<__is_allocator<_Allocator>::value, void>::type, - class = typename enable_if::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>, + class = _EnableIf::value, void>> multiset(initializer_list<_Key>, _Compare = _Compare(), _Allocator = _Allocator()) -> multiset<_Key, _Compare, _Allocator>; template::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> multiset(_InputIterator, _InputIterator, _Allocator) -> multiset::value_type, less::value_type>, _Allocator>; template::value, void>::type> + class = _EnableIf<__is_allocator<_Allocator>::value, void>> multiset(initializer_list<_Key>, _Allocator) -> multiset<_Key, less<_Key>, _Allocator>; #endif -- 2.7.4