Replace apply functions with boost::mp11::mp_with_index
Offen
cat/enhancement
good-first-issue
status/need-help
- Vorherrschende Sprache
- C++
- Sterne
- 199
- Forks
- 171
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 10
Beschreibung
This is one of golden suggestions from @pdimov which [I received a while ago](https://cpplang.slack.com/archives/C27KZLB0X/p1576519958330700?thread_ts=1576515446.301400&cid=C27KZLB0X
) and which we need to address:
> can't all these apply functions be simplified a lot using mp_with_index? not sure what exactly they do but it looks like it.
>
> ```
> /// \brief Given an Boost.MP11-compatible list and a dynamic index n,
> /// returns the value of the n-th element.
> ```
>
> looks like a one-liner
>
> well, one liner in C++14, unfortunately, will have to be a two-liner here, no polymorphic lambdas :slightly_smiling_face:
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.