[libcxx-commits] [libcxx] b48880f - [libc++][NFC] Use using instead of typedef in pair.h
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 11 09:23:00 PST 2023
Author: Louis Dionne
Date: 2023-02-11T09:20:20-08:00
New Revision: b48880f39f96ca2f7b287612bdaaf3428c949ee3
URL: https://github.com/llvm/llvm-project/commit/b48880f39f96ca2f7b287612bdaaf3428c949ee3
DIFF: https://github.com/llvm/llvm-project/commit/b48880f39f96ca2f7b287612bdaaf3428c949ee3.diff
LOG: [libc++][NFC] Use using instead of typedef in pair.h
Added:
Modified:
libcxx/include/__utility/pair.h
Removed:
################################################################################
diff --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h
index 69f21582fb7b..547332b4c90b 100644
--- a/libcxx/include/__utility/pair.h
+++ b/libcxx/include/__utility/pair.h
@@ -63,8 +63,8 @@ struct _LIBCPP_TEMPLATE_VIS pair
: private __non_trivially_copyable_base<_T1, _T2>
#endif
{
- typedef _T1 first_type;
- typedef _T2 second_type;
+ using first_type = _T1;
+ using second_type = _T2;
_T1 first;
_T2 second;
@@ -556,13 +556,13 @@ struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, pair<_T1, _T2> >
template <class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> >
{
- typedef _LIBCPP_NODEBUG _T1 type;
+ using type _LIBCPP_NODEBUG = _T1;
};
template <class _T1, class _T2>
struct _LIBCPP_TEMPLATE_VIS tuple_element<1, pair<_T1, _T2> >
{
- typedef _LIBCPP_NODEBUG _T2 type;
+ using type _LIBCPP_NODEBUG = _T2;
};
template <size_t _Ip> struct __get_pair;
More information about the libcxx-commits
mailing list