Replies: 1 comment
|
The reason is because otherwise the initializer list would be an initializer list of initializer lists. vs The Adept standard library currently only supports casting from initializer lists to collections, not initializer lists of initializer lists to collections of collections. This enables us to have zero heap allocations when initializing N-d arrays and avoid having to describe an arbitrary collection. You can always define your own additional conversions however: although it gets kind of ugly. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The sample code for using initializer lists to initialize both
ArrayandListinvolve the type casting of the first element:https://github.com/AdeptLanguage/Adept/wiki/Array#array-literals
https://github.com/AdeptLanguage/Adept/wiki/List#list-literals
All reactions