hybridutilities.hh: `size` method too generic
The size
method in hybridutilities.hh make gcc (7.1.0, in C++17 mode) unhappy as there is also a std::size
function since C++17.
This makes calls to size(...)
ambiguous:
dune-matrix-vector/dune/matrix-vector/algorithm.hh:21:29: error: call of overloaded ‘size(const Dune::MultiTypeBlockVector<Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 2>, std::allocator<Dune::FieldMatrix<double, 1, 2> > >, Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 1>, std::allocator<Dune::FieldMatrix<double, 1, 1> > > >&)’ is ambiguous
forEach(integralRange(size(range)), [&](auto&& i) {
~~~~^~~~~~~
In file included from dune-istl/dune/istl/multitypeblockvector.hh:12:0,
from dune-tnnmg/dune/tnnmg/test/multitypegstest.cc:15:
dune-common/dune/common/hybridutilities.hh:80:16: note: candidate: constexpr auto Dune::Hybrid::size(const T&) [with T = Dune::MultiTypeBlockVector<Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 2>, std::allocator<Dune::FieldMatrix<double, 1, 2> > >, Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 1>, std::allocator<Dune::FieldMatrix<double, 1, 1> > > >]
constexpr auto size(const T& t)
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from dune-tnnmg/dune/tnnmg/test/multitypegstest.cc:6:
/usr/include/c++/7/bits/range_access.h:242:5: note: candidate: constexpr decltype (__cont.size()) std::size(const _Container&) [with _Container = Dune::MultiTypeBlockVector<Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 2>, std::allocator<Dune::FieldMatrix<double, 1, 2> > >, Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 1>, std::allocator<Dune::FieldMatrix<double, 1, 1> > > >; decltype (__cont.size()) = long unsigned int]
size(const _Container& __cont) -> decltype(__cont.size())
^~~~