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
35struct VtValueTypeHasCheapCopy : std::is_trivially_copy_assignable<T> {};
37#define VT_TYPE_IS_CHEAP_TO_COPY(T) \
38 template <> struct VtValueTypeHasCheapCopy<TF_PP_EAT_PARENS(T)> \
93struct VtTypedValueProxyBase {};
95struct VtIsTypedValueProxy : std::is_base_of<VtTypedValueProxyBase, T> {};
96#define VT_TYPE_IS_TYPED_VALUE_PROXY(T) \
97 template <> struct VtIsTypedValueProxy<TF_PP_EAT_PARENS(T)> \
102 typename std::enable_if<
103 !VtIsTypedValueProxy<T>::value,
int>::type = 0>
105VtGetProxiedObject(T
const &nonProxy) {
111struct VtGetProxiedType
113 using type =
typename std::decay<
114 decltype(VtGetProxiedObject(std::declval<T>()))>::type;
120struct VtErasedValueProxyBase {};
122struct VtIsErasedValueProxy : std::is_base_of<VtErasedValueProxyBase, T> {};
123#define VT_TYPE_IS_ERASED_VALUE_PROXY(T) \
124 template <> struct VtIsErasedValueProxy<TF_PP_EAT_PARENS(T)> \
130struct VtIsValueProxy :
131 std::integral_constant<
132 bool, VtIsTypedValueProxy<T>::value || VtIsErasedValueProxy<T>::value> {};
134PXR_NAMESPACE_CLOSE_SCOPE
A trait to detect instantiations of VtArrayEdit, specialized in arrayEdit.h.
A trait to detect instantiations of VtArray, specialized in array.h.