User | Kudos |
---|---|
6 | |
2 | |
2 | |
2 | |
1 |
I have two arrays I'd like to pivot into an array of clusters of a particular typedef. I could index and bundle it myself, but it's just weird that I can't use this builtin function just because the typedef has an element that's an array.
Also, it's kinda weird that it won't take a typedef as prototype. Casting it after takes up about as much room as doing the bundle in a loop!
I can see some reasons that letting us pass in 2D arrays would lose the tight optimization of the original (maybe it can compile-time determine the size of the cluster elements if none of them are arrays... except that you can put in object data. I guess either that's a reference under the hood, or there's some other reason)
Or maybe it's that it could cause confusion between making a 1D array of clusters with 1D arrays, or making a 2D array of clusters of single elements? That seems like it could be solved either by only doing the former, or requiring a typedef in that case, to disambiguate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.