-
Notifications
You must be signed in to change notification settings - Fork 362
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
Fix std::string_view support in transforming validators #300
Conversation
Codecov Report
@@ Coverage Diff @@
## master #300 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 12
Lines 2880 2880
=====================================
Hits 2880 2880
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #300 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 12 12
Lines 2880 2886 +6
=====================================
+ Hits 2880 2886 +6
Continue to review full report at Codecov.
|
I'm thinking of moving the The other change is fine, adding a test is fine, and it might be something improved by #285. |
I don't know how to prevent usage of
AFAIK adding forward declarations for STL classes is not allowed by the standard. |
I don't think that's required, but it's good enough for me.
Yes, I believe so, which is why they are fine to put them in inline namespaces...
Okay, this was my mistake, now it looks fine. |
* add some tests with default capture on the two parameter template and some notes about it in the README.md remove the test from visual studio 2015 vs2015 doesn't seem to properly deal with is_assignable in the cases we care about so make a standalone version that is more direct in what we are doing add version to appveyor and add some notes to the readme fix a few test cases to make sure code is covered and test a few other paths remove unneeded enum streaming operator add some diagnostic escapes around trait code to eliminate gcc Wnarrowing warnings work specification of the template operations remove optional add some templates for options conversions add the two parameter template for add_option * Fix some comments from Code review and add more description * fix case when string_view doesn't work to append to a string. * This PR also addressed #300 * modify lexical_cast to take const std::string &, instead of by value to allow string_view in a few cases
Transforming validators convert
const char *
tostd::string
, but don't do the same forstd::string_view
. This causes UB indetails::lexical_cast
that returnsstd::string_view
holding dangling pointer.