Template Usage with Eponymous Trick
Paul Backus
snarwin at gmail.com
Thu Jan 30 20:42:02 UTC 2020
On Thursday, 30 January 2020 at 15:14:43 UTC, ShadoLight wrote:
>
> Is there a technical reason for this limitation? Why are the
> 'classical' invocation style not allowed for eponymous
> templates as well?
The 'classical' invocation style is not allowed because it would
make the language grammatically ambiguous. Without semantic
analysis, the compiler would have no way of knowing whether
`foo!(int, int)` was intended to refer to the template instance
foo!(int, int), or the eponymous member foo!(int, int).foo.
More information about the Digitalmars-d-learn
mailing list