]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Turn make_rcp() into an inline function. 16278/head
authorSebastian Kinnewig <sebastian@kinnewig.org>
Sun, 19 Nov 2023 11:26:15 +0000 (12:26 +0100)
committerSebastian Kinnewig <sebastian@kinnewig.org>
Sun, 19 Nov 2023 11:42:32 +0000 (12:42 +0100)
include/deal.II/base/trilinos_utilities.h
source/base/trilinos_utilities.cc

index bb3e1e5958adebd4607c0f7da4fbe23bc0d24081..6e6ffcb19a280524fcd4706b79bf077891e40df0 100644 (file)
@@ -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 <class T, class... Args>
+      inline Teuchos::RCP<T>
+      make_rcp(Args &&...args)
+      {
+        return Teuchos::RCP<T>(new T(std::forward<Args>(args)...));
+      }
+#  endif // !DEAL_II_TRILINOS_VERSION_GTE(14, 0, 0)
+    }    // namespace internal
+
+  }    // namespace Trilinos
+#endif // DEAL_II_TRILINOS_WITH_TPETRA
 
 } // namespace Utilities
 
index 9fb095e3454fe6ddcaae25c2aab7c7ce078c5785..e9f2b105e5a3bb32f4b6f0de92a390b54ccfbe8b 100644 (file)
@@ -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 <class T, class... Args>
-    Teuchos::RCP<T>
-    make_rcp(Args &&...args)
-    {
-      return Teuchos::RCP<T>(new T(std::forward<Args>(args)...));
-    }
-#  endif // !DEAL_II_TRILINOS_VERSION_GTE(14, 0, 0)
-
-  }    // namespace Trilinos
-#endif // DEAL_II_TRILINOS_WITH_TPETRA
-
 } // namespace Utilities
 
 DEAL_II_NAMESPACE_CLOSE

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.