From: David Wells Date: Thu, 9 Nov 2023 18:18:01 +0000 (-0500) Subject: Add another static assertion on exception types. X-Git-Tag: relicensing~306^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16257%2Fhead;p=dealii.git Add another static assertion on exception types. This is already present in issue_error_nothrow(). --- diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index 66ef3f05fc..ffbe7699de 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -1438,6 +1438,8 @@ namespace deal_II_exceptions const char *exc_name, ExceptionType e) { + static_assert(std::is_base_of_v, + "The provided exception must inherit from ExceptionBase."); // Fill the fields of the exception object e.set_fields(file, line, function, cond, exc_name);