From be80e7e669f984666d337a9245915ab1e9c19406 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 9 Feb 2025 14:47:32 -0700 Subject: [PATCH] Use proper types (rather than #defines) in mpi_stub.h. --- include/deal.II/base/mpi_stub.h | 35 ++++++++++----------------------- 1 file changed, 10 insertions(+), 25 deletions(-) diff --git a/include/deal.II/base/mpi_stub.h b/include/deal.II/base/mpi_stub.h index 7b079f40a2..498c92e932 100644 --- a/include/deal.II/base/mpi_stub.h +++ b/include/deal.II/base/mpi_stub.h @@ -31,30 +31,15 @@ using MPI_Comm = int; using MPI_Request = int; using MPI_Datatype = int; using MPI_Op = int; -# ifndef MPI_COMM_WORLD -# define MPI_COMM_WORLD 0 -# endif -# ifndef MPI_COMM_SELF -# define MPI_COMM_SELF 0 -# endif -# ifndef MPI_COMM_NULL -# define MPI_COMM_NULL 0 -# endif -# ifndef MPI_REQUEST_NULL -# define MPI_REQUEST_NULL 0 -# endif -# ifndef MPI_MIN -# define MPI_MIN 0 -# endif -# ifndef MPI_MAX -# define MPI_MAX 0 -# endif -# ifndef MPI_SUM -# define MPI_SUM 0 -# endif -# ifndef MPI_LOR -# define MPI_LOR 0 -# endif -#endif +constexpr MPI_Comm MPI_COMM_WORLD = 0; +constexpr MPI_Comm MPI_COMM_SELF = 0; +constexpr MPI_Comm MPI_COMM_NULL = 0; +constexpr MPI_Request MPI_REQUEST_NULL = 0; +constexpr MPI_Op MPI_MIN = 0; +constexpr MPI_Op MPI_MAX = 0; +constexpr MPI_Op MPI_SUM = 0; +constexpr MPI_Op MPI_LOR = 0; + +#endif #endif -- 2.39.5