[Interest] to -fno-exceptions or not ...
Thiago Macieira
thiago.macieira at intel.com
Tue Dec 16 17:45:06 CET 2014
On Tuesday 16 December 2014 17:37:02 René J.V. Bertin wrote:
> Out of curiosity, what does building with -fexceptions (= without
> -fno-exceptions) do to simple calls like QString() or QIcon()? Does it
> introduce overhead there?
Yes and no. QString() is inline, so the compiler can tell that it doesn't
throw when it inlines the code.
QIcon() isn't inline and neither is it marked as noexcept. Therefore, the
compiler must add surrounding EH code so that any locals you have in the
context where that QIcon was created can be destructed.
Proof left as an exercise to the reader.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Interest
mailing list