Skip to content
Snippets Groups Projects
Commit 79799c33 authored by Müller, Alexander's avatar Müller, Alexander Committed by Sander, Oliver
Browse files

Fix build failure related to ProductManifold and std::cout

parent 2b0343f5
No related branches found
No related tags found
1 merge request!114Fix build failure related to ProductManifold and std::cout
Pipeline #11432 failed
...@@ -441,8 +441,13 @@ namespace Dune::GFE ...@@ -441,8 +441,13 @@ namespace Dune::GFE
return numTS; return numTS;
} }
template<class... TargetSpaces2> friend std::ostream& operator<<(std::ostream& s, const ProductManifold<TargetSpaces ...>& c)
friend std::ostream& operator<<(std::ostream& s, const ProductManifold<TargetSpaces2 ...>& c); {
Dune::Hybrid::forEach(Dune::Hybrid::integralRange(Dune::index_constant<ProductManifold<TargetSpaces ...>::numTS>()), [&](auto&& i) {
s<<Dune::className<decltype(c[i])>()<<" "<< c[i]<<"\n";
});
return s;
}
private: private:
/** /**
...@@ -479,14 +484,5 @@ namespace Dune::GFE ...@@ -479,14 +484,5 @@ namespace Dune::GFE
std::tuple<TargetSpaces ...> data_; std::tuple<TargetSpaces ...> data_;
}; };
template<typename ... TargetSpaces>
std::ostream& operator<<(std::ostream& s, const ProductManifold<TargetSpaces ...>& c)
{
Dune::Hybrid::forEach(Dune::Hybrid::integralRange(Dune::index_constant<ProductManifold<TargetSpaces ...>::numTS>()), [&](auto&& i) {
s<<Dune::className<decltype(c[i])>()<<" "<< c[i]<<"\n";
});
return s;
}
} }
#endif #endif
...@@ -337,6 +337,22 @@ void testDerivativesOfDistanceSquared(const TargetSpace& a, const TargetSpace& b ...@@ -337,6 +337,22 @@ void testDerivativesOfDistanceSquared(const TargetSpace& a, const TargetSpace& b
} }
// The class ProductManifold had a bug that lead to a build failure
// when using std::cout in the namespace Dune::GFE.
//
// See https://gitlab.mn.tu-dresden.de/osander/dune-gfe/-/merge_requests/114
//
// The following method is here to make sure that this bug does not
// come back.
namespace Dune::GFE
{
void testUsingIOStream()
{
std::cout << "dummy text" << std::endl;
}
}
template <class TargetSpace> template <class TargetSpace>
void test() void test()
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment