Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Support for C++14 lambda init-captures for Photon?

+1 for more complete patch.

On Sun, 27 May 2018, 01:02 Nathan Ridge, <zeratul976@xxxxxxxxxxx> wrote:
Hi folks,

We've received a patch submission from Hansruedi Patzen adding support for C++14 lambda init-captures.

Support for this feature is highly-requested by users; our current lack of support causes the entire lambda _expression_ (including all the statements in the body of the lambda) to be covered by a syntax error if the lambda contains an init-capture, which makes for a very poor user experience.

Since our AST API is public, the patch makes two purely additive API changes: a new interface ICPPASTInitCapture, and a new method ICPPNodeFactory.newInitCapture().

What are people's thoughts on merging this patch into Photon? I think it's fairly low-risk; it only touches parser/semantics code, and the changes are fairly isolated.

If we are not comfortable merging this patch into Photon, there is a backup plan available: there is a much smaller patch, courtesy of Avi Kivity, which just gets the parser to accept the most common case, thereby eliminating the syntax error (while not addressing other aspects like name resolution and semantic highlighting). This patch does not make any API changes.

Please let me know what you think, about which patch we should accept for Photon.

cdt-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top