[Development] Setters: Passing by value or const reference?

Olivier Goffart olivier at woboq.com
Sun Jun 24 21:46:11 CEST 2012


On Sunday 24 June 2012 09:52:10 Marc Mutz wrote:
> A late-entry data point:
> 
> libstdc++'s std::list is binary incompatible between -std=c++11
> and -std=c++98, because it adds a _M_size member.
> 
> It's the most stupid change I can imagine, but it apparently means that the
> GCC devs don't shoot for BC between C++11- and C++98-compiled code. I guess
> that, at least for GCC users, it might therefore actually be a boon if a Qt
> compiled in C++11 mode was incompatible with a Qt compiled in C++98 mode at,
> say, the linker level, lest they ran into such hidden BiC issues unawares.


This is very unfortunate.
This would mean that if you want to do a C++11 application, you must only use 
C++11 libraries.

Fortunatelly, those incmpatibilities are rares, and documented there:
http://gcc.gnu.org/wiki/Cxx11AbiCompatibility
And because Qt uses STL in its ABI very little (if at all), we should be safe.

-- 
Olivier

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



More information about the Development mailing list