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

@@ -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.