summaryrefslogtreecommitdiff
path: root/src/macros.hpp
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2023-10-06 14:42:03 -0400
committerJonathan Bradley <jcb@pikum.xyz>2023-10-06 17:20:20 -0400
commit791c153aabd579f518a9b00613459cba13734797 (patch)
tree858ec6f9a8398398a8a53ec5a886bca5825c62e0 /src/macros.hpp
parent286bf5539527500429cfca4ded0bb78406f6364b (diff)
Memory management - ctors and dtors
Diffstat (limited to 'src/macros.hpp')
-rw-r--r--src/macros.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/macros.hpp b/src/macros.hpp
index 33d942a..02ebb3d 100644
--- a/src/macros.hpp
+++ b/src/macros.hpp
@@ -8,6 +8,9 @@
#define CAFE_BABE(T) reinterpret_cast<T *>(0xCAFEBABE)
+#define IS_CONSTRUCTIBLE(T) constexpr(std::is_constructible<T>::value && !std::is_integral<T>::value && !std::is_floating_point<T>::value)
+#define IS_DESTRUCTIBLE(T) constexpr(std::is_destructible<T>::value && !std::is_integral<T>::value && !std::is_floating_point<T>::value)
+
#define TypeSafeInt2_H(TypeName, Type, Max, TypeName_T, TypeName_MAX, TypeName_T_MAX)\
using TypeName_T = Type; \
enum class TypeName : TypeName_T; \