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

[Testing] Testing what is needed to switch from absl to std string_view. #2139

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hzeller
Copy link
Collaborator

@hzeller hzeller commented Mar 10, 2024

This will only show up on Windows that has a different implementation of std::string_view::iterator, hence push to see in CI

@hzeller hzeller force-pushed the feature-20240310-string-view-test branch from f6a4df2 to ae0e6aa Compare March 10, 2024 21:10
@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 99.69970% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 92.77%. Comparing base (01e332e) to head (16c6d55).
Report is 2 commits behind head on master.

Files Patch % Lines
common/parser/parser_param.h 0.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2139      +/-   ##
==========================================
- Coverage   92.92%   92.77%   -0.15%     
==========================================
  Files         359      359              
  Lines       26673    26716      +43     
==========================================
  Hits        24787    24787              
- Misses       1886     1929      +43     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This will only show up on Windows that has a different implementation
of std::string_view::iterator, hence push to see in CI
@hzeller hzeller force-pushed the feature-20240310-string-view-test branch from ae0e6aa to 5492273 Compare March 10, 2024 21:57
Often we construct a string_view with iterator and length.
There is no such constructor for std::string_view that takes an start
iterator and a length. It happens to work in Linux libc++ and absl,
because the string_view iterator is just a const char* (and there is
a constructor std::string_view(const char*, size_t).

Replace all the places that make this assumption and replace with
an existing constructor call.

Also change other places with typename iterator == const char *.
@hzeller hzeller force-pushed the feature-20240310-string-view-test branch from 94bd394 to 16c6d55 Compare March 11, 2024 00:11
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

2 participants