From 0c5468d2d24ae33437c8a363f823485b44c65286 Mon Sep 17 00:00:00 2001 From: Sebastian Kinnewig Date: Sun, 19 Nov 2023 12:26:15 +0100 Subject: [PATCH] Turn make_rcp() into an inline function. --- include/deal.II/base/trilinos_utilities.h | 20 ++++++++++++++++++-- source/base/trilinos_utilities.cc | 17 ----------------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/include/deal.II/base/trilinos_utilities.h b/include/deal.II/base/trilinos_utilities.h index bb3e1e5958..6e6ffcb19a 100644 --- a/include/deal.II/base/trilinos_utilities.h +++ b/include/deal.II/base/trilinos_utilities.h @@ -210,8 +210,24 @@ namespace Utilities using Teuchos::make_rcp; # endif // defined DOXYGEN || !DEAL_II_TRILINOS_VERSION_GTE(14, 0, 0) } // namespace internal - } // namespace Trilinos -#endif // DEAL_II_TRILINOS_WITH_TPETRA + + + + /* ------------------------- Inline functions ---------------------- */ + namespace internal + { +# if !DEAL_II_TRILINOS_VERSION_GTE(14, 0, 0) + template + inline Teuchos::RCP + make_rcp(Args &&...args) + { + return Teuchos::RCP(new T(std::forward(args)...)); + } +# endif // !DEAL_II_TRILINOS_VERSION_GTE(14, 0, 0) + } // namespace internal + + } // namespace Trilinos +#endif // DEAL_II_TRILINOS_WITH_TPETRA } // namespace Utilities diff --git a/source/base/trilinos_utilities.cc b/source/base/trilinos_utilities.cc index 9fb095e345..e9f2b105e5 100644 --- a/source/base/trilinos_utilities.cc +++ b/source/base/trilinos_utilities.cc @@ -169,23 +169,6 @@ namespace Utilities } } // namespace Trilinos #endif - - -#ifdef DEAL_II_TRILINOS_WITH_TPETRA - namespace Trilinos - { -# if !DEAL_II_TRILINOS_VERSION_GTE(14, 0, 0) - template - Teuchos::RCP - make_rcp(Args &&...args) - { - return Teuchos::RCP(new T(std::forward(args)...)); - } -# endif // !DEAL_II_TRILINOS_VERSION_GTE(14, 0, 0) - - } // namespace Trilinos -#endif // DEAL_II_TRILINOS_WITH_TPETRA - } // namespace Utilities DEAL_II_NAMESPACE_CLOSE -- 2.39.5