Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trivial return types of generated get methods should be by value instead of const reference #518

Closed
tmadlener opened this issue Nov 24, 2023 · 0 comments · Fixed by #519
Closed

Comments

@tmadlener
Copy link
Collaborator

Currently all return types of the generated get methods for the user facing handles return by const&:

/// Access the {{ member.docstring }}
const {{ member.full_type }}& {{ member.getter_name(get_syntax) }}() const;

This can have negative performance implications and it might lead to subtle differences with ExtraCode where the value might be returned by value. Mixing podio generated get functions and others that return by value can be very hard in generic code this way.

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

Successfully merging a pull request may close this issue.

1 participant