-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2026 - Prevent logical<wide> to be constructed form non-bool single scalars #2052
base: main
Are you sure you want to change the base?
Conversation
bcf275c
to
e96299e
Compare
b2ffed7
to
2f54f64
Compare
template<scalar_value S> | ||
EVE_FORCEINLINE explicit logical(S v) noexcept | ||
//! Construct from a scalar logical | ||
template<typename U> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be scalar_value
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed
@@ -255,7 +255,7 @@ named_shuffle1_test(eve::as<T>, NamedShuffle named_shuffle, auto... extra_args_g | |||
named_shuffle1_test_one_input<supports_G_eq_T_Size>(x, named_shuffle, extra_args_gen...); | |||
|
|||
// false, true, false, false, true, true | |||
eve::logical<T> mask {[](int i, int) { return std::countl_zero((unsigned)i) & 1; }}; | |||
eve::logical<T> mask {[](int i, int) { return (std::countl_zero((unsigned)i) & 1) != 0; }}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh - but my lamda generation. Can I have my lambda generation maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue is that the lambda returns an int, not a bool. The lanbda ctor is fine
No description provided.