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
See also #32.
The problem with having a simpler overload is that the second argument to
where
determines the return type of thememload
function. Wanting to have some default-to-zero variant, means that the type information is lost. The only remaining information now, is themask<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