Skip to content

Commit d1006cb

Browse files
fix: Use direct initialization for out.value in comparison operations
1 parent 42aadf8 commit d1006cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/operations/invoker.cppm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ constexpr auto compare_equal(T lhs, T rhs) -> policy::value::decision<T> {
198198
policy::value::decision<T> out{};
199199
if constexpr (requires { lhs == rhs; }) {
200200
out.has_value = true;
201-
out.value = static_cast<T>(lhs == rhs);
201+
out.value = T{lhs == rhs};
202202
return out;
203203
}
204204

@@ -212,7 +212,7 @@ constexpr auto compare_not_equal(T lhs, T rhs) -> policy::value::decision<T> {
212212
policy::value::decision<T> out{};
213213
if constexpr (requires { lhs != rhs; }) {
214214
out.has_value = true;
215-
out.value = static_cast<T>(lhs != rhs);
215+
out.value = T{lhs != rhs};
216216
return out;
217217
}
218218

0 commit comments

Comments
 (0)