Draft
Conversation
- default to enable CPPREST_USE_STRING_VIEWS when compiler supports C++ 17 most string utility and json APIs are changed to support string_views (deprecated APIs left alone) primary argument replacements: const utility::string_t& -> utility::string_view_t const std::string& -> utility::nstring_view_t const std::wstring& -> utility::wstring_view_t const utf16string& -> utf16string_view potential client fallout when enabling option: For clients passing char* to conversion that does not require conversion, string_view will be the result. If string type is actually required then an explicit ctor would need to be added. Otherwise client may be able to use more string_view in own code and futher reduce memory copies. See searchfile.cpp in Samples for example. Use of foo.c_str() and &foo[0] on a potential string_view is now foo.data().
- forced on for VS 2017 - forced off for VS 2015 - default for all others
+ add respect for CMAKE_CXX_STANDARD when set
…nto jason-ha/basic_string_view_support
…nto jason-ha/basic_string_view_support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes are baked though non-Windows pipelines are not validated. This PR exists for easy diff against the win32_narrow_strings baseline.