From 2b0343f536f5018e52042e746568181e606b7e90 Mon Sep 17 00:00:00 2001 From: Oliver Sander <oliver.sander@tu-dresden.de> Date: Tue, 31 Jan 2023 17:26:11 +0100 Subject: [PATCH] Fix minor bugs in productmanifold.hh In particular: * Forward declaring ProductManifold in the `impl` namespace is not a good idea. * Add missing headers targetspacetest.cc is extended to test for the first issue. --- dune/gfe/productmanifold.hh | 8 +++++--- test/targetspacetest.cc | 5 +++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dune/gfe/productmanifold.hh b/dune/gfe/productmanifold.hh index 408b11bb..52f2a848 100644 --- a/dune/gfe/productmanifold.hh +++ b/dune/gfe/productmanifold.hh @@ -10,9 +10,14 @@ #include <dune/common/tuplevector.hh> #include <dune/gfe/linearalgebra.hh> +#include <dune/gfe/symmetricmatrix.hh> +#include <dune/gfe/tensor3.hh> namespace Dune::GFE { + template <typename ... TargetSpaces> + class ProductManifold; + namespace Impl { template<typename T, typename ... Ts> @@ -24,9 +29,6 @@ namespace Dune::GFE return T::convexityRadius; } - template <typename TS, typename ... TargetSpaces> - class ProductManifold; - template<class U,typename Tfirst,typename ... TargetSpaces2> struct rebindHelper { diff --git a/test/targetspacetest.cc b/test/targetspacetest.cc index cea7382c..8302b86d 100644 --- a/test/targetspacetest.cc +++ b/test/targetspacetest.cc @@ -370,6 +370,11 @@ void test() } + // Test whether we can rebind to another number type + using FTargetSpace = typename TargetSpace::template rebind<float>::other; + + // Can we construct an object of that rebound type? + FTargetSpace fTargetSpace; } -- GitLab