On Saturday, 15 September 2018 at 20:13:51 UTC, Jonathan M Davis
wrote:
On Saturday, September 15, 2018 11:44:05 AM MDT Jan via
Digitalmars-d-learn wrote:
[...]
No. variables are _always_ lvalues. An lvalue is an object
which is addressable and which can therefore be assigned a
value (ignori
On Saturday, September 15, 2018 11:44:05 AM MDT Jan via Digitalmars-d-learn
wrote:
> On Thursday, 13 September 2018 at 11:08:30 UTC, Jonathan M Davis
>
> wrote:
> > [...]
>
> Thanks for clarifying Jonathan :)
> But aren't the variables considered rvalues then?
No. variables are _always_ lvalues.
On Thursday, 13 September 2018 at 11:08:30 UTC, Jonathan M Davis
wrote:
[...]
Thanks for clarifying Jonathan :)
But aren't the variables considered rvalues then?
On Thursday, September 13, 2018 4:04:58 AM MDT Jan via Digitalmars-d-learn
wrote:
> Many thanks Adam and Steve! Works like a charm! :D
> I presumed classes are lvalues. I shouldn't make things more
> complicated than they are ;-)
Well, the variables _are_ lvalues. It's just that they're reference
Many thanks Adam and Steve! Works like a charm! :D
I presumed classes are lvalues. I shouldn't make things more
complicated than they are ;-)
On 9/12/18 8:01 AM, Jan wrote:
I'm using D not for that long and lately I have encountered an issue. I
have class 'Foo' with a constructor using this signature:
`this (ref Bar original)`
In the 'Bar' class itself I want to create an instance of 'Foo' using
'this' as parameter. Something in the
On Wednesday, 12 September 2018 at 15:01:36 UTC, Jan wrote:
I'm using D not for that long and lately I have encountered an
issue. I have class 'Foo' with a constructor using this
signature:
`this (ref Bar original)`
classes and the ref keyword should very rarely be used together
in D. classe
I'm using D not for that long and lately I have encountered an
issue. I have class 'Foo' with a constructor using this signature:
`this (ref Bar original)`
In the 'Bar' class itself I want to create an instance of 'Foo'
using 'this' as parameter. Something in the way of:
`Foo foo = new Foo(ref