Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active April 9, 2017 14:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save deque-blog/4dbe211731a54dc05afe465580a7ebbc to your computer and use it in GitHub Desktop.
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