SDK: Provide comparison operator for device and topo states

This commit is contained in:
Dennis Klein
2020-07-15 12:12:05 +02:00
committed by Alexey Rybalchenko
parent a6da208e79
commit 1140c4c6ab
2 changed files with 32 additions and 0 deletions

View File

@@ -92,6 +92,16 @@ enum class AggregatedTopologyState : int
Mixed
};
inline auto operator==(DeviceState lhs, AggregatedTopologyState rhs) -> bool
{
return static_cast<int>(lhs) == static_cast<int>(rhs);
}
inline auto operator==(AggregatedTopologyState lhs, DeviceState rhs) -> bool
{
return static_cast<int>(lhs) == static_cast<int>(rhs);
}
inline std::ostream& operator<<(std::ostream& os, const AggregatedTopologyState& state)
{
if (state == AggregatedTopologyState::Mixed) {