Skip to content

Properly constrain detail::copy optimization #4474

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

localspook
Copy link
Contributor

Resolves #4470.

See linked issue for a description of the problem. This PR constrains detail::copy to only use insert when the underlying container provides it.

Copy link
Contributor

@vitaut vitaut left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. I suggest merging has_back_insert_iterator_container_append and has_back_insert_iterator_container_insert_at_end into a single trait, something like has_compatible_container that checks the required container properties.

@localspook
Copy link
Contributor Author

Could you elaborate? We have one copy overload that does .append(), one that does .insert(), and one that uses the iterator normally, and I don't see how I could express all of those with just one trait.

@vitaut
Copy link
Contributor

vitaut commented Jun 20, 2025

Ah, you are right. We do need separate traits.

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.

Bustache does not compile anymore with v11
2 participants