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

C++ ingest string views instead of const char* (almost) everywhere #4023

Merged
merged 11 commits into from
Oct 26, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Oct 26, 2023

What

Makes api nicer to use. Trickles down to C api making us technically more flexible!
The only big drawback is that std::string_view((const char*)nullptr) is undefined behavior 🤦

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested demo.rerun.io (if applicable)
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG

@Wumpf Wumpf added 🌊 C++ API C/C++ API specific exclude from changelog PRs with this won't show up in CHANGELOG.md labels Oct 26, 2023
@emilk emilk self-requested a review October 26, 2023 14:14
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

LGTM, except for the obvious bug :)

@Wumpf Wumpf merged commit 67727ef into main Oct 26, 2023
@Wumpf Wumpf deleted the andreas/cpp/string_view branch October 26, 2023 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌊 C++ API C/C++ API specific exclude from changelog PRs with this won't show up in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[c++] Consider taking std::string_view or similar for strings
2 participants