Exception specifications on functions useless?
Lubos Lunak
l.lunak at suse.cz
Mon Apr 2 02:59:11 PDT 2012
On Tuesday 20 of March 2012, Lubos Lunak wrote:
> - C++11 deprecates it and instead introduces a noexcept keyword which
> forbids the function to throw anything
>
> I'm not strongly biased either way, but what we have right now are really
> just pretty comments on functions. I think we should either say that we use
> the specifications, in which case -fno-enforce-sh-specs should not be used
> at least in debug builds, or we can say we follow the C++11/Boost/etc.
> trend and not use them, in which case we can have one macro for portable
> way of saying noexcept and have an EasyHack for removing the other
> specifications. BTW, it should be also noted that SAL_THROW() expands to
> nothing with gcc.
>
> Opinions on this?
Could this be please added to the next TSC agenda? It doesn't look to me like
there's a clear consensus, and not caring much myself about either
possibility, I don't want to do any change. I'll at most
remove -fno-enforce-eh-specs from --enable-dbgutil builds if there's no
resolution on this, so that clang is not the only compiler to find mistakes.
--
Lubos Lunak
l.lunak at suse.cz
More information about the LibreOffice
mailing list