#998 clang rejects specialisation with non-constant expression
Metadata
Property | Value |
---|---|
Reported by | Elias Pipping (elias.pipping@fu-berlin.de) |
Reported at | Dec 20, 2011 14:05 |
Type | Bug Report |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Last edited at | Apr 6, 2012 15:28 |
Closed by | Christian Engwer (christi@conan.iwr.uni-heidelberg.de) |
Closed at | Apr 6, 2012 15:28 |
Closed in version | Unknown |
Resolution | Fixed |
Comment | patch applied to trunk; Thanks! |
Description
dune/grid/alugrid/common/geostorage.hh defines
static const int aluTriangle = ALU2DSPACE triangle; static const int aluQuad = ALU2DSPACE quadrilateral; static const int aluTetra = ALU3DSPACE tetra; static const int aluHexa = ALU3DSPACE hexa;
and then specialises CreateGeometries w.r.t. that.
Clang is not amused:
error: non-type template argument depends on a template parameter of the partial specialization
I'm attaching a patch that makes the code compile with both g++ (tested with 4.4) and clang: The definitions are inlined (that's not an interface change because aluTriangle etc. were private).