diff --git a/pxr/usd/pcp/node.h b/pxr/usd/pcp/node.h index 00a57a1131..a66070366c 100644 --- a/pxr/usd/pcp/node.h +++ b/pxr/usd/pcp/node.h @@ -31,7 +31,6 @@ #include "pxr/base/tf/iterator.h" #include "pxr/base/tf/hashset.h" -#include #include #include @@ -64,8 +63,7 @@ TF_DECLARE_REF_PTRS(PcpPrimIndex_Graph); /// as well as any value-mapping needed, such as to rename opinions /// from a model to use in a particular instance. /// -class PcpNodeRef : - public boost::totally_ordered +class PcpNodeRef { public: typedef PcpNodeRef_ChildrenIterator child_const_iterator; @@ -89,12 +87,36 @@ class PcpNodeRef : return _nodeIdx == rhs._nodeIdx && _graph == rhs._graph; } + /// Inequality operator + /// \sa PcpNodeRef::operator==(const PcpNodeRef&) + inline bool operator!=(const PcpNodeRef& rhs) const { + return !(*this == rhs); + } + /// Returns true if this node is 'less' than \p rhs. /// The ordering of nodes is arbitrary and does not indicate the relative /// strength of the nodes. PCP_API bool operator<(const PcpNodeRef& rhs) const; + /// Less than or equal operator + /// \sa PcpNodeRef::operator<(const PcpNodeRef&) + bool operator<=(const PcpNodeRef& rhs) const { + return !(rhs < *this); + } + + /// Greater than operator + /// \sa PcpNodeRef::operator<(const PcpNodeRef&) + bool operator>(const PcpNodeRef& rhs) const { + return rhs < *this; + } + + /// Greater than or equal operator + /// \sa PcpNodeRef::operator<(const PcpNodeRef&) + bool operator>=(const PcpNodeRef& rhs) const { + return !(*this < rhs); + } + /// Hash functor. struct Hash { size_t operator()(const PcpNodeRef& rhs) const