Created
January 11, 2017 14:28
-
-
Save picanumber/e6e560cc98f259af4fa51e29d3c3f7d3 to your computer and use it in GitHub Desktop.
Traversing the sorted view with structured bindings
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
sv.multi_sort<6, 4, 5>([](auto&& a, auto&& b) { return a > b; }); | |
auto [sName1, sName2, sSport, sGoldM, sSilverM, sBronzeM, sTotalM] = sv; | |
for (size_t i = 0; i < sv.size<6>(); i++) | |
{ | |
std::cout << sTotalM[i] << " " << sGoldM[i] << " " << sSilverM[i] << " " | |
<< sName1[i] << " " << sName2[i] << std::endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment