From: Sebastian Kinnewig Date: Sun, 19 Nov 2023 11:26:15 +0000 (+0100) Subject: Turn make_rcp() into an inline function. X-Git-Tag: relicensing~290^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16278%2Fhead;p=dealii.git Turn make_rcp() into an inline function. --- 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