Extend the call site default argument expansion mechanism?

Computermatronic computermatronic at gmail.com
Wed May 16 00:27:43 UTC 2018


On Tuesday, 15 May 2018 at 20:31:14 UTC, jmh530 wrote:
> On Tuesday, 15 May 2018 at 15:02:36 UTC, jmh530 wrote:
>> [snip]
>>
>
> Note, it's not an issue if Foo were not a struct. This was 
> fixed in Bug 6400 [1]l. The issue is with template instances. I 
> have filed a new enhancement request [2]
>
> [1] https://issues.dlang.org/show_bug.cgi?id=6400
> [2] https://issues.dlang.org/show_bug.cgi?id=18863

Interestingly, you can get pretty close with a struct nested in a 
template function, however it seems that overload resolution does 
not check opDispatch if a public symbol of the same name exists.

this (https://run.dlang.io/is/ZzfWDs) dosen't work, but this 
(https://run.dlang.io/is/7zvfqc) does (notice SList & DList are 
not directly visible).


More information about the Digitalmars-d mailing list