7#ifndef PXR_BASE_VT_TRAITS_H
8#define PXR_BASE_VT_TRAITS_H
13#include "pxr/base/vt/api.h"
14#include "pxr/base/tf/preprocessorUtilsLite.h"
18PXR_NAMESPACE_OPEN_SCOPE
31struct VtValueTypeHasCheapCopy : std::is_trivially_copy_assignable<T> {};
33#define VT_TYPE_IS_CHEAP_TO_COPY(T) \
34 template <> struct VtValueTypeHasCheapCopy<TF_PP_EAT_PARENS(T)> \
89struct VtTypedValueProxyBase {};
91struct VtIsTypedValueProxy : std::is_base_of<VtTypedValueProxyBase, T> {};
92#define VT_TYPE_IS_TYPED_VALUE_PROXY(T) \
93 template <> struct VtIsTypedValueProxy<TF_PP_EAT_PARENS(T)> \
98 typename std::enable_if<
99 !VtIsTypedValueProxy<T>::value,
int>::type = 0>
101VtGetProxiedObject(T
const &nonProxy) {
107struct VtGetProxiedType
109 using type =
typename std::decay<
110 decltype(VtGetProxiedObject(std::declval<T>()))>::type;
116struct VtErasedValueProxyBase {};
118struct VtIsErasedValueProxy : std::is_base_of<VtErasedValueProxyBase, T> {};
119#define VT_TYPE_IS_ERASED_VALUE_PROXY(T) \
120 template <> struct VtIsErasedValueProxy<TF_PP_EAT_PARENS(T)> \
126struct VtIsValueProxy :
127 std::integral_constant<
128 bool, VtIsTypedValueProxy<T>::value || VtIsErasedValueProxy<T>::value> {};
130PXR_NAMESPACE_CLOSE_SCOPE
Array concept. By default, types are not arrays.