This patch represents a suggestion:
Default new should return std::optional<owning_reference> with owning_reference managing the life time of the object in a similar way as a unique_ptr would with the exception that it is not allowed to be null.
This will allow to move the reference around without null checks.
This patch represents a suggestion: Default new should return std::optional<owning_reference> with owning_reference managing the life time of the object in a similar way as a unique_ptr would with the exception that it is not allowed to be null.
This will allow to move the reference around without null checks.