【发布时间】:2011-10-21 18:18:38
【问题描述】:
C++0x 是否有(或者 C++0x 在某个时间点将有)构造函数的模板参数推导?在An Overview of the Coming C++ (C++0x) Standard,我看到了以下几行:
std::lock_guard l(m); // at 7:00
std::thread t(f); // at 9:00
这是否意味着委托make_foo 函数模板最终是多余的?
【问题讨论】:
-
哦,等等,我想我将类模板的构造函数与类的构造函数模板混淆了……我认为这仍然是一个有趣的问题。
标签: c++ templates constructor c++11 type-inference