Possible bug when instantiating template function with nested struct
Stanislav Blinov
stanislav.blinov at gmail.com
Sun Nov 7 15:38:17 UTC 2021
On Sunday, 7 November 2021 at 13:59:11 UTC, Alexandru Ermicioi
wrote:
>> Arrays, ostensibly, are first class citizens in D, therefore
>> should be implemented in the language, not a library.
>
> But why does it matter where you put it?
Because this should just compile and work:
```d
T[3] a = T(42);
```
for any T that can be thus instantiated. At the moment, whether
it does even compile depends:
- on what T actually is,
- on where this instantiation is taking place,
- on your compile options.
Which is just ridiculous.
More information about the Digitalmars-d
mailing list