|
Boost : |
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2024-03-01 12:13:03
czw., 29 lut 2024 o 23:30 Christian Mazakas via Boost <boost_at_[hidden]>
napisaÅ(a):
> I'm not entirely sold on the value of Hana's `operator[]` for tuple
> accesses.
>
> Especially because in later C++, we have placeholders so we can always just
> do:
>
> auto const& [first,_,_] = my_tuple;
>
> https://godbolt.org/z/vvnKxjGos
>
> I largely agree with Alan, Hana's a heavyweight dependency for what I think
> is dubious
> benefit. Maybe others feel differently here but I'd prefer to just always
> work with the
> standard tuple and structured bindings than Hana's `operator[]`.
Once/if https://github.com/tzlaine/parser/issues/106 is implemented. The
motivation for using Hana over std::tuple will be reduced practically to
zero.
https://github.com/tzlaine/parser/issues/106 handles the simple cases, and
for more complicated logic, you do not mind calling std::get<>.
Regards,
&rzej;
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk