-
Notifications
You must be signed in to change notification settings - Fork 2.2k
array_t overload resolution support #650
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
Conversation
This is great and the logical step following #643. Regarding the details of this implementation, I was wondering whether this is perhaps a good moment to get rid of the unequivocally disliked This is basically what your implementation does now, but I would make it more explicit by:
What do you think? |
|
(now that I've written the above, I am already starting to doubt if it's a good design..) |
Forcecast doesn't mean quite the same thing, though: it enables potentially data-losing conversions (e.g. However, I'm not sure what the rationale is to having |
The reason that |
With the new |
Perhaps something like: template <typename T, int ExtraFlags> using casting_array = array_t<T, ExtraFlags | forcecast> with |
How the hell did f25420a break MSVC's successful compilation from the previous commit? |
Oh, 0defac5 got added to master in between. Updating this PR. |
Ah right, sorry -- I should have said something. |
f25420a
to
2d6bc76
Compare
Something tells me that you would think that even without the new |
(This is now conflicted). One general question we should discuss is how to proceed with the force conversion flag that is there now. |
This makes array_t respect overload resolution and noconvert by failing to load when `convert = false` if the src isn't already an array of the correct type.
2d6bc76
to
a0da2bc
Compare
In the interest of getting this closed off (there was just a reasonable request to move forward in the gitter room), can we hold off on the I do think the (I also don't see how we can do it without breaking backwards compatibility, which so far, I don't think anything currently on master really breaks--at most, there are some potential changes around the overload resolution, but in order to hit those you would need to have existing, non-functioning overloads). |
Ok, sounds good. Merging is fine with me. |
This makes
array_t
respect overload resolution and.noconvert()
by failing to load whenconvert = false
if the load source isn't already an array of the correct type.