Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn make_rcp() into an inline function. #16278

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 18 additions & 2 deletions include/deal.II/base/trilinos_utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 0 additions & 17 deletions source/base/trilinos_utilities.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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