[Development] Question about QCoreApplicationData::*_libpaths

Kevin Kofler kevin.kofler at chello.at
Fri Jan 22 01:18:52 CET 2016


Marc Mutz wrote:
> But the discussions about move ctors that throw aren't even about
> bad_alloc. They are about assertion exceptions.

How is a move constructor an appropriate place for a sanity check? The only 
way the moved object can be invalid is if the original object was already 
invalid. So the sanity check should have been in an appropriate place to 
prevent the original object from becoming invalid in the first place. Any 
properly implemented move satisfies the invariant that the moved object 
satisfies resp. violates exactly the same invariants than the original one.

        Kevin Kofler




More information about the Development mailing list