[dune-functions] TypeTree now works with dune-functions again

Carsten Gräser graeser at mi.fu-berlin.de
Tue Sep 15 21:08:43 CEST 2015


Am 15.09.2015 um 20:54 schrieb Oliver Sander:
> Hi Steffen,
> thanks for all the work.  Any simplifications to dune-typetree are
> always much appreciated. :-)
>
> Am 15.09.2015 um 17:54 schrieb Steffen Müthing:
>
>>
>> I also really liked Carsten’s idea of having an index_constant that’s a template alias for an
>> integral_constant<std::size_t,…>, so I put that into TypeTree and started to use it extensively. There’s
>> also a standard-compliant reimplementation of the integer_range and index_range functionality in
>> Dune::TypeTree::Std (BTW, it’s *really* bad that we have something not quite correct in Dune::Std).
> Why can't we simply fix that?  We claim that stuff in Dune::Std is
> standard-compliant, so what
> you describe is a simple bug that should be fixed.  We may advertise
> this beforehand to warn
> people about the behavioral changes, but still... isn't this simply a
> bug that needs fixing?
No, we can't fix index_sequence in dune-common, because this
requires C++11, namely template aliases. The standard says,
that index_sequence<i> _is_ an interger_sequence<size_t,i>,
not derived, convertible, or anything else. But this can't
be achieved without template aliases.

>> The pre-made index objects now live in Dune::TypeTree::Indices (I thought the „Static“ was a little redundant).
>> I really like the idea of those constants and would like to see them in dune-common after the release of 2.4.
> Seconded -- then I could use them for MultiTypeBlockVector.
>
> Nitpicking: wouldn't constant_index be a better name than index_constant?
> (I won't even try to enforce 'standard Dune' camelCase with you :-) )
My proposal 'index_constant' tried to stay in line with index_sequence
that also specializes some static index thingy for size_t. But t´since
it's not in the standard using IntergerConstant would also be fine.

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/20150915/546ac035/attachment.sig>


More information about the dune-functions mailing list