[Dune] dune-functions does not compile with clang anymore

Simon Praetorius simon.praetorius at tu-dresden.de
Fri Apr 29 10:15:57 CEST 2016


Hello again,

the dune-functions module (in combination with the latest dune-common 
and dune-typetree), I mean the corresponding examples, compiles fine 
with gcc-5.3, but not with clang-3.8.0 (the error-message is appended)

I tried to identify the error myself, but actually I failed. I know that 
it compiled fine at around March 10th, so changes since then must be the 
source of the error. And the only meaningful changes in the files 
involved are related to a switch from

Std::integer_sequence to std::integer_sequence

i.e. replace the c++14 backport with the std library implementation. But 
maybe some other changes are involved.


Simon


Error-message:
------------------------
In file included from 
/opt/sources/dune/dune-functions/examples/stokes-taylorhood.cc:21:
In file included from 
/opt/sources/dune/dune-functions/dune/functions/functionspacebases/interpolate.hh:12:
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:95:33: 
error: no matching function for call to 'child'
           using type = 
decltype(child(std::declval<Node>().child(0),std::declval<J>()...));
                                 ^~~~~
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:112:20: 
note: in instantiation of template class 
'Dune::TypeTree::impl::_lazy_dynamic_decltype<Dune::Functions::PowerBasisNode<unsigned 
long,
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0> 
 >, 
Dune::Functions::PQkNode<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> > > >, 2, unsigned
       long, 
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0>, 
unsigned long> >, 2> >::evaluate<std::integer_sequence<unsigned long> >' 
requested here
           >::type::template evaluate<J...>::type
                    ^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:220:72: 
note: while substituting deduced template arguments into function 
template 'child' [with Node = Dune::Functions::PowerBasisNode<unsigned long,
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0> 
 >, 
Dune::Functions::PQkNode<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> > > >, 2, unsigned
       long, 
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0>, 
unsigned long> >, 2>, J = <std::integer_sequence<unsigned long>>]
     auto child(Node&& node, HybridTreePath<Indices...> tp) -> 
decltype(impl::child(std::forward<Node>(node),tp,tp.enumerate()))
^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:259:51: 
note: while substituting deduced template arguments into function 
template 'child' [with Node = Dune::Functions::PowerBasisNode<unsigned long,
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0> 
 >, 
Dune::Functions::PQkNode<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> > > >, 2, unsigned
       long, 
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0>, 
unsigned long> >, 2>, Indices = <>]
         using type = typename 
std::decay<decltype(child(std::declval<Node>(),std::declval<TreePath>()))>::type;
                                                   ^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:276:5: 
note: in instantiation of template class 
'Dune::TypeTree::impl::_ChildForTreePath<Dune::Functions::PowerBasisNode<unsigned 
long,
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0> 
 >, 
Dune::Functions::PQkNode<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2, Dune::EquidistantCoordinates<double, 2> > > >, 2, unsigned
       long, 
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0>, 
unsigned long> >, 2>, Dune::TypeTree::HybridTreePath<> >' requested here
     using ChildForTreePath = typename 
impl::_ChildForTreePath<Node,TreePath>::type;
     ^
/opt/sources/dune/dune-functions/dune/functions/gridfunctions/discreteglobalbasisfunction.hh:354:58: 
note: in instantiation of template type alias 'ChildForTreePath' 
requested here
   using NTREM = DefaultNodeToRangeMap<typename 
TypeTree::ChildForTreePath<typename Basis::LocalView::Tree, TP>>;
                                                          ^
/opt/sources/dune/dune-functions/dune/functions/gridfunctions/discreteglobalbasisfunction.hh:366:10: 
note: in instantiation of function template specialization 
'Dune::Functions::makeDiscreteGlobalBasisFunction<Dune::FieldVector<double,
       2>, 
Dune::Functions::SubspaceBasis<Dune::Functions::DefaultGlobalBasis<Dune::Functions::CompositeNodeFactory<Dune::ReservedVector<unsigned 
long, 2>, Dune::Functions::BasisBuilder::BlockedLexicographic,
Dune::Functions::PowerNodeFactory<Dune::ReservedVector<unsigned long, 
2>, Dune::Functions::BasisBuilder::FlatInterleaved, 
Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2,
       Dune::EquidistantCoordinates<double, 2> > > >, 2, 
