diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-04-30 13:23:07 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-04-30 22:46:39 +0200 |
commit | 6a113a4f14808ac7f4bbdb4a5baff9383541d49a (patch) | |
tree | 06f473da02ca5a93299ab85c8a366ae782bd8380 /codemaker | |
parent | f4880d0804478ba1edcb9f676278b77bd2bd7343 (diff) |
throw() -> noexcept, part 1/3: Manual scaffolding
The legacy `throw()` dynamic exception specification is gone for good from C++20
(even if compilers typically still accept it, but e.g. Clang has
-Wdeprecated-dynamic-exception-spec to at least warn about it).
Introduce SAL_NOEXCEPT for use in URE interface include files. (For both the
existing SAL_THROW_EXTERN_C and the new SAL_NOEXCEPT, base usage of `noexept`
not on LIBO_INTERNAL_ONLY, but on the actual compiler C++ version, so that e.g.
building CppunitTest_cppu_any-external, which uses
gb_CppunitTest_set_external_code but not gb_CXX03FLAGS, will not potentially
complain about those macros expanding to the legacy `throw()`, like when
building with Clang -Wdeprecated-dynamic-exception-spec manually enabled.)
Change-Id: I7e5c7f8d5f0fd622cfc9987d656b1f68541375aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114908
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index 1ab587040b82..be1b2c2b5cc2 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -1173,7 +1173,7 @@ void InterfaceType::dumpDeclaration(FileStream & out) out << "protected:\n"; inc(); out << indent() << "~" << id_ - << ("() throw () {} // avoid warnings about virtual members and" + << ("() SAL_NOEXCEPT {} // avoid warnings about virtual members and" " non-virtual dtor\n"); dec(); out << "};\n\n"; |