Exception specifications never really provided any advantages in {cpp}. They have been deprecated since {cpp}11, and removed since {cpp}17 (specification with an exception) and {cpp}20 (empty throw specification). If your code still contains some, you should replace empty ``++throw()++`` specifications, with ``++noexcept++`` and remove any other specifications.


== Noncompliant Code Example

----
void f() throw(); // Noncompliant
void g() throw(std::exception); // Noncompliant
----


== Compliant Solution

----
void f() noexcept;
void g();
----


== Exceptions

If a derived class overrides a function with a dynamic exception specification, then the derived function is forced to add a compatible exception specification. Such exception specifications are ignored.


== See

* https://github.com/isocpp/CppCoreGuidelines/blob/036324/CppCoreGuidelines.md#e30-dont-use-exception-specifications[{cpp} Core Guidelines E.30] - Don’t use exception specifications



ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
