clang 3.6 fold expression left/right

时光毁灭记忆、已成空白 提交于 2019-11-30 19:42:06

n4191 was revised by n4295. According to that, an expression of the form (e op ...) is a unary right fold, and that is expanded as: E1 op (... op (EN-1 op EN)), i.e. as a right fold expansion.

This does seem to be the reverse of what n4191 stated in terms of the fold direction. Clang 3.6 implements the n4295 proposal, as shown here.

... - args would be a unary left fold and expand in the direction you want.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!