apply - what is the utility of apply?
未关闭
bug
document
question
- 主要语言
- C++
- 星标
- 509
- 派生
- 94
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。