[Development] Basing Qt Creator Coding Style on C++ Core Guidelines?
Thiago Macieira
thiago.macieira at intel.com
Sat Nov 19 18:17:02 CET 2016
Em sábado, 19 de novembro de 2016, às 13:07:04 PST, Marc Mutz escreveu:
> As soon as someone explains to me what the material difference is between a)
> supporting mixing libc++ and libstdc++ on Unix platforms and b) supporting
> mixing release and debug runtimes on Windows,
libc++ and libstdc++ are designed to interoperate, because they share operator
new, std::exception and the base typeinfos, if compiled properly[*]. That
means memory new'ed with one can be delete'd in the other, exceptions thrown
in one can be caught in the other, dynamic casts work, etc.
The MSVC CRTs are currently not designed to interoperate. Not only do they
each have their own operator new, one's delete cannot delete the other's
pointers. That said, we *could* build a debug mode Qt against the release
runtime (-Od -MT), we just don't. It's one of those "it was like that when I
arrived" problems of Qt 4.0, though I helped fix the Unix debug/release problem
for 4.2.
Another reason is that no one deploys debug-mode. So there's little danger of
mixing because it doesn't happen in customers' hands. And then there's the
fact that MS keeps breaking BC if you change the compiler, so anyone using
MSVC needs to be careful anyway to avoid polluting one build with plugins from
another, something that elsewhere is permitted. Just think of how pointless
our discussion on whether we should upgrade our packaging system to MSVC 2015
Update 3 or not...
Finally, MS has said it will start keeping binary compatibility with Visual
Studio 2017 onwards (or was it 2015 onwards?), so this is actually a good time
to revisit this.
[*] Apple compiles them properly. I have yet to see someone compiling them
properly on Linux.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list