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

Change-Id: I50d26d958d521c30b69d31426380b1e2e213a9e6
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/44506
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Giacomo Travaglini
2021-04-14 13:04:15 +01:00
parent 8e5e603041
commit dabb0c8f45
4 changed files with 14 additions and 14 deletions

View File

@@ -326,12 +326,12 @@ namespace VegaISA
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.

View File

@@ -72,10 +72,10 @@ class VecPredRegT
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

View File

@@ -66,11 +66,11 @@ class Coroutine : public Fiber
// 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:
/**

View File

@@ -129,13 +129,13 @@ class RefCountingPtr
/** 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.