Skip to content

Commit b79ccf7

Browse files
committed
The initial_sum_value is T(0) instead of T().
1 parent 163fc76 commit b79ccf7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/containers/algorithms/accumulate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ export constexpr auto accumulate(range auto && source, auto && initial, auto fun
8484
}
8585

8686

87-
template<typename T> requires bounded::default_constructible<T>
87+
template<typename T>
8888
constexpr auto initial_sum_value() {
8989
if constexpr (bounded::bounded_integer<T>) {
9090
return 0_bi;
9191
} else {
92-
return T();
92+
return T(0);
9393
}
9494
}
9595

0 commit comments

Comments
 (0)