[Interest] Tempalted QObjects

Jean-Michaël Celerier jeanmichael.celerier at gmail.com
Wed Feb 24 20:13:44 CET 2016


I saw some other approaches to produce static reflection information by
libclang usage,
would inspired approaches be acceptable ? e.g.
https://github.com/AustinBrunkhorst/CPP-Reflection/

Also, why is "#include'ing it from your class's header file," considered
bad ?
In "standard" Qt software, it is sometimes useful to #include
"foo_moc.cpp"  (or foo.moc, I don't remember)
in the implementation file, for instance if multiple classes are defined in
the same header IIRC.

But when doing template-heavy software the .hpp have more or less the same
role
for the developer that "traditional" implementation files so it should not
come as shocking to require
inclusion of files in the .hpp. But it's only my personal opinion.


Best,
Jean-Michaël


On Wed, Feb 24, 2016 at 6:25 PM, Thiago Macieira <thiago.macieira at intel.com>
wrote:

> On quarta-feira, 24 de fevereiro de 2016 14:50:02 PST Prav wrote:
> > >> "For example, I implemented support for templated QObjects in moc
> > >> <https://codereview.qt-project.org/49864/>, but this was not merged
> > >> because
> > >> it did not raise enough interest within the Qt project."
> > >
> > > Not even that.
> > > The required condition is that someone figure out how to provide a meta
> > > object to template classes. The current solution would require
> installing
> > > the file generated by moc, #include'ing it from your class's header
> file,
> > > and modifying the internal format heavily (i.e., a Qt 6.0 task).
> > >
> > > This is unlikely to change in the current C++ language. If you want
> > > templated QObjects, please join SG7 discussion group in isocpp.org and
> > > help define reflection for C++. Then hopefully Qt will be able to use
> > > this feature in the early 2020s.
> >
> > Thiago's and Jean-Michaël's statements looks contradictary for me.
> > This is because https://codereview.qt-project.org/49864/ does not work
> or
> > what?
>
> It works, but is not acceptable.
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160224/ff3af657/attachment.html>


More information about the Interest mailing list