Skip to content

Strawman for lambdas - #87

Draft
rwdougla wants to merge 2 commits into
cplusplus:masterfrom
rwdougla:Issue35
Draft

Strawman for lambdas#87
rwdougla wants to merge 2 commits into
cplusplus:masterfrom
rwdougla:Issue35

Conversation

@rwdougla

Copy link
Copy Markdown
Contributor

Issue #35

Super rough point for further discussion in NA SG20 small group

@vulder

vulder commented May 12, 2024

Copy link
Copy Markdown
Member

@rwdougla Hi, what's the current status of this draft. Should we take a look at it in the next SG20 meeting or does it need a bit more time cooking?

@diehlpk

diehlpk commented May 17, 2024

Copy link
Copy Markdown
Contributor

@vulder we took a look at today's meeting, and we will add a few more items.

@diehlpk

diehlpk commented Jul 26, 2024

Copy link
Copy Markdown
Contributor

@hkaiser @VictorEijkhout @QuantDevHacks please have a look at this one for our next meeting.

@diehlpk

diehlpk commented Oct 21, 2024

Copy link
Copy Markdown
Contributor

The SG20 North America group will provide a pull request bu end of October.

@diehlpk

diehlpk commented Jan 30, 2025

Copy link
Copy Markdown
Contributor

@rwdougla we made a pass today on the document. We struggled to understand the following code

multiple statements in a single expression

assert([](){
	std::vector v{1, 2, 3, 4, 5};
	for (auto x: v) std::cout << v << std::endl;
}());

Could you please elaborate here why we use the assert here?

@vulder

vulder commented Feb 12, 2025

Copy link
Copy Markdown
Member

@rwdougla we made a pass today on the document. We struggled to understand the following code

multiple statements in a single expression

assert([](){
	std::vector v{1, 2, 3, 4, 5};
	for (auto x: v) std::cout << v << std::endl;
}());

Could you please elaborate here why we use the assert here?

If I interpret this correctly, what @rwdougla wanted to note here (should be covered) is that in a context where only one expression is allowed, one can use an immediately lambda to write multiple statements.

@diehlpk

diehlpk commented Feb 13, 2025

Copy link
Copy Markdown
Contributor

@vulder Ok, I will add it back to my pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants