March 05

On Tuesday, 4 March 2025 at 11:24:43 UTC, Per Nordlöw wrote:

>

On Tuesday, 4 March 2025 at 01:27:29 UTC, Manu wrote:

>

Please do contribute to this effort if you're enthusiastic! I have very
little free time rn.

Tried converting a couple of usages of emplace and moveEmplace in a repo of mine and discovered that I'm missing a way to express

moveEmplace(x, y)

as

new(y) typeof(y)(__rvalue(x))

. This doesn't always work eventough y being assignable from x.

For the sake of simplicity, it would be better to start with the overloads of emplace that create a brand-new object, without moving an existing one. That way, you will not have to deal with the added complication of __rvalue (which itself is still a work-in-progress).

March 05

On Wednesday, 5 March 2025 at 01:53:02 UTC, Paul Backus wrote:

>

For the sake of simplicity, it would be better to start with the overloads of emplace that create a brand-new object, without moving an existing one. That way, you will not have to deal with the added complication of __rvalue (which itself is still a work-in-progress).

Alternatively, if you need to move something, you can just use core.lifetime.move for now. Replacing move with __rvalue can be done as a separate step.

March 05

On Tuesday, 4 March 2025 at 12:22:36 UTC, Manu wrote:

> >

Tried converting a couple of usages of emplace and moveEmplace in a repo of mine and discovered that I'm missing a way to express

moveEmplace(x, y)

as

new(y) typeof(y)(__rvalue(x))

. This doesn't always work eventough y being assignable from x.

Is it this issue: https://github.com/dlang/dmd/issues/20950 ??

Yes, it is. Thanks.

March 06
On Wed, 5 Mar 2025 at 17:31, Per Nordlöw via Digitalmars-d < digitalmars-d@puremagic.com> wrote:

> On Tuesday, 4 March 2025 at 12:22:36 UTC, Manu wrote:
> >> Tried converting a couple of usages of `emplace` and `moveEmplace` in a repo of mine and discovered that I'm missing a way to express
> >>
> >> `moveEmplace(x, y)`
> >>
> >> as
> >>
> >> `new(y) typeof(y)(__rvalue(x))`
> >>
> >> . This doesn't always work eventough `y` being assignable from `x`.
> >>
> >
> > Is it this issue: https://github.com/dlang/dmd/issues/20950 ??
>
> Yes, it is. Thanks.
>

Walter seems preoccupied at the moment, and I've been working on the move
semantics stuff. If you want to have a go at this bug, that'd be really
cool. I imagine it's probably a trivial fix; finding it is always the hard
part :P
I don't know DMD well enough to have any intuition for the codebase, so
everything takes me forever to isolate...


March 06

On Thursday, 6 March 2025 at 08:16:28 UTC, Manu wrote:

>

Walter seems preoccupied at the moment, and I've been working on the move
semantics stuff. If you want to have a go at this bug, that'd be really
cool. I imagine it's probably a trivial fix; finding it is always the hard
part :P
I don't know DMD well enough to have any intuition for the codebase, so
everything takes me forever to isolate...

I'll try waiting for Walter on this for now.

Thanks.

1 2
Next ›   Last »