subspace
subspace copied to clipboard
The `template` keyword is needed to call tuple.get_ref() and union.get_ref() etc
This is awkward...
auto tuple = ...;
tuple.get_ref<0>(); // no :(
tuple.template get_ref<0>(); // yes :(
Not only this but the compiler errors on MSVC and GCC complain about the ()
missing arguments (cuz we have get_ref()
methods on some types that take an argument?) instead of complaining about missing template
. Only Clang gets this right..
I wish we could pass the index as a parameter but I don't think that we can, we have to walk up N base classes in tuple, and the methods can't be consteval or anything like that.
Do we move to a global get_ref? :/ That's really unlucky if so. And it's not needed for vec/array/slice/indexing things.