Re: [Development] constexpr and qMetaTypeId<>()

2013-09-12 Thread Thiago Macieira
On quinta-feira, 12 de setembro de 2013 09:38:16, achart...@fastmail.fm wrote: > Thiago - The qMetaTypeId documentation > (http://qt-project.org/doc/qt-5.1/qtcore/qmetatype.html#qMetaTypeId) > specifically states that the type registration using this function is > resolved at compile-time, not run-

Re: [Development] constexpr and qMetaTypeId<>()

2013-09-12 Thread achartier
> Message: 1 > Date: Wed, 11 Sep 2013 19:12:26 -0700 > From: Thiago Macieira > Subject: Re: [Development] constexpr and qMetaTypeId<>() > To: development@qt-project.org > Message-ID: <3962396.DaoebYs1tu@tjmaciei-mobl2> > Content-Type: text/plain; charset="

Re: [Development] constexpr and qMetaTypeId<>()

2013-09-12 Thread Stephen Kelly
On Wednesday, September 11, 2013 14:29:44 achart...@fastmail.fm wrote: > Hello, > > I'd like to use qMetaTypeId<>() in a constexpr expression. I have my own > custom type declared as such: > > class MyCustomClass : public QObject > { > Q_OBJECT > > // ... > }; > > Q_DECLARE_METATYPE(M

Re: [Development] constexpr and qMetaTypeId<>()

2013-09-11 Thread Thiago Macieira
On quarta-feira, 11 de setembro de 2013 14:29:44, achart...@fastmail.fm wrote: > Hello, > > I'd like to use qMetaTypeId<>() in a constexpr expression. You can't. The types are registered at runtime. > Any help is greatly appreciated. -- Thiago Macieira - thiago.macieira (AT) intel.com Softw

[Development] constexpr and qMetaTypeId<>()

2013-09-11 Thread achartier
Hello, I'd like to use qMetaTypeId<>() in a constexpr expression. I have my own custom type declared as such: class MyCustomClass : public QObject { Q_OBJECT // ... }; Q_DECLARE_METATYPE(MyCustomClass*) I then try the following: constexpr qint32 metaTypeId = qMetaTypeId(); static_as