[dune-functions] More build failures

Carsten Gräser graeser at mi.fu-berlin.de
Sat Sep 19 00:21:40 CEST 2015


Am 19.09.2015 um 00:12 schrieb Christian Engwer:
>>> 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.
That's exactly what Steffen and I wanted to do.
Add Dune::Functions:tuple_size and specialize
it for all types we need. I'd propose to supply
those spezializations that are in the standard
(array,tuple,pair) and add the ones from dune
(FieldVector,FlatMultiIndex,???)

Carsten

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-functions/attachments/20150919/708efb6a/attachment.sig>


More information about the dune-functions mailing list