Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/44506 )

Change subject: misc: Replace std::conditional with std::conditional_t
......................................................................

misc: Replace std::conditional with std::conditional_t

Change-Id: I50d26d958d521c30b69d31426380b1e2e213a9e6
Signed-off-by: Giacomo Travaglini <giacomo.travagl...@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44506
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/arch/amdgpu/vega/operand.hh
M src/arch/generic/vec_pred_reg.hh
M src/base/coroutine.hh
M src/base/refcnt.hh
4 files changed, 14 insertions(+), 14 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/amdgpu/vega/operand.hh b/src/arch/amdgpu/vega/operand.hh
index 740fbb9..a4517ea 100644
--- a/src/arch/amdgpu/vega/operand.hh
+++ b/src/arch/amdgpu/vega/operand.hh
@@ -326,12 +326,12 @@
               scRegData.read();
           }

-          using VecRegCont = typename std::conditional<NumDwords == 2,
- VecRegContainerU64, typename std::conditional<sizeof(DataType)
+          using VecRegCont = typename std::conditional_t<NumDwords == 2,
+ VecRegContainerU64, typename std::conditional_t<sizeof(DataType)
                   == sizeof(VecElemU16), VecRegContainerU16,
-                      typename std::conditional<sizeof(DataType)
+                      typename std::conditional_t<sizeof(DataType)
                           == sizeof(VecElemU8), VecRegContainerU8,
-                              VecRegContainerU32>::type>::type>::type;
+                              VecRegContainerU32>>>;

           /**
            * whether this operand a scalar or not.
diff --git a/src/arch/generic/vec_pred_reg.hh b/src/arch/generic/vec_pred_reg.hh
index 46f6f2f..d156ba0 100644
--- a/src/arch/generic/vec_pred_reg.hh
+++ b/src/arch/generic/vec_pred_reg.hh
@@ -72,10 +72,10 @@

   public:
     /// Container type alias.
-    using Container = typename std::conditional<
+    using Container = typename std::conditional_t<
         Const,
         const VecPredRegContainer<NUM_BITS, Packed>,
-        VecPredRegContainer<NUM_BITS, Packed>>::type;
+        VecPredRegContainer<NUM_BITS, Packed>>;

   protected:
     // Alias for this type
diff --git a/src/base/coroutine.hh b/src/base/coroutine.hh
index 68d2b1d..594c1e8 100644
--- a/src/base/coroutine.hh
+++ b/src/base/coroutine.hh
@@ -66,11 +66,11 @@
     // in case the channel should be void (Coroutine template parameters
     // are void. (See following ArgChannel, RetChannel typedef)
     struct Empty {};
-    using ArgChannel = typename std::conditional<
-        std::is_same<Arg, void>::value, Empty, std::stack<Arg>>::type;
+    using ArgChannel = typename std::conditional_t<
+        std::is_same<Arg, void>::value, Empty, std::stack<Arg>>;

-    using RetChannel = typename std::conditional<
-        std::is_same<Ret, void>::value, Empty, std::stack<Ret>>::type;
+    using RetChannel = typename std::conditional_t<
+        std::is_same<Ret, void>::value, Empty, std::stack<Ret>>;

   public:
     /**
diff --git a/src/base/refcnt.hh b/src/base/refcnt.hh
index 3106a6f..43a2a36 100644
--- a/src/base/refcnt.hh
+++ b/src/base/refcnt.hh
@@ -129,13 +129,13 @@
/** Convenience aliases for const/non-const versions of T w/ friendship. */
     /** @{ */
     static constexpr auto TisConst = std::is_const<T>::value;
-    using ConstT = typename std::conditional<TisConst,
+    using ConstT = typename std::conditional_t<TisConst,
             RefCountingPtr<T>,
-            RefCountingPtr<typename std::add_const<T>::type>>::type;
+            RefCountingPtr<typename std::add_const<T>::type>>;
     friend ConstT;
-    using NonConstT = typename std::conditional<TisConst,
+    using NonConstT = typename std::conditional_t<TisConst,
             RefCountingPtr<typename std::remove_const<T>::type>,
-            RefCountingPtr<T>>::type;
+            RefCountingPtr<T>>;
     friend NonConstT;
     /** @} */
     /// The stored pointer.

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/44506
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I50d26d958d521c30b69d31426380b1e2e213a9e6
Gerrit-Change-Number: 44506
Gerrit-PatchSet: 2
Gerrit-Owner: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Bobby R. Bruce <bbr...@ucdavis.edu>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-Reviewer: Giacomo Travaglini <giacomo.travagl...@arm.com>
Gerrit-Reviewer: Jason Lowe-Power <ja...@lowepower.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to