Feature request: for_each_field multiple visitation
Aperta
- Lingua principale
- C++
- Stelle
- 1.5k
- Fork
- 176
- Merge medio
- 5g 21h
- PR unite (30g)
- 1
Descrizione
Multiple visitation is easy enough to achieve with a library like Boost.Hana (see below), but I think it would be useful functionality for ```for_each_field``` to support directly.
```cpp
template
constexpr auto for_each_field(Invocable f, Aggregates&&... xs) -> void
{
namespace hana = boost::hana;
hana::for_each(hana::zip(boost::pfr::structure_tie(xs)...), hana::fuse(std::move(f)));
}
```
[Example on Compiler Explorer](https://godbolt.org/z/K9Krfh)
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.