【发布时间】:2018-08-22 15:02:20
【问题描述】:
在 Java 中,您可以执行以下代码:
Function<Integer, Integer> times2 = e -> e * 2;
Function<Integer, Integer> squared = e -> e * e;
times2.andThen(squared).apply(4);
在 C++ 中,andThen() 与硬币/复合新仿函数的等价物是什么?谢谢。
【问题讨论】:
-
没有。您必须找到一个库或自己构建它。
-
这个问题是否满足您的需求? stackoverflow.com/questions/19071268/…
标签: c++