diff --git a/Source/cmState.cxx b/Source/cmState.cxx index 53fdae0d6..4e4c2c6a1 100644 --- a/Source/cmState.cxx +++ b/Source/cmState.cxx @@ -1701,3 +1701,13 @@ std::vector cmState::Directory::GetPropertyKeys() const } return keys; } + +bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) +{ + return lhs.Position == rhs.Position; +} + +bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs) +{ + return lhs.Position != rhs.Position; +} diff --git a/Source/cmState.h b/Source/cmState.h index e503cd258..d68306828 100644 --- a/Source/cmState.h +++ b/Source/cmState.h @@ -93,6 +93,10 @@ public: }; private: + friend bool operator==(const cmState::Snapshot& lhs, + const cmState::Snapshot& rhs); + friend bool operator!=(const cmState::Snapshot& lhs, + const cmState::Snapshot& rhs); friend class cmState; friend class Directory; friend struct StrictWeakOrder; @@ -314,4 +318,7 @@ private: bool MSYSShell; }; +bool operator==(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); +bool operator!=(const cmState::Snapshot& lhs, const cmState::Snapshot& rhs); + #endif