我们有C ++的闭包吗? [英] Do we have closures in C++?

查看:143
本文介绍了我们有C ++的闭包吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在网上阅读关于closures。我想知道C ++是否具有用于闭包的内置设施,或者有任何方法可以在C ++中实现闭包。

I was reading about closures on net. I was wondering if C++ have in-build facility for closures or there is any way by which we can implement closures in C++ ?

推荐答案

最新的C ++标准, C ++ 11 ,有闭包。

The latest C++ standard, C++11, has closures.

http://en.wikipedia.org / wiki / C%2B%2B11#Lambda_functions_and_expressions

http://www.cprogramming.com/c++11/c++11-lambda-closures.html

这篇关于我们有C ++的闭包吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