24 #ifndef PXR_BASE_VT_TRAITS_H 25 #define PXR_BASE_VT_TRAITS_H 30 #include "pxr/base/vt/api.h" 33 #include <boost/type_traits/has_trivial_assign.hpp> 35 #include <type_traits> 37 PXR_NAMESPACE_OPEN_SCOPE
50 struct VtValueTypeHasCheapCopy : boost::has_trivial_assign<T> {};
52 #define VT_TYPE_IS_CHEAP_TO_COPY(T) \ 53 template <> struct VtValueTypeHasCheapCopy<TF_PP_EAT_PARENS(T)> \ 108 struct VtTypedValueProxyBase {};
110 struct VtIsTypedValueProxy : std::is_base_of<VtTypedValueProxyBase, T> {};
111 #define VT_TYPE_IS_TYPED_VALUE_PROXY(T) \ 112 template <> struct VtIsTypedValueProxy<TF_PP_EAT_PARENS(T)> \ 117 typename std::enable_if<
118 !VtIsTypedValueProxy<T>::value,
int>::type = 0>
120 VtGetProxiedObject(T
const &nonProxy) {
126 struct VtGetProxiedType
128 using type =
typename std::decay<
129 decltype(VtGetProxiedObject(std::declval<T>()))>::type;
135 struct VtErasedValueProxyBase {};
137 struct VtIsErasedValueProxy : std::is_base_of<VtErasedValueProxyBase, T> {};
138 #define VT_TYPE_IS_ERASED_VALUE_PROXY(T) \ 139 template <> struct VtIsErasedValueProxy<TF_PP_EAT_PARENS(T)> \ 145 struct VtIsValueProxy :
146 std::integral_constant<
147 bool, VtIsTypedValueProxy<T>::value || VtIsErasedValueProxy<T>::value> {};
149 PXR_NAMESPACE_CLOSE_SCOPE
151 #endif // PXR_BASE_VT_TRAITS_H
Array concept. By default, types are not arrays.