Skip to content

Commit 3219bd4

Browse files
committed
🐛 Remove dependency on tuple destructuring
Problem: - Tuple destructuring is used by `initial_medial_final`. - Destructuring `stdx::tuple` requires including `<stdx/tuple_destructure.hpp>` which includes `<tuple>`. Solution: - Remove the destructuring; use `get` instead. Closes #218
1 parent c886105 commit 3219bd4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/stdx/algorithm.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ CONSTEXPR_INVOKE auto initial_medial_final(FwdIt first, FwdIt last, IOp iop,
127127
-> for_each_result<IOp, MOp, FOp> {
128128
if (first != last) {
129129
iop(*first);
130-
auto [op, it] = for_each_butlast(++first, last, mop);
131-
if (it != last) {
130+
auto r = for_each_butlast(++first, last, mop);
131+
if (auto it = get<1>(r); it != last) {
132132
fop(*it);
133133
}
134-
return {iop, op, fop};
134+
return {iop, get<0>(r), fop};
135135
}
136136
return {iop, mop, fop};
137137
}

0 commit comments

Comments
 (0)