[dune-functions] More build failures

Christian Engwer christian.engwer at uni-muenster.de
Sat Sep 19 00:12:36 CEST 2015


> > Another point Carsten and I discussed was the annoying fact that
> > the size method of std::array<> isn’t constexpr, so you can’t use this
> > for arrays…
> No Steffen, this is not true. The current solution is working.
> The method is constexpr but not static. So we need a constexpr
> object which introduces the requirement to have a constexpr default
> constructor.

That is exactly the point. The standard explicitly states that size is
not static. Thus we need an object to query the size method.

I see one alternative to avoid the object-generation problem. If we
decide that we only evaluate size iff it is "static constexpr", we
can't use std::array anymore, but we could make all of our containers
work. On the other hand we are using an extractor function anyway, so
we could also specialize for std::array and not rely on the size
method any more, but directly look at the  tempalte arguments.

Christian




More information about the dune-functions mailing list