apply - what is the utility of apply?
Open
bug
document
question
- Dominant language
- C++
- Stars
- 509
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
Oh, I believe I have found why I don't understand. The template parameters TS are not part of the function apply
This
```
template
constexpr auto apply(F&& f, Ts&&... xs);
```
should be
```
template
constexpr auto apply(F&& f);
```
The semantics given us
```
assert(apply(f)(xs...) == f(xs...));
```
But the usage is incompatible
```
assert(fit::apply(sum_f(), 1, 2) == 3);
```
that I believe should be
``` c££
assert(fit::apply(sum_f())(1, 2) == 3);
```
Unfortunately the implementation is not inline at all.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.