Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
bool operator< (rgb_color const& lhs, rgb_color const& rhs)
{
auto as_tuple = [](rgb_color const& c) {
return std::tie(c.m_red, c.m_green, c.m_blue);
};
return as_tuple(lhs) < as_tuple(rhs);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment