Add some nice TypeTraits
This commit is contained in:
parent
f77126768f
commit
2cbc9fa385
4
luna/include/luna/TypeTraits.h
Normal file
4
luna/include/luna/TypeTraits.h
Normal 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;
|
Loading…
Reference in New Issue
Block a user