From 01e1bfb7b2a6c1a9a512f55666b3ec97bc892f0e Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 23 May 2025 13:01:46 -0400 Subject: [PATCH] AssertNothrow: use the 'if (false)' trick. This should handle unused variable warnings for all presently supported compilers - it is the same trick we now use for Assert(). --- include/deal.II/base/exception_macros.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/deal.II/base/exception_macros.h b/include/deal.II/base/exception_macros.h index 9ad8f04afa..3aa130c6da 100644 --- a/include/deal.II/base/exception_macros.h +++ b/include/deal.II/base/exception_macros.h @@ -680,6 +680,10 @@ # define AssertNothrow(cond, exc) \ do \ { \ + if (false) \ + if (!(cond)) \ + { \ + } \ } \ while (false) #endif -- 2.39.5