【发布时间】:2013-04-23 21:29:17
【问题描述】:
今天我查看了Stroustrup's C++11 FAQ(2013 年 4 月 7 日修改)并在 type-alias 部分的末尾看到了这个:
typedef void (*PFD)(double); // C style
using PF = void (*)(double); // using plus C-style type
using P = [](double)->void; // using plus suffix return type
其中 lambda 引入器用于启动使用后缀样式返回类型的通用函数类型表达式。这是官方的,还是放弃的测试版/愿望清单功能?如果它是官方的,它将如何用于非静态成员函数?
【问题讨论】:
标签: c++ c++11 function-prototypes