Skip to content

Conversation

@Finii
Copy link
Member

@Finii Finii commented Feb 26, 2025

[why]
While RVO is guaranteed and we will get warnings about pessimizations the c++17 new optional NRVO is warned on only on request (except on mcvc).

To get optimal code we of course want to benefit from NRVO optimizations.

[why]
While RVO is guaranteed and we will get warnings about pessimizations
the c++17 new optional NRVO is warned on only on request (except on
mcvc).

To get optimal code we of course want to benefit from NRVO
optimizations.

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
@Finii Finii added the enhancement New feature or request label Feb 26, 2025
Copy link
Collaborator

@soerengrunewald soerengrunewald left a comment

Choose a reason for hiding this comment

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

I would prefer to split the commit into adding the warning to meson and fixing it.
Aside from that 👍

@Finii Finii merged commit c2e1cc6 into main Feb 26, 2025
3 checks passed
@Finii Finii deleted the feature/add-nrvo-warning branch February 26, 2025 10:41
@Finii
Copy link
Member Author

Finii commented Feb 26, 2025

I would prefer to split the commit into adding the warning to meson and fixing it.

I'm not sure if anything will be gained with splitting this already small commit into two tiny commits.
Furthermore, if someone later wants to see when Wnrvo has been added and what it meant, that is not in one commit, but well, two, the changes that are needed for optimal return handling ;-)

Whatever ;)

TNX for review

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants