From bf65456a2cacfeba222965b53d1f63ebc17a4407 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 30 Sep 2019 22:15:50 -0400 Subject: [PATCH] MkCastTo: Use '_v' variants of type traits where applicable Same thing, but less typing, slightly shrinking the file size. --- Runtime/MkCastTo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/MkCastTo.py b/Runtime/MkCastTo.py index 908c363dd..9c7d7e45e 100644 --- a/Runtime/MkCastTo.py +++ b/Runtime/MkCastTo.py @@ -183,8 +183,8 @@ for tp in CENTITY_TYPES: qual = getqualified(tp) sourcef.write('''template void TCastToPtr::Visit(%s* p) { - static_assert(sizeof(T) > 0 && !std::is_void::value, "TCastToPtr can not cast to incomplete type"); - ptr = reinterpret_cast(std::is_convertible<%s*, T*>::value ? p : nullptr); + static_assert(sizeof(T) > 0 && !std::is_void_v, "TCastToPtr can not cast to incomplete type"); + ptr = reinterpret_cast(std::is_convertible_v<%s*, T*> ? p : nullptr); } ''' % (qual, qual))