Subject: Re: [boost] Yap's formal review is starting now!
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2018-02-16 01:35:56
On 02/15/2018 03:58 PM, Peter Dimov via Boost wrote:
> Zach Laine wrote:
>> > Either way, that's up to the user, isn't it? If he wants to use >
>> std::tuple and index with `get(expr, mp_int<0>())` or `get_c<0>(expr)`
>> > instead of `get(expr, 0_c)`, let him.
>> It could be, but that would be a much more complicated interface.Â As
>> it is, the user need only specify an expression kind non-type template
>> parameter and a Hana tuple to create a model of Expression.
> The interface is not more complicated at all. The user just puts an
> std::tuple where he'd have put the hana::tuple. The implementation is
> more complicated. :-)
I know the reflex around here is to make everything
as generic as possible, but does generalizing the
tuple type actually buy you anything? The tuple type
can't have different behavior in any meaningful way.
The tuple is stored by value inside the the Expression
object, so even if you have an external tuple of the same
type, you still need to make a copy. The definition of the
Expression concept doesn't allow non-intrusive adaptation.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk