== Why is this an issue?

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

[source,cpp]
----
void f() throw(); // Noncompliant
void g() throw(std::exception); // Noncompliant
----


=== Compliant solution

[source,cpp]
----
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.


== Resources

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



ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

=== Message

Remove this "throw" clause


=== Highlighting

``++throw++`` clause


'''
== Comments And Links
(visible only on this page)

=== on 16 Jun 2016, 09:55:15 Ann Campbell wrote:
\[~alban.auzeill] I've updated code comments slightly.

endif::env-github,rspecator-view[]
