Pythy syntax for C++11

jieforest發表於2012-09-02
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部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-742456/,如需轉載,請註明出處,否則將追究法律責任。

相關文章