From: Wolfgang Bangerth Date: Thu, 17 Feb 2022 16:33:18 +0000 (-0700) Subject: Remove a general template no longer needed. X-Git-Tag: v9.4.0-rc1~413^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ba22b44a0a27e92e24f18b15976137c78e3de6ff;p=dealii.git Remove a general template no longer needed. --- 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