Skip to content

New pull request for lambda functions#114

Open
diehlpk wants to merge 8 commits into
cplusplus:masterfrom
diehlpk:douglas-35
Open

New pull request for lambda functions#114
diehlpk wants to merge 8 commits into
cplusplus:masterfrom
diehlpk:douglas-35

Conversation

@diehlpk
Copy link
Copy Markdown
Contributor

@diehlpk diehlpk commented Jan 30, 2025

@vulder @jcvw The North America subgroup finished the lambda functions.

Please have a look and make comments.

@diehlpk diehlpk changed the title New oull request for lambda functions New pull request for lambda functions Jan 30, 2025
@diehlpk
Copy link
Copy Markdown
Contributor Author

diehlpk commented Jan 30, 2025

This pull request is a duplicate of #87 since I could not edit the pull request by @rwdougla

@diehlpk
Copy link
Copy Markdown
Contributor Author

diehlpk commented Jan 30, 2025

Co-authored-by: Victor Eijkhout eijkhout@tacc.utexas.edu
Co-authored-by: Daniel Hanson daniel@cppcon.org
Co-authored-by: Robert Douglas rwdougla@gmail.com

@diehlpk
Copy link
Copy Markdown
Contributor Author

diehlpk commented Feb 14, 2025

@vulder I added the assert example again.

@vulder vulder added the Tentatively ready Ready for a final review in SG20 label Sep 18, 2025
@diehlpk
Copy link
Copy Markdown
Contributor Author

diehlpk commented Mar 26, 2026

refs #35

@vulder
Copy link
Copy Markdown
Member

vulder commented Apr 19, 2026

This pull request is a duplicate of #87 since I could not edit the pull request by @rwdougla

Ok, should I close the other one then?

Copy link
Copy Markdown
Member

@vulder vulder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM so far, I put it onto the tentatively ready topics for the next SG20 meeting. However, we should resolve the open issue until then.

#### Points to cover

_This section lists important details for each point._

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are currently no points to cover in this draft. We should probably add at least the core ones to cover the necessary skills that are needed to bring a student to the point where they can fulfill all ASSBATs.

#### Background/Required Knowledge

A student:
_TODO: Add cross-reference to these
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is still an open TODO here.

Comment thread sources/modules/functions/lambdas.md Outdated

A student should be able to:

1. Utilize `std::function` as a means to hold and transfer lambdas
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably not advertise std::function here but the better alternatives of move_only_function and copyable_function.

5. Specify the return type for a lamda function, if not detected by the compiler
5. Use a lambda in a class, capturing and utilizing class data via `this`

#### Caveats
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing std::function here, we should probably put a caveat here that highlights the problematic interaction between lambdas and std::function, where one is by default const and the other is not const correct.

Comment thread sources/modules/functions/lambdas.md Outdated
X x = [c = b](){ if (c) return X(5, 10) else X("a", "b"); }();
```

Todo add caption
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing caption

#### Caveats

#### Points to cover

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The knowledge/content for a few of the ASSBATs is still missing in the points to cover.

diehlpk and others added 2 commits April 30, 2026 09:53
Co-authored-by: Florian Sattler <vuld3r@gmail.com>
Co-authored-by: Florian Sattler <vuld3r@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tentatively ready Ready for a final review in SG20

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants