Skip to content

Commit

Permalink
[vt] remove the templatized SFINAE overloaded functions from doxygen.
Browse files Browse the repository at this point in the history
Including these makes the "return" column of the table really wide.

(Internal change: 2041199)
  • Loading branch information
mrawde authored and pixar-oss committed Feb 10, 2020
1 parent 30bbb3c commit d0d449a
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions pxr/base/vt/value.h
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ class VtValue
return *this;
}

/// Assignment operator from any type.
#ifndef doxygen
template <class T>
inline
typename boost::enable_if_c<
Expand All @@ -957,8 +957,14 @@ class VtValue
_Init(obj);
return *this;
}
#endif

/// Assignment operator from any type.
#ifdef doxygen
template <class T>
VtValue&
operator=(T const &obj);
#else
template <class T>
typename boost::disable_if_c<
_TypeInfoFor<T>::Type::IsLocal &&
Expand All @@ -969,6 +975,7 @@ class VtValue
_Init(obj);
return *this;
}
#endif

/// Assigning a char const * gives a VtValue holding a std::string.
VtValue &operator=(char const *cstr) {
Expand Down Expand Up @@ -1002,6 +1009,11 @@ class VtValue
// make an unqualified call to swap(<held-value>, rhs). If this value is
// not holding a T, replace the held value with a value-initialized T
// instance first, then swap.
#ifdef doxygen
template <class T>
void
Swap(T &rhs);
#else
template <class T>
typename boost::enable_if<
boost::is_same<T, typename Vt_ValueGetStored<T>::Type> >::type
Expand All @@ -1010,18 +1022,25 @@ class VtValue
*this = T();
UncheckedSwap(rhs);
}
#endif

/// Swap the held value with \a rhs. This VtValue must be holding an
/// object of type \p T. If it does not, this invokes undefined behavior.
/// Use Swap() if this VtValue is not known to contain an object of type
/// \p T.
#ifdef doxygen
template <class T>
void
UncheckedSwap(T &rhs);
#else
template <class T>
typename boost::enable_if<
boost::is_same<T, typename Vt_ValueGetStored<T>::Type> >::type
UncheckedSwap(T &rhs) {
using std::swap;
swap(_GetMutable<T>(), rhs);
}
#endif

/// \overload
void UncheckedSwap(VtValue &rhs) { Swap(rhs); }
Expand Down Expand Up @@ -1426,7 +1445,7 @@ class VtValue
TfPointerAndBits<const _TypeInfo> _info;
};

#if !defined(doxygen)
#ifndef doxygen

/// Make a default value. VtValue uses this to create values to be returned
/// from failed calls to \a Get. Clients may specialize this for their own
Expand Down

0 comments on commit d0d449a

Please sign in to comment.