diff --git a/src/amdis/utility/TreePath.hpp b/src/amdis/utility/TreePath.hpp index d8e8dcd593d8d673ba0a97ba686aaab6552c31d7..9d29ead4fa48046b9b6652b8a6ec233c24c39df7 100644 --- a/src/amdis/utility/TreePath.hpp +++ b/src/amdis/utility/TreePath.hpp @@ -2,11 +2,13 @@ #include <sstream> #include <string> +#include <type_traits> #include <dune/common/std/apply.hh> #include <dune/typetree/treepath.hh> #include <dune/typetree/typetraits.hh> +#include <amdis/common/Mpl.hpp> namespace AMDiS { @@ -79,9 +81,9 @@ namespace AMDiS #else // DOXYGEN - auto makeTreePath(int i) { return Dune::TypeTree::hybridTreePath(std::size_t(i)); } - auto makeTreePath(std::size_t i) { return Dune::TypeTree::hybridTreePath(i); } - auto makeTreePath(RootTreePath) { return Dune::TypeTree::hybridTreePath(); } + inline auto makeTreePath(int i) { return Dune::TypeTree::hybridTreePath(std::size_t(i)); } + inline auto makeTreePath(std::size_t i) { return Dune::TypeTree::hybridTreePath(i); } + inline auto makeTreePath(RootTreePath) { return Dune::TypeTree::hybridTreePath(); } template <int I> @@ -140,7 +142,7 @@ namespace AMDiS return ss.str(); } - std::string to_string(Dune::TypeTree::HybridTreePath<> const& tp) + inline std::string to_string(Dune::TypeTree::HybridTreePath<> const& tp) { return ""; } @@ -160,7 +162,7 @@ namespace AMDiS return Impl::toArrayImpl(tp, std::make_index_sequence<1+sizeof...(T)>{}); } - std::array<std::size_t,1> to_array(Dune::TypeTree::HybridTreePath<> const& tp) + inline std::array<std::size_t,1> to_array(Dune::TypeTree::HybridTreePath<> const& tp) { return {{0u}}; }