5 #ifndef INCLUDE_CPPGC_TYPE_TRAITS_H_
6 #define INCLUDE_CPPGC_TYPE_TRAITS_H_
17 template <
typename... Ts>
21 template <
typename... Ts>
28 template <
typename T,
template <
typename... V>
class U>
31 template <
typename... W>
32 static std::true_type SubclassCheck(U<W...>*);
33 static std::false_type SubclassCheck(...);
37 decltype(SubclassCheck(std::declval<T*>()))::value;
42 template <
typename T,
typename =
void>
47 std::declval<
Visitor*>()))>> : std::true_type {
50 template <
typename T,
typename =
void>
52 static_assert(
sizeof(T),
"T must be fully defined");
57 T, void_t<
decltype(std::declval<T>().Trace(std::declval<
Visitor*>()))>>
63 "Trace methods should be marked as const.");
69 template <
typename T,
typename =
void>
71 static_assert(
sizeof(T),
"T must be fully defined");
79 static_assert(
sizeof(T),
"T must be fully defined");
82 template <
typename T,
typename =
void>
84 static_assert(
sizeof(T),
"T must be fully defined");
91 static_assert(
sizeof(T),
"T must be fully defined");
104 template <
typename T>