[Development] #error for unreleased MSVC versions

Olivier Goffart olivier at woboq.com
Thu Oct 24 17:42:01 CEST 2013


On Thursday 24 October 2013 14:49:39 Thiago Macieira wrote:
> Hello
> 
> I'm going to add an #error to qcompilerdetection.h for any unreleased
> version of MSVC.

I am opposed to that.

Can I do the same for any unreleased version of ICC?
And a qFatal if it Qt runs on any unreleased CPU?

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

I don't understand your conclusion. What new Q_COMPILER_xxx breaks binary 
compatibility ?
How would the ability to turn new c++ feature off help?


As for 2, does it applies for template function? (can we change / remove 
symbols of template functions?)

> 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.

Well, that's no different from any unreleased product. We can't support future 
verison of anything.  That's impossible.  In most of the case they will just 
work, so i think 
 
> Retroactively, that means Qt 5.0 and 5.1 are unsupported on MSVC 2013 and
> are not binary compatible with Qt 5.2 there.

What exactly is not binary compatible?

-- 
Olivier

Woboq - Qt services and support - http://woboq.com - http://code.woboq.org



More information about the Development mailing list