24#ifndef PXR_BASE_VT_TRAITS_H
25#define PXR_BASE_VT_TRAITS_H
30#include "pxr/base/vt/api.h"
31#include "pxr/base/tf/preprocessorUtilsLite.h"
35PXR_NAMESPACE_OPEN_SCOPE
48struct VtValueTypeHasCheapCopy : std::is_trivially_copy_assignable<T> {};
50#define VT_TYPE_IS_CHEAP_TO_COPY(T) \
51 template <> struct VtValueTypeHasCheapCopy<TF_PP_EAT_PARENS(T)> \
106struct VtTypedValueProxyBase {};
108struct VtIsTypedValueProxy : std::is_base_of<VtTypedValueProxyBase, T> {};
109#define VT_TYPE_IS_TYPED_VALUE_PROXY(T) \
110 template <> struct VtIsTypedValueProxy<TF_PP_EAT_PARENS(T)> \
115 typename std::enable_if<
116 !VtIsTypedValueProxy<T>::value,
int>::type = 0>
118VtGetProxiedObject(T
const &nonProxy) {
124struct VtGetProxiedType
126 using type =
typename std::decay<
127 decltype(VtGetProxiedObject(std::declval<T>()))>::type;
133struct VtErasedValueProxyBase {};
135struct VtIsErasedValueProxy : std::is_base_of<VtErasedValueProxyBase, T> {};
136#define VT_TYPE_IS_ERASED_VALUE_PROXY(T) \
137 template <> struct VtIsErasedValueProxy<TF_PP_EAT_PARENS(T)> \
143struct VtIsValueProxy :
144 std::integral_constant<
145 bool, VtIsTypedValueProxy<T>::value || VtIsErasedValueProxy<T>::value> {};
147PXR_NAMESPACE_CLOSE_SCOPE
Array concept. By default, types are not arrays.