24 #ifndef PXR_BASE_VT_VISIT_VALUE_H
25 #define PXR_BASE_VT_VISIT_VALUE_H
33 namespace Vt_ValueVisitDetail {
38 template <
class T,
class Visitor,
39 class = decltype(std::declval<Visitor>()(std::declval<T>()))>
45 template <
class T,
class Visitor>
48 return std::forward<Visitor>(visitor)(val);
104 template <
class Visitor>
112 #define VT_CASE_FOR_TYPE_INDEX(unused, elem) \
113 case VtGetKnownValueTypeIndex<VT_TYPE(elem)>(): \
114 return Vt_ValueVisitDetail::Visit<VT_TYPE(elem)>( \
115 value, std::forward<Visitor>(visitor), 0); \
118 #undef VT_CASE_FOR_TYPE_INDEX
122 return Vt_ValueVisitDetail::Visit<VtValue>(
123 value, std::forward<Visitor>(visitor), 0);
130 #endif // PXR_BASE_VT_VISIT_VALUE_H
T const & UncheckedGet() const &
GLsizei const GLfloat * value
auto VtVisitValue(VtValue const &value, Visitor &&visitor)
#define VT_CASE_FOR_TYPE_INDEX(unused, elem)
int GetKnownValueTypeIndex() const
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define TF_PP_SEQ_FOR_EACH(_macro, data, seq)
#define PXR_NAMESPACE_CLOSE_SCOPE
auto Visit(VtValue const &val, Visitor &&visitor, int)