On 10/11/2024 12:06 AM, Manu wrote:
> But, I think you actually missed my point here; I provided a ref and non-ref
> overload for Other... how do I move-construct from some OTHER type?
I'm not sure moving a T to an S even makes sense.
Absolutely does, and it's essential.
Super common and super useful.
But writing a function to convert an S to a T, and then set the S to its default
initializer, should work.
Both perspectives are valid, the distinction might regard whether S knows that T exists or vice versa. In my experience, the arrangement where you construct something from some 'upstream' thing is the far more common case.
Or, it might just work out that an API is much more ergonomic one way or the other.
It doesn't matter though, your rvalue design handles this naturally... it shouldn't require a single special line of code in the compiler... that's one of the things that's so compelling about it!