[Development] New BiC gotcha: adding noexcept

Marc Mutz marc.mutz at kdab.com
Fri Dec 1 15:21:38 CET 2017


Hi,

I just realised: Since C++17, noexcept is part of the mangled name. That 
means that adding noexcept to an exported function is BiC now! Please be 
aware of this when reviewing patches.

Since non-template inline members of exported classes are exported, too, 
in MSVC Debug builds, the same is true for them: You can no longer add 
noexcept to inline functions of exported classes (yet another reason to 
avoid exporting non-polymorphic classes wholesale; individually export 
single functions instead).

Do we need a new macro (Q_DECL_CPP17_COMPATIBLE_NOTHROW?) that expands 
to nothing on MSVC Debug builds?

Or should we simply dodge the issue and declare debug builds of Qt not 
subject to BC on MSVC?

Thanks,
Marc




More information about the Development mailing list