[Development] What's Q_PRIMITIVE_TYPE for?

Lars Knoll lars.knoll at qt.io
Mon Nov 16 08:48:57 CET 2020

> On 13 Nov 2020, at 18:49, Thiago Macieira <thiago.macieira at intel.com> wrote:
> On Friday, 13 November 2020 00:19:41 PST Lars Knoll wrote:
>> I would hope that we’ll get mechanism to move them and help from the
>> compiler  and/or C++ standard here. This is especially needed for
>> relocatable objects, as that makes a huge performance difference, but make
>> a big difference for primitive types as well.
> For relocating, I'm sure the language will provide a solution and compilers 
> will likely give us a grace period to adjust. I don't think there are many 
> people (I don't know any) that oppose the idea of relocating objects, even if 
> they oppose the actual solution chosen to do that (like a core language 
> extension to provide a destructive move constructor or a moving destructor).
> Actual C++ primitive types won't be affected because they are trivial. My 
> point again is that we are doing that for non-trivial types.

And we’ve been doing that for 15 years now. Changing the implementation we’re using can be done in a minor release, so I’d say we fix it when there’s a need to fix it. It does work currently, and if new compilers or language features require fixes let’s do those once the compilers or language features are available.


More information about the Development mailing list