Skip to content
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

Consider a simpler where overload for const memload with 0 init. #54

Open
mattkretz opened this issue Jun 19, 2017 · 0 comments
Open

Consider a simpler where overload for const memload with 0 init. #54

mattkretz opened this issue Jun 19, 2017 · 0 comments

Comments

@mattkretz
Copy link
Owner

See also #32.

The problem with having a simpler overload is that the second argument to where determines the return type of the memload function. Wanting to have some default-to-zero variant, means that the type information is lost. The only remaining information now, is the mask<T, A> argument. In principle we could just fall back to it. However, there's no correct scalar overload for it anymore.

The overload is not necessary for better code-gen. The compiler can do the right thing all by itself: https://godbolt.org/g/LCFSfs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant