Re: Tail-constness of class parameters

2017-12-25 Thread Nordlöw via Digitalmars-d-learn
On Monday, 25 December 2017 at 15:16:55 UTC, ag0aep6g wrote: https://dlang.org/phobos/std_typecons.html#Rebindable Thanks.

Re: Tail-constness of class parameters

2017-12-25 Thread ag0aep6g via Digitalmars-d-learn
On Monday, 25 December 2017 at 14:49:11 UTC, Nordlöw wrote: 1. Is there a way to express tail-constness on the parameters https://dlang.org/phobos/std_typecons.html#Rebindable

Tail-constness of class parameters

2017-12-25 Thread Nordlöw via Digitalmars-d-learn
In a graph library I'm working on I have the following algorithm bool hasContext(Node sub,// TODO in Node sup) nothrow // TODO in { Node curr = sub; while (true) { Node ctx = curr.context; if (!ctx) { break;} if (ctx is sup)