Skip to content

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

Merged
Wumpf merged 11 commits intomainfrom
andreas/cpp/string_view
Oct 26, 2023
Merged

C++ ingest string views instead of const char* (almost) everywhere#4023
Wumpf merged 11 commits intomainfrom
andreas/cpp/string_view

Conversation

@Wumpf
Copy link
Copy Markdown
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 sdk-cpp 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
Copy Markdown
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

exclude from changelog PRs with this won't show up in CHANGELOG.md sdk-cpp C/C++ API specific

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