Initial work on CActor.cpp

This commit is contained in:
2022-08-12 21:26:00 -04:00
parent e418784c51
commit 44b17813bd
109 changed files with 1295 additions and 335 deletions

33
include/static_assert.hpp Normal file
View File

@@ -0,0 +1,33 @@
// C++98 static assert
template < bool expr >
struct do_static_assert;
template <>
struct do_static_assert< true > {
static const char test;
};
struct false_type {
static const bool value = false;
};
struct true_type {
static const bool value = true;
};
template < int A, int B >
struct _n_is_equal : false_type {};
template < int A >
struct _n_is_equal< A, A > : true_type {};
template < class T, int N >
struct check_sizeof : _n_is_equal< sizeof(T), N > {};
#ifdef __MWERKS__
#define CHECK_SIZEOF(cls, size) \
static void cls##_check() { do_static_assert< check_sizeof< cls, size >::value >::test; }
#else
#define CHECK_SIZEOF(cls, size)
#endif