24 #ifndef _GUSD_UT_TYPETRAITS_H_
25 #define _GUSD_UT_TYPETRAITS_H_
50 #define GUSDUT_DECLARE_POD_TUPLE(TYPE, VALUETYPE, TUPLESIZE) \
52 struct GusdPodTupleTraits<TYPE> { \
53 static const int tupleSize = TUPLESIZE; \
54 using ValueType = VALUETYPE; \
62 return !SYSisSame<typename GusdPodTupleTraits<T>::ValueType,
void>();
76 template <
typename A,
typename B>
79 return GusdGetTupleSize<A>() == GusdGetTupleSize<B>();
84 template <
typename A,
typename B>
87 return GusdPodTuplesAreCompatible<A,B>() &&
143 #endif // _GUSD_UT_TYPETRAITS_H_
constexpr int GusdGetTupleSize()
Returns the tuples ize of a POD tuple.
constexpr bool GusdIsPodTuple()
Returns true if a type is a POD tuple.
unsigned long long uint64
static const int tupleSize
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
constexpr bool GusdPodTuplesAreBitwiseCompatible()
Returns true if two POD tuples have identical memory layouts.
#define GUSDUT_DECLARE_POD_TUPLE(TYPE, VALUETYPE, TUPLESIZE)
Helper for declaring a POD tuple.
#define PXR_NAMESPACE_CLOSE_SCOPE
constexpr bool GusdPodTuplesAreCompatible()