boostorg / boostorg/gil

Replace apply functions with boost::mp11::mp_with_index

Open
#439 4 comments 0 reactions 0 assignees View on GitHub
cat/enhancement good-first-issue status/need-help
Dominant language
C++
Stars
199
Forks
171
Avg merge
1d 14h
Merged PRs (30d)
10

Description

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:

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.