Message from C, C++ talks

July 2019

— #cbook

— Https://

— /startMissRose_bot

— Heya :) PM me if you have any questions on how to use me!


Anyway to do a static check to the validity of the object after it's moved?!


Object obj;
Object oth = std::move(obj);
obj.say_hi();//error: Instance is not valid

— Only if type itself has something like is_valid

— And how is that?!

— As I know
Compile time check is done for constants

— Moving and compile time check are completely different things

— What do you mean how?

— Well
If it is possible, I would call it static move

— Then also move constructor should change some state in the data that can be checked then by this function

Message permanent page

— Ofc

— I don't know anything else other than this variant

— What you mean static?