-
Notifications
You must be signed in to change notification settings - Fork 4
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 1-element vec ambiguities #38
base: master
Are you sure you want to change the base?
Conversation
template<typename T> | ||
swizzled_vec &operator=(const T &rhs) | ||
requires(allow_assign && std::convertible_to<T, value_type>) |
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.
template<typename T> | |
swizzled_vec &operator=(const T &rhs) | |
requires(allow_assign && std::convertible_to<T, value_type>) | |
template<std::convertible_to<value_type> T> | |
swizzled_vec &operator=(const T &rhs) | |
requires(allow_assign) |
template<typename T> | ||
vec &operator=(const T &rhs) | ||
requires(std::convertible_to<T, DataT>) | ||
{ |
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.
template<typename T> | |
vec &operator=(const T &rhs) | |
requires(std::convertible_to<T, DataT>) | |
{ | |
template<std::convertible_to<DataT> T> | |
vec &operator=(const T &rhs) | |
{ |
template<typename T> \ | ||
friend vec operator op(const vec &lhs, const T &rhs) \ | ||
requires(enable_if && std::convertible_to<T, DataT>) \ |
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.
template<typename T> \ | |
friend vec operator op(const vec &lhs, const T &rhs) \ | |
requires(enable_if && std::convertible_to<T, DataT>) \ | |
template<std::convertible_to<DataT> T> \ | |
friend vec operator op(const vec &lhs, const T &rhs) \ | |
requires(enable_if) \ |
(same for overloads below)
This is the third part of a series of four pull requests addressing some SYCL clarifications for
sycl::vec
.This pull request implements the behavior specified in KhronosGroup/SYCL-Docs#670 (comment), which resolves ambiguities for 1-element
sycl::vec
.