-
Notifications
You must be signed in to change notification settings - Fork 277
introduce dstringt::starts_with #5488
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
Conversation
kroening
commented
Sep 4, 2020
- Each commit message has a non-empty body, explaining why the change was made.
- Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
- n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
- Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
- n/a My commit message includes data points confirming performance improvements (if claimed).
- My PR is restricted to a single feature or bugfix.
- n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a weird build failure on Travis, on osx, but aside from that, this is good stuff!
I very much like the readability of this compared to has_prefix
. Does it mean that has_prefix
is now deprecated? If yes, should it be marked so?
Does that mean we no longer care about being able to swap in |
I would believe we maintain full compatibility: with this patch, @kroening I'd +1 the suggestion to deprecate |
We can either wait for C++20 (which adds |
5788edf
to
e5d77fd
Compare
Codecov Report
@@ Coverage Diff @@
## develop #5488 +/- ##
===========================================
- Coverage 77.88% 68.53% -9.35%
===========================================
Files 1569 1187 -382
Lines 180894 98262 -82632
===========================================
- Hits 140882 67340 -73542
+ Misses 40012 30922 -9090
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
This prepares for the transition to C++20, which adds std::string::starts_with(...). This will allow us to drop has_prefix(s, t).
e5d77fd
to
f44cac4
Compare
I've dropped the second commit until we do C++20. The first commit is useful in preparation. |