Skip to content

[linearelasticity] Work around g++-4.9 bugginess when compiling testelasticity.

This avoids compilation errors when compiling testelasticity of the form

/home/joe/Projekte/EXA-DUNE/patches/dune-pdelab/dune/pdelab/localoperator/linearelasticity.hh: In member function ‘void Dune::PDELab::LinearElasticity<T>::jacobian_volume(const EG&, const LFSU&, const X&, const LFSV&, M&) const’:
/home/joe/Projekte/EXA-DUNE/patches/dune-pdelab/dune/pdelab/localoperator/linearelasticity.hh:65:49: error: ‘constexpr std::integral_constant<_Tp, __v>::operator std::integral_constant<_Tp, __v>::value_type() const [with _Tp = long unsigned int; _Tp __v = 0ul; std::integral_constant<_Tp, __v>::value_type = long unsigned int]’ used before its definition
         using LFSU_SUB = TypeTree::Child<LFSU,_0>;
                                                 ^

I believe that these are due to a bug in g++-4.9, since the definition for std::integral_constant's cast operator appears before the offending line in the preprocessing output. A plain 0 instead of _0 seems to work fine here, at least it makes the test compile.

Merge request reports

Loading