[Development] templated QObjects [was: Re: We are planning to upgrade qdoc to use clang for parsing C++]

Milian Wolff milian.wolff at kdab.com
Wed Mar 2 20:59:41 CET 2016


On Mittwoch, 2. März 2016 11:28:07 CET Thiago Macieira wrote:
> On quarta-feira, 2 de março de 2016 19:24:15 PST Milian Wolff wrote:
> > On Mittwoch, 2. März 2016 09:47:33 CET Thiago Macieira wrote:
> > > On quarta-feira, 2 de março de 2016 16:48:08 PST Milian Wolff wrote:
> > > > A simple solution would then be a macro for an explicit instantiation,
> > > > similar  to what we already do with
> > > > Q_DECLARE_LOGGING_CATEGORY/Q_LOGGING_CATEGORY. Only there then would
> > > > moc
> > > > generate the static meta object. That should work, no?
> > > 
> > > That is the case I mentioned before: the template class's author needs
> > > to
> > > know each and every possible instantiation ahead of time and instantiate
> > > them. Unlikely to be acceptable use-case.
> > 
> > For the use-case I have in mind, i.e. templated models, it would just
> > fine.
> > Note that I did not propose to have the macro for the instantiation where
> > the template gets defined. Rather, I imagine users of the template to do
> > that on demand.
> 
> That's not the case above. I was talking about pre-populating every possible
> instantiation.
> 
> If the users do it on demand, then we have the runtime merging problem on
> Windows.
> 
> Pick your poison.

Hey Thiago,

what is "the runtime merging problem on Windows"?

Thanks
-- 
Milian Wolff | milian.wolff at kdab.com | Software Engineer
KDAB (Deutschland) GmbH&Co KG, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5903 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160302/72f9705b/attachment.bin>


More information about the Development mailing list