5#ifndef INCLUDE_CPPGC_OBJECT_SIZE_TRAIT_H_
6#define INCLUDE_CPPGC_OBJECT_SIZE_TRAIT_H_
32template <
typename T,
bool = IsGarbageCollectedMixinTypeV<T>>
37 static_assert(
sizeof(T),
"T must be fully defined");
38 static_assert(IsGarbageCollectedTypeV<T>,
39 "T must be of type GarbageCollected or GarbageCollectedMixin");
42 return GetObjectSizeForGarbageCollected(&
object);
48 static_assert(
sizeof(T),
"T must be fully defined");
51 return GetObjectSizeForGarbageCollectedMixin(&
object);
static size_t GetObjectSizeForGarbageCollected(const void *)
static size_t GetObjectSizeForGarbageCollectedMixin(const void *)
static size_t GetSize(const T &object)
static size_t GetSize(const T &object)