-
-
Save danlark1/ce8c5d634204e792299581591e07eda6 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
struct Data { | |
bool has_property; | |
// ... | |
}; | |
std::vector<Data> data(FillData()); | |
std::sort(data.begin(), data.end(), [](const Data& lhs, const Data& rhs) { | |
return lhs.has_property < rhs.has_property; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment