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:
@@ -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:
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user