Skip to content

intel compiler + multitypeblockmatrix

When compiling dune-istl with intel 17.0.2 compiler, an error is thrown in multitypeblockmatrix::umv and others, due to a problem with name-lookup:

template<typename X, typename Y>
void umv (const X& x, Y& y) const {
  static_assert(X::size() == M(), "length of x does not match row length");
  static_assert(Y::size() == N(), "length of y does not match row count");
  using namespace Dune::Hybrid;
  forEach(integralRange(Hybrid::size(y)), [&](auto&& i) {
    forEach(integralRange(Hybrid::size(x)), [&](auto&& j) {
      (*this)[i][j].umv(x[j], y[i]);
    });
  });
}

Here, the outer forEach and integralRange are found, due to using namespace Dune::Hybrid, but inside the lambda these functions are not found anymore. The using namespace seems not to be visible inside the lambda. Possible solutions:

  1. Add Hybrid:: in front of all calls to forEach and integralRange
  2. Add using namespace Dune::Hybrid inside the lambda function, as well.

I'm not sure what should be the correct behavior of the compiler and whether this is a "bug" in intel compiler or not.

Same problem in mmv, usmv and maybe operator<<.