Date: Mon, 27 Oct 2025 11:46:19 +0000
On Mon, Oct 27, 2025 at 11:41 AM Frederick Virchanza Gotham wrote:
>
> If you really want to assign to a moved_from object, I think just do:
>
> Func( std::move(var) );
> ::new( &var ) T( SomeOtherFunc() );
Sorry I should clarify that I meant this in a parallel universe where
all moved_from objects have a no-op destruction . . . but then of
course we could still have a problem here if the constructor throws.
Never mind.
>
> If you really want to assign to a moved_from object, I think just do:
>
> Func( std::move(var) );
> ::new( &var ) T( SomeOtherFunc() );
Sorry I should clarify that I meant this in a parallel universe where
all moved_from objects have a no-op destruction . . . but then of
course we could still have a problem here if the constructor throws.
Never mind.
Received on 2025-10-27 11:45:53
