[libcxx-commits] [libcxx] 9451d9d - [libc++][NFC] s/enable_if<...>::type/enable_if_t<...> in span
Joe Loser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Sep 27 16:22:15 PDT 2021
Author: Joe Loser
Date: 2021-09-27T19:21:07-04:00
New Revision: 9451d9da957a07a1a3d62bbedfa209b2b8f64bef
URL: https://github.com/llvm/llvm-project/commit/9451d9da957a07a1a3d62bbedfa209b2b8f64bef
DIFF: https://github.com/llvm/llvm-project/commit/9451d9da957a07a1a3d62bbedfa209b2b8f64bef.diff
LOG: [libc++][NFC] s/enable_if<...>::type/enable_if_t<...> in span
There is some use of `enable_if<...>::type` when the rest of the file
uses `enable_if_t`. So, use `enable_if_t` consistently throughout.
Added:
Modified:
libcxx/include/span
Removed:
################################################################################
diff --git a/libcxx/include/span b/libcxx/include/span
index 260a74404fe5..fe247e893832 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -179,19 +179,19 @@ template <class _Tp, class _ElementType>
struct __is_span_compatible_container<_Tp, _ElementType,
void_t<
// is not a specialization of span
- typename enable_if<!__is_span<_Tp>::value, nullptr_t>::type,
+ enable_if_t<!__is_span<_Tp>::value, nullptr_t>,
// is not a specialization of array
- typename enable_if<!__is_std_array<_Tp>::value, nullptr_t>::type,
+ enable_if_t<!__is_std_array<_Tp>::value, nullptr_t>,
// is_array_v<Container> is false,
- typename enable_if<!is_array_v<_Tp>, nullptr_t>::type,
+ enable_if_t<!is_array_v<_Tp>, nullptr_t>,
// data(cont) and size(cont) are well formed
decltype(data(declval<_Tp>())),
decltype(size(declval<_Tp>())),
// remove_pointer_t<decltype(data(cont))>(*)[] is convertible to ElementType(*)[]
- typename enable_if<
+ enable_if_t<
is_convertible_v<remove_pointer_t<decltype(data(declval<_Tp &>()))>(*)[],
_ElementType(*)[]>,
- nullptr_t>::type
+ nullptr_t>
>>
: public true_type {};
More information about the libcxx-commits
mailing list