你好
有没有办法在 Visual C++ 中使用匿名方法?
Visual C++ 2010 supports C++0x lambda expressions,(1) which can be used as anonymous functions:
int i = ([](int x) { return 40 + x; })(2); // i = 42
(1) It's more correct to say that Visual C++ 2010 supports one of the draft specifications for C++0x lambda expressions; several relatively minor changes have been made to that draft specification since Visual C++ 2010 was released.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)