我见过two https://stackoverflow.com/questions/4008369 recent answers https://stackoverflow.com/questions/4009530 using _1
作为纯 C++0x 解决方案(没有明确提及 boost lambda)。
有没有这样一种动物std::_1
我认为拥有本机 lambda 将使这样的构造变得多余。
谷歌代码搜索std::_1
brings 来自同一个项目,所以这是不确定的。
是的,它们是 C++0x 的一部分std::placeholders
命名空间,来自最新草案 (n3126) §20.8.10.1.3“占位符”:
namespace std {
namespace placeholders {
// M is the implementation-defined number of placeholders
extern unspecified _1;
extern unspecified _2;
.
.
.
extern unspecified _M;
}
}
他们实际上是包含在 TR1 中 http://en.wikipedia.org/wiki/C%2B%2B_Technical_Report_1#Function_object_binders (n1836 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf§3.6.4;n1455 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2003/n1455.htm) 随着bind
,它们取自Boost.Bind 库 http://www.boost.org/doc/libs/1_44_0/libs/bind/bind.html.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)