From: Wolfgang Bangerth Date: Mon, 10 Mar 2025 16:52:35 +0000 (-0600) Subject: Move an #include statement. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94898222992533a4c1219a65b235ca5fd6373710;p=dealii.git Move an #include statement. --- diff --git a/include/deal.II/base/exception_macros.h b/include/deal.II/base/exception_macros.h index 6a6bef4810..b0eb469fbd 100644 --- a/include/deal.II/base/exception_macros.h +++ b/include/deal.II/base/exception_macros.h @@ -17,26 +17,6 @@ #include -// The #defines of the Assert* macros below reference functions and -// classes that are declared in exceptions.h. This is ok -- places -// that use the Assert macro (for example) simply have to #include -// or, in the case of C++20 modules, use -// the fact that we let exceptions.h export this stuff into the dealii -// module. But the exception machinery also references Kokkos -// functions, which exceptions.h cannot export into the module. The -// places that use exceptions must know about these functions, and to -// avoid them all having to include Kokkos headers, we have to do it -// here: -DEAL_II_DISABLE_EXTRA_DIAGNOSTICS -#include -#if KOKKOS_VERSION >= 40200 -# include -#else -# include -#endif -DEAL_II_ENABLE_EXTRA_DIAGNOSTICS - - /********************************************************************** * Preprocessor definitions in support of declaring exception classes. diff --git a/include/deal.II/base/exceptions.h b/include/deal.II/base/exceptions.h index daad69f229..373ae8849c 100644 --- a/include/deal.II/base/exceptions.h +++ b/include/deal.II/base/exceptions.h @@ -20,6 +20,20 @@ #include #include +// The exception machinery (including the macros defined in +// exception_macros.h) references Kokkos functions. The places that +// use exceptions must know about these functions, and to avoid them +// all having to include Kokkos headers, we have to do it here: +DEAL_II_DISABLE_EXTRA_DIAGNOSTICS +#include +#if KOKKOS_VERSION >= 40200 +# include +#else +# include +#endif +DEAL_II_ENABLE_EXTRA_DIAGNOSTICS + + #include #include #include