From: Wolfgang Bangerth Date: Wed, 12 Feb 2025 04:34:45 +0000 (-0700) Subject: Do not use anonymous namespaces in header files. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d595923fa7f10420b6111a10e4142e8769b32ca;p=dealii.git Do not use anonymous namespaces in header files. --- diff --git a/include/deal.II/sundials/n_vector.templates.h b/include/deal.II/sundials/n_vector.templates.h index 8fe20deecc..4a41a8a77d 100644 --- a/include/deal.II/sundials/n_vector.templates.h +++ b/include/deal.II/sundials/n_vector.templates.h @@ -431,53 +431,50 @@ namespace SUNDIALS { namespace internal { - namespace + template ::value, int> = 0> + MPI_Comm + get_mpi_communicator_from_vector(const VectorType &) { - template ::value, int> = 0> - MPI_Comm - get_mpi_communicator_from_vector(const VectorType &) - { - return MPI_COMM_SELF; - } + return MPI_COMM_SELF; + } - template ::value && - !IsBlockVector::value, - int> = 0> - MPI_Comm - get_mpi_communicator_from_vector(const VectorType &v) - { + template ::value && + !IsBlockVector::value, + int> = 0> + MPI_Comm + get_mpi_communicator_from_vector(const VectorType &v) + { # ifndef DEAL_II_WITH_MPI - (void)v; - return MPI_COMM_SELF; + (void)v; + return MPI_COMM_SELF; # else - return v.get_mpi_communicator(); + return v.get_mpi_communicator(); # endif - } + } - template ::value && - IsBlockVector::value, - int> = 0> - MPI_Comm - get_mpi_communicator_from_vector(const VectorType &v) - { + template ::value && + IsBlockVector::value, + int> = 0> + MPI_Comm + get_mpi_communicator_from_vector(const VectorType &v) + { # ifndef DEAL_II_WITH_MPI - (void)v; - return MPI_COMM_SELF; + (void)v; + return MPI_COMM_SELF; # else - Assert(v.n_blocks() > 0, - ExcMessage("You cannot ask a block vector without blocks " - "for its MPI communicator.")); - return v.block(0).get_mpi_communicator(); + Assert(v.n_blocks() > 0, + ExcMessage("You cannot ask a block vector without blocks " + "for its MPI communicator.")); + return v.block(0).get_mpi_communicator(); # endif - } - } // namespace + } template