Add some nice TypeTraits

This commit is contained in:
apio 2022-12-17 13:48:55 +01:00
parent f77126768f
commit 2cbc9fa385
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -0,0 +1,4 @@
#pragma once
template <typename Base, typename Derived> inline constexpr bool IsBaseOf = __is_base_of(Base, Derived);
template <typename T, T value> inline constexpr bool IsPowerOfTwo = (value & (value - 1)) == 0;