2 ms·
I don't think C++ can statically constrain use after move. A moved value is considered valid, but unspecified. It is entirely possible to use the value after mo
by staticassertion 10y ago
I don't think C++ can statically constrain use after move. A moved value is considered valid, but unspecified. It is entirely possible to use the value after moving it, though maybe there's a warning?
Using Unique Ptr it's a bit hard IIRC (it's been 2 years since I've written C++) but still possible.