Re:New C++ features in GCC 12
by jcelerier on Sunday May 01, 2022 @05:53PM
(#31229062)
No, you can absolutely use it (but you most likely want to clear() or assign an empty string to it before doing e.g. push_back as move does not necessarily clear the moved-from object - std::move(some_int) won't clear the int)
[ Parent
| on HN ]
I mean, it won't have a useful value, so I need to re assign to it, at which point I could just be using a new variable right?
It might not be null, but I can't do much more with it than I can with null. I need to assign something new first
> I mean, it won't have a useful value, so I need to re assign to it, at which point I could just be using a new variable right?
I have a hard time understanding why "I could just be using a new variable" follows from "it won't have a useful value".