Skip to content
Snippets Groups Projects
Commit 8997acc4 authored by Sander, Oliver's avatar Sander, Oliver
Browse files

Merge branch 'fix-productmanifold-interplay-with-iostream' into 'master'

Fix build failure related to ProductManifold and std::cout

See merge request !114
parents 2b0343f5 79799c33
No related branches found
No related tags found
1 merge request!114Fix build failure related to ProductManifold and std::cout
Pipeline #11433 failed
......@@ -441,8 +441,13 @@ namespace Dune::GFE
return numTS;
}
template<class... TargetSpaces2>
friend std::ostream& operator<<(std::ostream& s, const ProductManifold<TargetSpaces2 ...>& c);
friend 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;
}
private:
/**
......@@ -479,14 +484,5 @@ namespace Dune::GFE
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
......@@ -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>
void test()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment