[Development] Question about QCoreApplicationData::*_libpaths

Thiago Macieira thiago.macieira at intel.com
Mon Jan 18 20:28:16 CET 2016


On Monday 18 January 2016 13:57:23 Matthew Woehlke wrote:
> I'll still assert that C++ needs relocatability :-).

The discussion on std-proposals was quite favourable to adding the concept. 
Just note that it mutated from "relocatable" to "destructive move", which 
isn't the same thing.

Here's what a vector could when resizing do for:

a) regular type
 allocate new block, copy-construct then destroy each element, free old block

b) regular type with move constructor
 ditto, but move-construct instead

c) regular type with noexcept move constructor
 ditto, but like Peppe said, it can be done in a mass operation that cannot 
throw. TBH, I don't see how this implementation would differ from b. In fact, 
the code would be the same as a and b and I'd rely on the compiler optimising 
the rollback code away.

d) destructive movable
 allocate the new block, move-destroy each element (old element is discarded), 
free old block

e) relocatable
 realloc

Relocatable would be an extension to the destructive move: trivially 
destructible movable.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list