Skip to content

#651 Declaration of hasHierarchicIndexSet for GeometryGrid

Metadata

Property Value
Reported by Oliver Sander (oliver.sander@tu-dresden.de)
Reported at Nov 5, 2009 14:58
Type Bug Report
Version Git (pre2.4) [autotools]
Operating System Unspecified / All
Last edited by Oliver Sander (oliver.sander@tu-dresden.de)
Last edited at Nov 6, 2009 00:51
Closed by Oliver Sander (oliver.sander@tu-dresden.de)
Closed at Nov 6, 2009 00:51
Closed in version Unknown
Resolution Deferred
Comment Documented in dune-grid revision 5902.

Description

While playing around with GeometryGrid I found out that code will only compile if I declare

namespace Dune {

namespace Capabilities {

template< class Grid >
struct hasHierarchicIndexSet
{
  static const bool v = false;
};

template< class Grid >
struct hasHierarchicIndexSet< const Grid >
{
  static const bool v = hasHierarchicIndexSet< Grid >::v;
};

}

}

early enough. In fact, this piece of code can also be found in the GeometryGrid unit test. If it is left out, the compiler objects:

/export/local-1/daten/users/sander/dune/dune-grid/dune/grid/geometrygrid/grid.hh: In instantiation of ‘Dune::GeometryGrid<Dune::SGrid<2, 2, double>, DeformationFunction>’: dune_semilagrangian.cc:74: instantiated from here /export/local-1/daten/users/sander/dune/dune-grid/dune/grid/geometrygrid/grid.hh:280: error: incomplete type ‘Dune::Capabilities::hasHierarchicIndexSet<Dune::SGrid<2, 2, double> >’ used in nested name specifier

Is this a bug or a feature? If it is a feature, could this please be documented somewhere? I would never have guessed the magic code snippet if I hadn't found in the unit test.

A full test case is attached.

Attachments