Dune::ReservedVector<unsigned long, 2>, unsigned long>, 2>, 
Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2,
       Dune::EquidistantCoordinates<double, 2> > > >, 1, 
Dune::ReservedVector<unsigned long, 2>, unsigned long> > >, 
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0> 
 > >, Dune::TypeTree::HybridTreePath<>,
Dune::Functions::HierarchicVectorWrapper<Dune::BlockVector<Dune::BlockVector<Dune::FieldVector<double, 
1>, std::allocator<Dune::FieldVector<double, 1> > >, 
std::allocator<Dune::BlockVector<Dune::FieldVector<double, 1>,
       std::allocator<Dune::FieldVector<double, 1> > > > >, double> >' 
requested here
   return makeDiscreteGlobalBasisFunction<R>(std::forward<B>(basis), 
TypeTree::hybridTreePath(), std::forward<V>(vector));
          ^
/opt/sources/dune/dune-functions/examples/stokes-taylorhood.cc:420:38: 
note: in instantiation of function template specialization 
'Dune::Functions::makeDiscreteGlobalBasisFunction<Dune::FieldVector<double, 
2>,
Dune::Functions::SubspaceBasis<Dune::Functions::DefaultGlobalBasis<Dune::Functions::CompositeNodeFactory<Dune::ReservedVector<unsigned 
long, 2>, Dune::Functions::BasisBuilder::BlockedLexicographic,
Dune::Functions::PowerNodeFactory<Dune::ReservedVector<unsigned long, 
2>, Dune::Functions::BasisBuilder::FlatInterleaved, 
Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2,
       Dune::EquidistantCoordinates<double, 2> > > >, 2, 
Dune::ReservedVector<unsigned long, 2>, unsigned long>, 2>, 
Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2,
       Dune::EquidistantCoordinates<double, 2> > > >, 1, 
Dune::ReservedVector<unsigned long, 2>, unsigned long> > >, 
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0> > >,
Dune::Functions::HierarchicVectorWrapper<Dune::BlockVector<Dune::BlockVector<Dune::FieldVector<double, 
1>, std::allocator<Dune::FieldVector<double, 1> > >, 
std::allocator<Dune::BlockVector<Dune::FieldVector<double, 1>,
       std::allocator<Dune::FieldVector<double, 1> > > > >, double> >' 
requested here
   auto velocityFunction = 
Functions::makeDiscreteGlobalBasisFunction<VelocityRange>(Functions::subspaceBasis(taylorHoodBasis, 
_0),
                                      ^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:59:22: 
note: candidate template ignored: could not match 'integral_constant' 
against 'integer_sequence'
       decltype(auto) child(Node&& node, index_constant<i>, J... j)
                      ^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:71:12: 
note: candidate template ignored: could not match 'integral_constant' 
against 'integer_sequence'
       void child(Node&& node, index_constant<i>, J... j)
            ^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:185:10: 
note: candidate template ignored: could not match 'TreePath' against 
'integer_sequence'
     auto child(Node&& node, TreePath<Indices...>) -> 
decltype(child(std::forward<Node>(node),index_constant<Indices>()...))
          ^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:220:10: 
note: candidate template ignored: could not match 'HybridTreePath' 
against 'integer_sequence'
     auto child(Node&& node, HybridTreePath<Indices...> tp) -> 
decltype(impl::child(std::forward<Node>(node),tp,tp.enumerate()))
          ^
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:155:10: 
note: candidate template ignored: substitution failure [with Node = 
Dune::Functions::PQkNode<Dune::GridView<Dune::DefaultLeafGridViewTraits<const 
Dune::YaspGrid<2,
       Dune::EquidistantCoordinates<double, 2> > > >, 2, unsigned long, 
Dune::TypeTree::HybridTreePath<std::integral_constant<unsigned long, 0>, 
unsigned long> > &, Indices = <std::integer_sequence<unsigned long>>]: 
no matching function
       for call to 'child'
     auto child(Node&& node, Indices... indices) -> 
decltype(impl::child(std::forward<Node>(node),indices...))
          ^                                                  ~~~~
/opt/sources/dune/dune-typetree/dune/typetree/childextraction.hh:35:12: 
note: candidate function template not viable: requires single argument 
'node', but 2 arguments were provided
       auto child(Node&& node) -> decltype(std::forward<Node>(node))




More information about the Dune mailing list