On Monday, 22 August 2022 at 19:35:11 UTC, Steven Schveighoffer
wrote:
It is possible to write the same function for both const and
mutable overloads by using the `this` template parameter:
I guess before the "inout", "this This" was the only way to do
this. I must remember this, it's really u
On 8/22/22 12:36 PM, realhet wrote:
Hello,
I managed to make a universal getParent() function which can preserve
constness.
I also had success with inout functions that work with this inout
getParent method.
Is it possible to do something like this but for the allParents input
range producer
On 8/22/22 09:36, realhet wrote:
> It gives the protection I was needed but is it possible to make this
> prettier?
> auto allParents(){
>struct ParentRange{
> A act;
> @property bool empty() const{ return act is null; }
> @property A front() { return act;
Hello,
I managed to make a universal getParent() function which can
preserve constness.
I also had success with inout functions that work with this inout
getParent method.
Is it possible to do something like this but for the allParents
input range producer method?
In the const range implementa