From 5d595923fa7f10420b6111a10e4142e8769b32ca Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 11 Feb 2025 21:34:45 -0700 Subject: [PATCH] Do not use anonymous namespaces in header files. --- include/deal.II/sundials/n_vector.templates.h | 65 +++++++++---------- 1 file changed, 31 insertions(+), 34 deletions(-) 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 -- 2.39.5