fix loop algorithms

This commit is contained in:
bolero-MURAKAMI 2019-06-15 18:17:17 +09:00
parent 312a89c4a2
commit 6b5addba9f
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ namespace sprout {
inline SPROUT_CONSTEXPR T
until_loop(T init, Predicate pred, UnaryOperation unary_op) {
typedef sprout::pair<T, bool> type;
return sprout::detail::until_loop_impl(type(init, false), pred, unary_op, 1).second;
return sprout::detail::until_loop_impl(type(init, false), pred, unary_op, 1).first;
}
//

View file

@ -57,7 +57,7 @@ namespace sprout {
inline SPROUT_CONSTEXPR T
while_loop(T init, Predicate pred, UnaryOperation unary_op) {
typedef sprout::pair<T, bool> type;
return sprout::detail::while_loop_impl(type(init, false), pred, unary_op, 1).second;
return sprout::detail::while_loop_impl(type(init, false), pred, unary_op, 1).first;
}
//