From patchwork Tue May 23 19:41:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ken Matsui X-Patchwork-Id: 98153 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2377495vqo; Tue, 23 May 2023 12:42:38 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7JG983F5TmB2mRlBfLOt+BUpmIjBst5z8sTTFo1JMfjSUWoDO5yvi8eTHQ3fr5iHcdmElf X-Received: by 2002:a17:907:2d90:b0:96f:a935:8998 with SMTP id gt16-20020a1709072d9000b0096fa9358998mr12599609ejc.39.1684870958746; Tue, 23 May 2023 12:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684870958; cv=none; d=google.com; s=arc-20160816; b=ovApHhZnOeIR5haNcivTxGRM8e//I2Gg5vJM3K8tuyHCkYoVM7q/XFVMA7Pzw3gGJr H4fsWf0K8SM1/AbDvdiqzzN8Y3j93LKUQCVS7SDIBMITF1rmflhgW99p+c52SPNS8LjG TIncaYGjq3Kk5QH6al9cCcm7oRhUtyvPxkbpqmC/6MNC0eCzr2QGRhlEKA1AqhCljsFm Q1UOx+xaB4lpRtth7F4UZeOIkHye7CHnxWG7uyZHShjLq8gS3qu9gEmZOxz4mpx1jNFo wXRNDYfQ4IBHEIan+izAbItkZ1FbQNDkd/Fjq4dEUNdjkWdWnySnWmgEnAgeu4DK7jmC ZCVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=9fh6DMAer0MR/jQs0v8wf2HQCHiExG4ENtJXZXC1he4=; b=fMPu2twTFZ7lyaXsWW2zAovjFLTRp8wa4DdeibYc1QRJDC6pIOU2Rqghs9Wqf8+InI WgG6nnb0iYV9kXFLWZlCQOdhQ/a1yfoawLwMVNzVf8g/1fxfFugjBnPA7RK9mb7hCXgJ lrC83qmbPQGhXDqqNav5qJZAwRq7gI3oRmXtWPEywxIYZXyx+ncTTYR9xUb8gp+okrHv 4kRB9Dv0b9qeJB+9/5MHG78U3krTWUUrigDRaamA4e7jP9CpJ39jQvxbhGavRtd+AARU fj3CsuIweVkJnW/GG4fGUWW9+iOnOF5Zk8vxsXUCWwEK/rBFwFWZ4H9xsLFddaViF63e SP8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ETTjUrfr; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id qh15-20020a170906ecaf00b0096f8afcdf85si324480ejb.966.2023.05.23.12.42.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 12:42:38 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ETTjUrfr; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 7903F3857707 for ; Tue, 23 May 2023 19:42:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7903F3857707 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684870949; bh=9fh6DMAer0MR/jQs0v8wf2HQCHiExG4ENtJXZXC1he4=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=ETTjUrfrmInvm/ZrJWrnZZIuiXm7zhDcrsEERaOJL67UCHWhr2v+KD9Ep1jRodrrt IpnH+w9a+h5VEgM9c7/Gg3LOxoZVk2/C4fMKwSJLQEEQFZMVnGJAF7/9NDLo3VSbkk iUgSrKfAS4eEy5THNxqHpVmC7CrQbb5ZgHXzMXbQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-00641c01.pphosted.com (mx0b-00641c01.pphosted.com [205.220.177.146]) by sourceware.org (Postfix) with ESMTPS id 575263858D37; Tue, 23 May 2023 19:41:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 575263858D37 Received: from pps.filterd (m0247476.ppops.net [127.0.0.1]) by mx0a-00641c01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34NJQR5p017696; Tue, 23 May 2023 19:41:38 GMT Received: from mxout21.s.uw.edu (mxout21.s.uw.edu [140.142.32.139]) by mx0a-00641c01.pphosted.com (PPS) with ESMTPS id 3qry4db08c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 19:41:38 +0000 Received: from smtp.washington.edu (smtp.washington.edu [140.142.234.157]) by mxout21.s.uw.edu (8.14.4+UW20.07/8.14.4+UW22.04) with ESMTP id 34NJfRaI008776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 May 2023 12:41:28 -0700 X-Auth-Received: from localhost.localdomain ([10.18.194.223]) (authenticated authid=kmatsui) by smtp.washington.edu (8.16.1+UW21.10/8.14.4+UW19.10) with ESMTPSA id 34NJfR6W022107 (version=TLSv1.2 cipher=DHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 23 May 2023 12:41:27 -0700 X-UW-Orig-Sender: kmatsui@smtp.washington.edu To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Ken Matsui Subject: [PATCH] libstdc++: use using instead of typedef for type_traits Date: Tue, 23 May 2023 12:41:14 -0700 Message-Id: <20230523194114.56310-1-kmatsui@cs.washington.edu> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Proofpoint-GUID: kXlHu3lBWt9r22-ENNIFNHNocnDKd0DF X-Proofpoint-ORIG-GUID: kXlHu3lBWt9r22-ENNIFNHNocnDKd0DF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-23_12,2023-05-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 impostorscore=0 mlxlogscore=711 adultscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 clxscore=1011 malwarescore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305230159 X-Spam-Status: No, score=-14.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ken Matsui via Gcc-patches From: Ken Matsui Reply-To: Ken Matsui Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766715250589886421?= X-GMAIL-MSGID: =?utf-8?q?1766715250589886421?= Since the type_traits header is a C++11 header file, using can be used instead of typedef. This patch provides more readability, especially for long type names. libstdc++-v3/ChangeLog: * include/std/type_traits: Use using instead of typedef --- libstdc++-v3/include/std/type_traits | 158 +++++++++++++-------------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index bc6982f9e64..0e7a9c9c7f3 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -61,9 +61,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct integral_constant { - static constexpr _Tp value = __v; - typedef _Tp value_type; - typedef integral_constant<_Tp, __v> type; + static constexpr _Tp value = __v; + using value_type = _Tp; + using type = integral_constant<_Tp, __v>; constexpr operator value_type() const noexcept { return value; } #if __cplusplus > 201103L @@ -109,7 +109,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Partial specialization for true. template struct enable_if - { typedef _Tp type; }; + { using type = _Tp; }; // __enable_if_t (std::enable_if_t for C++11) template @@ -946,7 +946,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_destructible_impl : public __do_is_destructible_impl { - typedef decltype(__test<_Tp>(0)) type; + using type = decltype(__test<_Tp>(0)); }; template(0)) type; + using type = decltype(__test<_Tp>(0)); }; template())) type; + using type = decltype(__test(declval<_Tp>())); }; template @@ -1422,7 +1422,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION is_array<_To>>::value> struct __is_convertible_helper { - typedef typename is_void<_To>::type type; + using type = typename is_void<_To>::type; }; #pragma GCC diagnostic push @@ -1443,7 +1443,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION __test(...); public: - typedef decltype(__test<_From, _To>(0)) type; + using type = decltype(__test<_From, _To>(0)); }; #pragma GCC diagnostic pop @@ -1521,20 +1521,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// remove_const template struct remove_const - { typedef _Tp type; }; + { using type = _Tp; }; template struct remove_const<_Tp const> - { typedef _Tp type; }; + { using type = _Tp; }; /// remove_volatile template struct remove_volatile - { typedef _Tp type; }; + { using type = _Tp; }; template struct remove_volatile<_Tp volatile> - { typedef _Tp type; }; + { using type = _Tp; }; /// remove_cv #if __has_builtin(__remove_cv) @@ -1658,83 +1658,83 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __cv_selector<_Unqualified, false, false> - { typedef _Unqualified __type; }; + { using __type = _Unqualified; }; template struct __cv_selector<_Unqualified, false, true> - { typedef volatile _Unqualified __type; }; + { using __type = volatile _Unqualified; }; template struct __cv_selector<_Unqualified, true, false> - { typedef const _Unqualified __type; }; + { using __type = const _Unqualified; }; template struct __cv_selector<_Unqualified, true, true> - { typedef const volatile _Unqualified __type; }; + { using __type = const volatile _Unqualified; }; template::value, bool _IsVol = is_volatile<_Qualified>::value> class __match_cv_qualifiers { - typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match; + using __match = __cv_selector<_Unqualified, _IsConst, _IsVol>; public: - typedef typename __match::__type __type; + using __type = typename __match::__type; }; // Utility for finding the unsigned versions of signed integral types. template struct __make_unsigned - { typedef _Tp __type; }; + { using __type = _Tp; }; template<> struct __make_unsigned - { typedef unsigned char __type; }; + { using __type = unsigned char; }; template<> struct __make_unsigned - { typedef unsigned char __type; }; + { using __type = unsigned char; }; template<> struct __make_unsigned - { typedef unsigned short __type; }; + { using __type = unsigned short; }; template<> struct __make_unsigned - { typedef unsigned int __type; }; + { using __type = unsigned int; }; template<> struct __make_unsigned - { typedef unsigned long __type; }; + { using __type = unsigned long; }; template<> struct __make_unsigned - { typedef unsigned long long __type; }; + { using __type = unsigned long long; }; #if defined(__GLIBCXX_TYPE_INT_N_0) __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_0> - { typedef unsigned __GLIBCXX_TYPE_INT_N_0 __type; }; + { using __type = unsigned __GLIBCXX_TYPE_INT_N_0; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_1) __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_1> - { typedef unsigned __GLIBCXX_TYPE_INT_N_1 __type; }; + { using __type = unsigned __GLIBCXX_TYPE_INT_N_1; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_2) __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_2> - { typedef unsigned __GLIBCXX_TYPE_INT_N_2 __type; }; + { using __type = unsigned __GLIBCXX_TYPE_INT_N_2; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_3) __extension__ template<> struct __make_unsigned<__GLIBCXX_TYPE_INT_N_3> - { typedef unsigned __GLIBCXX_TYPE_INT_N_3 __type; }; + { using __type = unsigned __GLIBCXX_TYPE_INT_N_3; }; #endif // Select between integral and enum: not possible to be both. @@ -1833,7 +1833,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// make_unsigned template struct make_unsigned - { typedef typename __make_unsigned_selector<_Tp>::__type type; }; + { using type = typename __make_unsigned_selector<_Tp>::__type; }; // Integral, but don't define. template<> struct make_unsigned; @@ -1846,55 +1846,55 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Utility for finding the signed versions of unsigned integral types. template struct __make_signed - { typedef _Tp __type; }; + { using __type = _Tp; }; template<> struct __make_signed - { typedef signed char __type; }; + { using __type = signed char; }; template<> struct __make_signed - { typedef signed char __type; }; + { using __type = signed char; }; template<> struct __make_signed - { typedef signed short __type; }; + { using __type = signed short; }; template<> struct __make_signed - { typedef signed int __type; }; + { using __type = signed int; }; template<> struct __make_signed - { typedef signed long __type; }; + { using __type = signed long; }; template<> struct __make_signed - { typedef signed long long __type; }; + { using __type = signed long long; }; #if defined(__GLIBCXX_TYPE_INT_N_0) __extension__ template<> struct __make_signed - { typedef __GLIBCXX_TYPE_INT_N_0 __type; }; + { using __type = __GLIBCXX_TYPE_INT_N_0; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_1) __extension__ template<> struct __make_signed - { typedef __GLIBCXX_TYPE_INT_N_1 __type; }; + { using __type = __GLIBCXX_TYPE_INT_N_1; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_2) __extension__ template<> struct __make_signed - { typedef __GLIBCXX_TYPE_INT_N_2 __type; }; + { using __type = __GLIBCXX_TYPE_INT_N_2; }; #endif #if defined(__GLIBCXX_TYPE_INT_N_3) __extension__ template<> struct __make_signed - { typedef __GLIBCXX_TYPE_INT_N_3 __type; }; + { using __type = __GLIBCXX_TYPE_INT_N_3; }; #endif // Select between integral and enum: not possible to be both. @@ -1918,10 +1918,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template class __make_signed_selector<_Tp, false, true> { - typedef typename __make_unsigned_selector<_Tp>::__type __unsigned_type; + using __unsigned_type = typename __make_unsigned_selector<_Tp>::__type; public: - typedef typename __make_signed_selector<__unsigned_type>::__type __type; + using __type = typename __make_signed_selector<__unsigned_type>::__type; }; // wchar_t, char16_t and char32_t are integral types but are neither @@ -1965,7 +1965,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// make_signed template struct make_signed - { typedef typename __make_signed_selector<_Tp>::__type type; }; + { using type = typename __make_signed_selector<_Tp>::__type; }; // Integral, but don't define. template<> struct make_signed; @@ -1988,28 +1988,28 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// remove_extent template struct remove_extent - { typedef _Tp type; }; + { using type = _Tp; }; template struct remove_extent<_Tp[_Size]> - { typedef _Tp type; }; + { using type = _Tp; }; template struct remove_extent<_Tp[]> - { typedef _Tp type; }; + { using type = _Tp; }; /// remove_all_extents template struct remove_all_extents - { typedef _Tp type; }; + { using type = _Tp; }; template struct remove_all_extents<_Tp[_Size]> - { typedef typename remove_all_extents<_Tp>::type type; }; + { using type = typename remove_all_extents<_Tp>::type; }; template struct remove_all_extents<_Tp[]> - { typedef typename remove_all_extents<_Tp>::type type; }; + { using type = typename remove_all_extents<_Tp>::type; }; #if __cplusplus > 201103L /// Alias template for remove_extent @@ -2025,11 +2025,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __remove_pointer_helper - { typedef _Tp type; }; + { using type = _Tp; }; template struct __remove_pointer_helper<_Tp, _Up*> - { typedef _Up type; }; + { using type = _Up; }; /// remove_pointer template @@ -2153,7 +2153,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// The value of the strictest alignment of _Types. static const size_t alignment_value = __strictest::_S_alignment; /// The storage. - typedef typename aligned_storage<_S_len, alignment_value>::type type; + using type = typename aligned_storage<_S_len, alignment_value>::type; }; template @@ -2200,13 +2200,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __strip_reference_wrapper { - typedef _Tp __type; + using __type = _Tp; }; template struct __strip_reference_wrapper > { - typedef _Tp& __type; + using __type = _Tp&; }; // __decay_t (std::decay_t for C++11). @@ -2233,12 +2233,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION /// Define a member typedef @c type to one of two argument types. template struct conditional - { typedef _Iftrue type; }; + { using type = _Iftrue; }; // Partial specialization for false. template struct conditional - { typedef _Iffalse type; }; + { using type = _Iffalse; }; /// common_type template @@ -2255,7 +2255,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __success_type - { typedef _Tp type; }; + { using type = _Tp; }; struct __failure_type { }; @@ -2426,7 +2426,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memfun_ref : private __result_of_memfun_ref_impl { - typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + using type = decltype(_S_test<_MemPtr, _Arg, _Args...>(0)); }; // [func.require] paragraph 1 bullet 2: @@ -2445,7 +2445,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memfun_deref : private __result_of_memfun_deref_impl { - typedef decltype(_S_test<_MemPtr, _Arg, _Args...>(0)) type; + using type = decltype(_S_test<_MemPtr, _Arg, _Args...>(0)); }; // [func.require] paragraph 1 bullet 3: @@ -2464,7 +2464,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memobj_ref : private __result_of_memobj_ref_impl { - typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + using type = decltype(_S_test<_MemPtr, _Arg>(0)); }; // [func.require] paragraph 1 bullet 4: @@ -2483,7 +2483,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_memobj_deref : private __result_of_memobj_deref_impl { - typedef decltype(_S_test<_MemPtr, _Arg>(0)) type; + using type = decltype(_S_test<_MemPtr, _Arg>(0)); }; template @@ -2492,13 +2492,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __result_of_memobj<_Res _Class::*, _Arg> { - typedef __remove_cvref_t<_Arg> _Argval; - typedef _Res _Class::* _MemPtr; - typedef typename __conditional_t<__or_, + using _Argval = __remove_cvref_t<_Arg>; + using _MemPtr = _Res _Class::*; + using type = typename __conditional_t<__or_, is_base_of<_Class, _Argval>>::value, __result_of_memobj_ref<_MemPtr, _Arg>, __result_of_memobj_deref<_MemPtr, _Arg> - >::type type; + >::type; }; template @@ -2507,12 +2507,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __result_of_memfun<_Res _Class::*, _Arg, _Args...> { - typedef typename remove_reference<_Arg>::type _Argval; - typedef _Res _Class::* _MemPtr; - typedef typename __conditional_t::value, + using _Argval = typename remove_reference<_Arg>::type; + using _MemPtr = _Res _Class::*; + using type = typename __conditional_t::value, __result_of_memfun_ref<_MemPtr, _Arg, _Args...>, __result_of_memfun_deref<_MemPtr, _Arg, _Args...> - >::type type; + >::type; }; // _GLIBCXX_RESOLVE_LIB_DEFECTS @@ -2535,7 +2535,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION template struct __result_of_impl { - typedef __failure_type type; + using type = __failure_type; }; template @@ -2566,7 +2566,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __result_of_impl : private __result_of_other_impl { - typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type; + using type = decltype(_S_test<_Functor, _ArgTypes...>(0)); }; // __invoke_result (std::invoke_result for C++11) @@ -2763,14 +2763,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_swappable_impl : public __swappable_details::__do_is_swappable_impl { - typedef decltype(__test<_Tp>(0)) type; + using type = decltype(__test<_Tp>(0)); }; template struct __is_nothrow_swappable_impl : public __swappable_details::__do_is_nothrow_swappable_impl { - typedef decltype(__test<_Tp>(0)) type; + using type = decltype(__test<_Tp>(0)); }; template @@ -2853,7 +2853,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_swappable_with_impl : public __swappable_with_details::__do_is_swappable_with_impl { - typedef decltype(__test<_Tp, _Up>(0)) type; + using type = decltype(__test<_Tp, _Up>(0)); }; // Optimization for the homogenous lvalue case, not required: @@ -2861,14 +2861,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_swappable_with_impl<_Tp&, _Tp&> : public __swappable_details::__do_is_swappable_impl { - typedef decltype(__test<_Tp&>(0)) type; + using type = decltype(__test<_Tp&>(0)); }; template struct __is_nothrow_swappable_with_impl : public __swappable_with_details::__do_is_nothrow_swappable_with_impl { - typedef decltype(__test<_Tp, _Up>(0)) type; + using type = decltype(__test<_Tp, _Up>(0)); }; // Optimization for the homogenous lvalue case, not required: @@ -2876,7 +2876,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_nothrow_swappable_with_impl<_Tp&, _Tp&> : public __swappable_details::__do_is_nothrow_swappable_impl { - typedef decltype(__test<_Tp&>(0)) type; + using type = decltype(__test<_Tp&>(0)); }; /// @endcond