mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-12 21:56:54 +00:00
remove dependency on <type_traits>
This commit is contained in:
parent
c62fbe371d
commit
c2a1728072
@ -150,7 +150,8 @@ template <typename T>
|
||||
struct DummyAllocator<T, 0> : DummyAllocatorBase<DummyAllocator, T, 0, 0> {};
|
||||
|
||||
template <typename Type, size_t ExpectedSize, size_t ActualSize = 0>
|
||||
struct validate_size : std::true_type {
|
||||
struct validate_size {
|
||||
static constexpr bool value = true;
|
||||
static_assert(ExpectedSize == ActualSize);
|
||||
};
|
||||
|
||||
@ -159,6 +160,7 @@ struct validate_size<Type, ExpectedSize>
|
||||
: validate_size<Type, ExpectedSize, sizeof(Type)> {};
|
||||
|
||||
template <size_t ExpectedOffset, size_t ActualOffset>
|
||||
struct validate_offset : std::true_type {
|
||||
struct validate_offset {
|
||||
static constexpr bool value = true;
|
||||
static_assert(ExpectedOffset == ActualOffset);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user