ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Pythy syntax for C++11

Pythy syntax for C++11

原创 Linux操作系统 作者:jieforest 时间:2012-09-02 07:54:53 0 删除 编辑
Project maintained by pfultz2Hosted on GitHub Pages — Theme by mattgraham

Pythy
Having it all now: Pythy syntax for C++11.

Overview
In a blog post, David Abrahams discussed an improved function syntax based around polymorphic lambdas:

CODE:

[]min(x, y)
{ return x < y ? x : y; }The pythy library implements this in C++11 using a macro like this:

CODE:

PYTHY(min, x, y)
( return x < y ? x : y; )

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/301743/viewspace-742456/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-04-23

  • 博文量
    441
  • 访问量
    602353