[Development] #error for unreleased MSVC versions

Yves Bailly yves.bailly at sescoi.fr
Thu Oct 24 16:09:37 CEST 2013


Hello,

Le 24/10/2013 15:49, Thiago Macieira a écrit :
> I'm going to add an #error to qcompilerdetection.h for any unreleased version
> of MSVC.
> The reason is this combination:
> 1) MSVC does not provide a way to turn C++11 off (and won't provide for C++14
> either)
> 2) MSVC does instantiates *ALL* class members of exported classes, even inline
> functions.
> The result of those is that the DLLs need to export all methods with rvalue
> references, rvalue refs and other C++11 constructs.
> ==> In other words, adding new Q_COMPILER_xxx defines for C++11 for MSVC breaks
> 	binary compatibility <===

So what?

While I understand the reasoning about binary compatibility, in my humble opinion
such a drastic change should be at least deactivable, for example by adding a switch
to "configure", something like "-ignore-binary-compatibility". This way older
versions of Qt would still be compilable (assuming no other compile error).

> For that reason and because we don't know what features newer MSVC will
> support, I am right now declaring all future versions unsupported until
> there's a Qt release that adds the defines.
>
> Retroactively, that means Qt 5.0 and 5.1 are unsupported on MSVC 2013 and are
> not binary compatible with Qt 5.2 there.

Fine :-) but "unsupported" should not mean "not allowed to compile at all"...

Regards,

-- 
      /- Yves Bailly - Software developer   -\
      \- Sescoi R&D  - http://www.sescoi.fr -/
"The possible is done. The impossible is being done. For miracles,
thanks to allow a little delay."



More information about the Development mailing list