[Development] Question about QCoreApplicationData::*_libpaths
Thiago Macieira
thiago.macieira at intel.com
Mon Jan 18 20:32:00 CET 2016
On Monday 18 January 2016 19:17:25 Bubke Marco wrote:
> >> So how many people define there objects as relocatable?
> >
> > Only Qt users. C++ proper doesn't have such a concept (yet) :'(.
>
> I mean how many Qt users using that feature. ;-)
That depends. Do you include people who use the feature without knowing they
do, by using Qt containers of Qt types that are declared in our headers are
relocatable? If so, then the answer is "all of them".
> > I'll still assert that C++ needs relocatability :-).
>
> I believe that to. It would be nice if there would be a zero move
> constructor optimization too. So if your move it sets you memory to zero
> so whole range would be simply memsetted. So you can simply copy that span
> and than memset the old area to zero.
Indeed, that's another trait that would be useful to have.
Note that types for which any bit pattern is valid already have a name:
trivially constructible.
> Building a structure which defaults to zero is not that hard in many cases.
No, and memsetting to zero is very fast and efficient (any one 64-bit pattern,
actually). It's possible that the processor even optimises zero-memsetting.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list