From 0903265550970fa901e519968a8bd83ad48bd5a0 Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 9 Nov 2023 13:18:01 -0500 Subject: [PATCH] Add another static assertion on exception types. This is already present in issue_error_nothrow(). --- include/deal.II/base/exceptions.h | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5