[libcxx-commits] [libcxx] 953ac95 - [libc++][NFC] Use aliases instead of typedefs in std::array (#74491)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Dec 5 08:21:10 PST 2023
Author: Louis Dionne
Date: 2023-12-05T11:21:06-05:00
New Revision: 953ac952eb17ef3a370699958f760ee81acdbe1a
URL: https://github.com/llvm/llvm-project/commit/953ac952eb17ef3a370699958f760ee81acdbe1a
DIFF: https://github.com/llvm/llvm-project/commit/953ac952eb17ef3a370699958f760ee81acdbe1a.diff
LOG: [libc++][NFC] Use aliases instead of typedefs in std::array (#74491)
As requested in https://github.com/llvm/llvm-project/pull/74482.
Added:
Modified:
libcxx/include/array
Removed:
################################################################################
diff --git a/libcxx/include/array b/libcxx/include/array
index 708a748e08047..127092f6bca9b 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -164,18 +164,18 @@ template <class _Tp, size_t _Size>
struct _LIBCPP_TEMPLATE_VIS array
{
// types:
- typedef array __self;
- typedef _Tp value_type;
- typedef value_type& reference;
- typedef const value_type& const_reference;
- typedef value_type* iterator;
- typedef const value_type* const_iterator;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
- typedef size_t size_type;
- typedef ptr
diff _t
diff erence_type;
- typedef std::reverse_iterator<iterator> reverse_iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ using __self = array;
+ using value_type = _Tp;
+ using reference = value_type&;
+ using const_reference = const value_type&;
+ using iterator = value_type*;
+ using const_iterator = const value_type*;
+ using pointer = value_type*;
+ using const_pointer = const value_type*;
+ using size_type = size_t;
+ using
diff erence_type = ptr
diff _t;
+ using reverse_iterator = std::reverse_iterator<iterator>;
+ using const_reverse_iterator = std::reverse_iterator<const_iterator>;
_Tp __elems_[_Size];
More information about the libcxx-commits
mailing list