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

Implement constructor from and conversion to std::string_view. #68

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

Conversation

slackner
Copy link

@slackner slackner commented Dec 8, 2022

This allows to get rid of various unnecessary copies in my code. E.g., data passed as std::string_view can be used to directly construct an UTF-8 string without having to create a temporary std::string. Also, it allows to pass the UTF-8 string directly to various functions that accept a std::string_view.

I've tried to follow the surrounding code style (including the trailing whitespace). Feel free to let me know if aynthing should be changed (or adjust it yourself, you should have permission to push edits).

JonathSpirit added a commit to JonathSpirit/FastEngine that referenced this pull request Sep 17, 2023
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.

None yet

1 participant