是否可以将C ++ 0x lambda转换为ang块? [英] Is it possible to convert a C++0x lambda to a clang block?

查看:124
本文介绍了是否可以将C ++ 0x lambda转换为ang块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以将C ++ 0x lambda转换为ang块。到目前为止,我看到的任何事情都涉及到他们的分歧之间的讨论。我查看这个的主要原因是为 libdispatch 创建一个最终的包装,而我非常清楚 dispatch _ * _ f 函数,任何关于它们的使用的信息已经相当缺乏,与它们的块对应物相比。

I've wondered if it is possible to convert a C++0x lambda to a clang block. So far anything I've seen on it has involved the discussion between their differences. My primary reason for looking into this, is to make an eventual wrapper for libdispatch, and while I'm quite aware of dispatch_*_f functions, any information on their use has been quite lacking, in comparison to their block counterpart.

到目前为止,我已经能够找到关于< a href =http://stackoverflow.com/questions/3351280/c0x-lambda-to-function-pointer-in-vs-2010>将C ++ lambda转换为函数指针,但这是更多的

So far I've been able to find information on converting a C++ lambda to a function pointer, but this is more in the realm of the reverse.

如果任何人知道与此有关的任何事情,并可以提供一个链接,或至少指出我的方向正确,我会很感激它。 (甚至这不是当前可能的答案就足够了)

If anyone knows anything related to this, and could provide a link, or at least point me in the right direction, I would really appreciate it. (even a "This is not currently possible" answer will suffice)

推荐答案

隐式启用此转换的补丁刚刚添加到clang

A patch enabling this conversion implicitly was just added to clang trunk.

这篇关于是否可以将C ++ 0x lambda转换为ang块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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