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-
> 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="
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
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
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