On quinta-feira, 15 de agosto de 2013 16:07:33, Sze Howe Koh wrote: > On 15 August 2013 12:53, Thiago Macieira <[email protected]> wrote: > > However, the error about "complex" makes me thing it's actually the > > capital > > letter I, defined in complex.h. > > > > Since C99 requires that definition (7.3.1p4), looks like we should simply > > change Qt. > > I believe "I" is only defined in C99, but not C++ (well, at least my > MSVC2010 headers don't have it)
Correct. And I've just checked the latest draft for C++14 and it does not
define I. In fact, it does not allow the C99 complex types at all:
_Complex double j;
I asked the committee in May about more C99 rapprochement and the above is
exactly one of the things they do *not* want. That above is C99's way of doing
something C++ solved with templates.
> > the problem is not those patches. It's that he #included
> > <complex.h> before <qobject.h>
>
> It turns out that the problem is he defined "I" in one of his own
> headers before including qobject.h:
> http://qt-project.org/forums/viewthread/31105/
Right. But still, since C99 does define I in complex.h and some compilers do
allow including C99 headers in C++ code, we need to cope with it.
Does anyone want to submit a simple patch that renames the template parameter?
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
