}
template <>
-const Manifold<2,1> & Triangulation<2, 1>::get_manifold(const types::manifold_id) const {
+const Manifold<2,1> &Triangulation<2, 1>::get_manifold(const types::manifold_id) const
+{
Assert(false, ExcImpossibleInDim(1));
- static FlatManifold<2,1> flat;
- return flat;
+ // We cannot simply create a temporary Manifold<2,1> because it is not
+ // instantiated and would lead to unresolved symbols. Given the fact that
+ // this function should be unreachable anyaway, just dereference a
+ // nullptr:
+ return *static_cast<FlatManifold<2,1>*>(0);
}
template <>
-const Manifold<3,1> & Triangulation<3, 1>::get_manifold(const types::manifold_id) const {
+const Manifold<3,1> &Triangulation<3, 1>::get_manifold(const types::manifold_id) const
+{
Assert(false, ExcImpossibleInDim(1));
- static FlatManifold<3,1> flat;
- return flat;
+ // We cannot simply create a temporary Manifold<2,1> because it is not
+ // instantiated and would lead to unresolved symbols. Given the fact that
+ // this function should be unreachable anyaway, just dereference a
+ // nullptr:
+ return *static_cast<FlatManifold<3,1>*>(0);
}
template <>
-const Manifold<3,2> & Triangulation<3, 2>::get_manifold(const types::manifold_id) const {
+const Manifold<3,2> &Triangulation<3, 2>::get_manifold(const types::manifold_id) const
+{
Assert(false, ExcImpossibleInDim(2));
- static FlatManifold<3,2> flat;
- return flat;
+ // We cannot simply create a temporary Manifold<2,1> because it is not
+ // instantiated and would lead to unresolved symbols. Given the fact that
+ // this function should be unreachable anyaway, just dereference a
+ // nullptr:
+ return *static_cast<FlatManifold<3,2>*>(0);
}
// explicit instantiations