X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3f756b051175054c62c4741fdab2a6b934828262..3f4f5e63dadc0023c0a02a08af8e9e9801b38e8e:/src/xbt/utils/iter/subsets.hpp diff --git a/src/xbt/utils/iter/subsets.hpp b/src/xbt/utils/iter/subsets.hpp index f948b3868c..ec3cac8377 100644 --- a/src/xbt/utils/iter/subsets.hpp +++ b/src/xbt/utils/iter/subsets.hpp @@ -103,14 +103,13 @@ template void subsets_iterator::increment() ++current_subset[k - 1]; ++P[k - 1]; - const auto end = this->end.value(); - const bool shift_other_elements = current_subset[k - 1] == end; + const bool shift_other_elements = current_subset[k - 1] == end.value(); if (shift_other_elements) { if (k == 1) { // We're done in the case that k = 1; here, we've iterated // through the list once, which is all that is needed - this->end = std::nullopt; + end = std::nullopt; return; } @@ -150,7 +149,7 @@ template void subsets_iterator::increment() // element can be located. Thus, if `P[0] > (n - k)`, this means // we've sucessfully iterated through all subsets so we're done if (P[0] > (n - k)) { - this->end = std::nullopt; + end = std::nullopt; return; }