From ba22b44a0a27e92e24f18b15976137c78e3de6ff Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 17 Feb 2022 09:33:18 -0700 Subject: [PATCH] Remove a general template no longer needed. --- include/deal.II/base/mpi.h | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index 4c9e5ccfec..ef19e0a024 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -1305,28 +1305,14 @@ namespace Utilities namespace internal { + /** + * Given a pointer to an object of class T, the functions in this + * namespace return the matching + * `MPI_Datatype` to be used for MPI communication. + */ namespace MPIDataTypes { - /** - * Given a pointer to an object of class T, return the matching - * `MPI_Datatype` to be used for MPI communication. - * - * As an example, passing an `int*` to this function returns `MPI_INT`. - * - * @note In reality, these functions are not template functions templated - * on the parameter T, but free standing inline function overloads. This - * templated version only exists so that it shows up in the - * documentation. The `=delete` statement at the end of the declaration - * ensures that the compiler will never choose this general template and - * instead look for one of the overloads. - */ - template - inline MPI_Datatype - mpi_type_id(const T *) = delete; - -#ifndef DOXYGEN - -# ifdef DEAL_II_WITH_MPI +#ifdef DEAL_II_WITH_MPI inline MPI_Datatype mpi_type_id(const bool *) { @@ -1452,13 +1438,13 @@ namespace Utilities { return MPI_DOUBLE_COMPLEX; } -# endif #endif } // namespace MPIDataTypes } // namespace internal +#ifdef DEAL_II_WITH_MPI /** * A template variable that translates from the data type given as * template argument to the corresponding @@ -1474,7 +1460,7 @@ namespace Utilities const MPI_Datatype mpi_type_id = internal::MPIDataTypes::mpi_type_id( static_cast>> *>(nullptr)); - +#endif #ifndef DOXYGEN namespace internal -- 2.39.5