From 610c650044a1744b348f59fca5050e394dd68d30 Mon Sep 17 00:00:00 2001 From: Max Kahnt <max.kahnt@fu-berlin.de> Date: Wed, 8 Apr 2015 12:06:00 +0200 Subject: [PATCH] Fix: Inline free function operator>> in NumProc. A non-templated, non-inlined free function may generate a non-weak symbol which causes linker errors due to duplicate symbols when the file is used in more than one compilation unit. Inlining (which is implicit to non-fully specialized templated functions) generates weak linker symbols and hence allows for usage in several compilation units without linking errors. --- dune/solvers/common/numproc.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/dune/solvers/common/numproc.hh b/dune/solvers/common/numproc.hh index 6f0dc06e..8b894db1 100644 --- a/dune/solvers/common/numproc.hh +++ b/dune/solvers/common/numproc.hh @@ -30,6 +30,7 @@ class SolverError : public Dune::Exception {}; }; + inline std::istream& operator>>(std::istream &lhs, NumProc::VerbosityMode &e) { std::string s; -- GitLab