Conversation
|
✅ |
|
PR #1472 had an optimization that yields less template instantiations for arrays, which is something that actually can be applied to all ranges with length and slicing. Would this be worth adding? edit: The result cannot contain types; the name shouldn't be capitalized. |
|
It might make sense compile time-wise to transform all other ranges to arrays first using CTFE ( |
std/meta.d
Outdated
There was a problem hiding this comment.
Why the call to array if AliasSeqOf takes any input range?
There was a problem hiding this comment.
Good question and I've now removed it.
6b1f4b7 to
24a62b8
Compare
|
After evaluating the initial implementation and the implementation from #1472, I found that the #1472 was significantly better. It was able to handle ranges and arrays greater than 250 elements. To that end, I've copied the implementation from #1472, modified it a little, and copied in its unit tests. Thanks to @monarchdodra! |
24a62b8 to
058c01f
Compare
There was a problem hiding this comment.
Nitpick: I and V will never refer to types, so they should not be capitalized.
|
LGTM. I would have preferred |
|
Auto-merge toggled on |
|
Awesome! I guess I don't get a say in this anymore, but if I had to write my original implementation again, I'd only implement support for arrays. I'm not sure how much we are still trying to untangle library dependencies? |
|
@monarchdodra, good point, I agree it's better to leave the conversion to array to the caller. Maybe file a PR? I don't think this is part of the new release. |
Add template that allows for conversion of arrays and input ranges to AliasSeqs.