call of overloaded `interpolate` is ambiguous
With the overload for interpolate
introduced in commit fd6f6af2, I get an ambiguous overload error when compiling the poisson-pq2
example. I'm not exactly sure, why this ambiguity occurs, as @oliver.sander made some precautions to prevent exactly this ambiguous overload in commit a6ea82d8.
I'm using GCC 5.2.0 and the exact error message was
[ 75%] Building CXX object examples/CMakeFiles/poisson-pq2.dir/poisson-pq2.cc.o
/home/data/gruber/src/dune-git/dune-functions/examples/poisson-pq2.cc: In instantiation of ‘void boundaryTreatment(const FEBasis&, const Dune::FieldVector<double, typename FEBasis::GridView:: dimension>&, std::vector<char>&) [with FEBasis = Dune::Functions::DefaultGlobalBasis<Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >, 2, Dune::Functions::FlatMultiIndex<long unsigned int>, long unsigned int> >; typename FEBasis::GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >]’:
/home/data/gruber/src/dune-git/dune-functions/examples/poisson-pq2.cc:330:47: required from here
/home/data/gruber/src/dune-git/dune-functions/examples/poisson-pq2.cc:266:14: error: call of overloaded ‘interpolate(const Dune::Functions::DefaultGlobalBasis<Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >, 2, Dune::Functions::FlatMultiIndex<long unsigned int>, long unsigned int> >&, Dune::TypeTree::HybridTreePath<>, std::vector<char>&, boundaryTreatment(const FEBasis&, const Dune::FieldVector<double, typename FEBasis::GridView:: dimension>&, std::vector<char>&) [with FEBasis = Dune::Functions::DefaultGlobalBasis<Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >, 2, Dune::Functions::FlatMultiIndex<long unsigned int>, long unsigned int> >; typename FEBasis::GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >]::<lambda(Coordinate)>)’ is ambiguous
interpolate(feBasis, Dune::TypeTree::hybridTreePath(), dirichletNodes,
^
In file included from /home/data/gruber/src/dune-git/dune-functions/examples/poisson-pq2.cc:22:0:
/home/data/gruber/src/dune-git/dune-functions/dune/functions/functionspacebases/interpolate.hh:342:6: note: candidate: void Dune::Functions::interpolate(const B&, const Dune::TypeTree::HybridTreePath<T ...>&, C&&, const F&) [with B = Dune::Functions::DefaultGlobalBasis<Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >, 2, Dune::Functions::FlatMultiIndex<long unsigned int>, long unsigned int> >; TreeIndices = {}; C = std::vector<char>&; F = boundaryTreatment(const FEBasis&, const Dune::FieldVector<double, typename FEBasis::GridView:: dimension>&, std::vector<char>&) [with FEBasis = Dune::Functions::DefaultGlobalBasis<Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >, 2, Dune::Functions::FlatMultiIndex<long unsigned int>, long unsigned int> >; typename FEBasis::GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >]::<lambda(Coordinate)>]
void interpolate(const B& basis, const TypeTree::HybridTreePath<TreeIndices...>
^
/home/data/gruber/src/dune-git/dune-functions/dune/functions/functionspacebases/interpolate.hh:298:6: note: candidate: void Dune::Functions::interpolate(const B&, C&&, const F&, const BV&) [with B = Dune::Functions::DefaultGlobalBasis<Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >, 2, Dune::Functions::FlatMultiIndex<long unsigned int>, long unsigned int> >; C = Dune::TypeTree::HybridTreePath<>; F = std::vector<char>; BV = boundaryTreatment(const FEBasis&, const Dune::FieldVector<double, typename FEBasis::GridView:: dimension>&, std::vector<char>&) [with FEBasis = Dune::Functions::DefaultGlobalBasis<Dune::Functions::PQkNodeFactory<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >, 2, Dune::Functions::FlatMultiIndex<long unsigned int>, long unsigned int> >; typename FEBasis::GridView = Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::YaspGrid<2> > >]::<lambda(Coordinate)>]
void interpolate(const B& basis, C&& coeff, const F& f, const BV& bitVector)
^
examples/CMakeFiles/poisson-pq2.dir/build.make:62: recipe for target 'examples/CMakeFiles/poisson-pq2.dir/poisson-pq2.cc.o' failed