|
Boost : |
Subject: Re: [boost] [TypeSort] Automatic type sorting
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2015-03-21 14:18:25
On 20/03/2015 19:44, Louis Dionne wrote:
> It's essentially the same thing than with MPL/Fusion, except there's a bit
> more syntactic sugar because of C++14 features. Also, this example showcases
> how low the syntactic cost of the MPL/Fusion unification is. The only place
> where we need to bridge between types and values is
>
> using tuple = decltype(
> hana::unpack(sorted_types, hana::template_<hana::_tuple>)
> )::type;
>
> which is (IMO) not too cumbersome.
I find it very clear and nice to read (much nicer than the MPL code),
except for that final tuple_t to _tuple conversion.
I had to read through the documentation to understand this bit, though I
suppose something like a transform with [](auto t) { return
make<typename decltype(t)::type>(); } would have worked too?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk