opMixin or mixin function templates with convenience operator?

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri Dec 13 12:49:19 UTC 2019

On Friday, 13 December 2019 at 12:37:31 UTC, Simen Kjærås wrote:
> So interpolate#"{foo++}" should fail to compile? As should 
> interpolate#"{foo}" where foo is of a type with a non-const 
> toString()?

No, I don't think the first one would fail.

It would:


So similar to

    const tmp = foo++;

non-const toString() would fail if interpolate builds a string, 
but not if it builds a tuple.

> I see what you're trying to do, but IMO there are too many 
> cases where the outlined restrictions cause undue problems.

Well, it will not cause a problem for the tuple that Walter's DIP 
create. So it certainly is no worse than the proposed DIP?

More information about the Digitalmars-d mailing list