On Nov 8, 2014, at 9:16 AM, Richard Smith <[email protected]> wrote:
> Hi,
> 
> WG21 is voting on a proposal for "fold-expressions" today. These are 
> syntactically of the form:
> 
>   ( .... + pack )
>   ( pack + ... )
>   ( p0 + ... + pack )
>   ( pack + ... + pn )
> 
> (where + can be any binary operator). These expand to
> 
>   (((p0 + p1) + ...) + pn)
> 
> for the first and third cases and
> 
>   (p0 + (p1 + (... + pn)))
> 
> for the other two cases.

And the expansion for (pack + … + pack) is “semantic error”?

I assume ‘pack’ is any expression containing an unexpanded pack reference?

> These need a mangling; I suggest (and have implemented):
> 
> <expression> ::=
>   fl <binary operator-name> <expression>   # ( ... op pack )
>   fr <binary operator-name> <expression>   # ( pack op ... )
>   fx <binary operator-name> <expression> <expression>   # ( expr op ... op 
> expr )

This doesn’t seem to correspond to one of your examples.

John.
_______________________________________________
cxx-abi-dev mailing list
[email protected]
http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev

Reply via email to