#help with usingnamespace alternative
1 messages · Page 1 of 1 (latest)
that way everything is kinda just generic over the size and the type, you dont need to have different implementations of stuff really
your new function could take an array of T
i updated my vec.zig gist which used to use usingnamespace to hang the methods off a zero sized field as described by mlugg in the issue https://gist.github.com/travisstaloch/6ffee43044678d898b9c5bfa79c98e61
it looks like this is very similar yours @tulip hare
no its a little more involved. first add a zero sized m: void field to the struct. then look at how add() and simd() are implemented.
afaik thats how the alternative works for mixins.