Last active
April 9, 2017 14:41
-
-
Save deque-blog/4dbe211731a54dc05afe465580a7ebbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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