[PATCH] D21459: Implement http://wg21.link/P0254R1: "Integrating std::string_view and std::string"
Marshall Clow via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 16 21:34:19 PDT 2016
mclow.lists created this revision.
mclow.lists added reviewers: EricWF, howard.hinnant.
mclow.lists added a subscriber: cfe-commits.
This is not ready to be committed. However, it is (I believe) a full implementation of P0254R1, and I'm looking for feedback.
A couple of things to note:
* This is a very large patch, but most of the changes are new tests.
* I've moved a bunch of stuff around, and sunk common stuff in a new header `<__string>`.
* Though `string_view` is a C++17 feature, I've made it available all the way back to C++03. Otherwise, the integration with `<string>` gets really painful.
* Some of the routines taking a`string_view` are marked as inline where the corresponding `string` ones are not, because `string` and `wstring` are explicitly instantiated in the dylib, and if they aren't inline, you'll need a new dylib. Example: `basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);` is not inline, but `basic_string& assign(basic_string_view __sv, size_type pos, size_type n=npos);` is.
http://reviews.llvm.org/D21459
Files:
include/__string
include/iomanip
include/ostream
include/string
include/string_view
test/std/strings/basic.string/string.cons/string_view.fail.cpp
test/std/strings/basic.string/string.cons/string_view.pass.cpp
test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp
test/std/strings/basic.string/string.modifiers/string_append/string_view_size_size.pass.cpp
test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp
test/std/strings/basic.string/string.modifiers/string_assign/string_view_size_size.pass.cpp
test/std/strings/string.view/nothing_to_do.pass.cpp
test/std/strings/string.view/string.view.access/at.pass.cpp
test/std/strings/string.view/string.view.access/back.pass.cpp
test/std/strings/string.view/string.view.access/data.pass.cpp
test/std/strings/string.view/string.view.access/front.pass.cpp
test/std/strings/string.view/string.view.access/index.pass.cpp
test/std/strings/string.view/string.view.capacity/capacity.pass.cpp
test/std/strings/string.view/string.view.comparison/opeq.string_view.pointer.pass.cpp
test/std/strings/string.view/string.view.comparison/opeq.string_view.string.pass.cpp
test/std/strings/string.view/string.view.comparison/opeq.string_view.string_view.pass.cpp
test/std/strings/string.view/string.view.comparison/opge.string_view.pointer.pass.cpp
test/std/strings/string.view/string.view.comparison/opge.string_view.string.pass.cpp
test/std/strings/string.view/string.view.comparison/opge.string_view.string_view.pass.cpp
test/std/strings/string.view/string.view.comparison/opgt.string_view.pointer.pass.cpp
test/std/strings/string.view/string.view.comparison/opgt.string_view.string.pass.cpp
test/std/strings/string.view/string.view.comparison/opgt.string_view.string_view.pass.cpp
test/std/strings/string.view/string.view.comparison/ople.string_view.pointer.pass.cpp
test/std/strings/string.view/string.view.comparison/ople.string_view.string.pass.cpp
test/std/strings/string.view/string.view.comparison/ople.string_view.string_view.pass.cpp
test/std/strings/string.view/string.view.comparison/oplt.string_view.pointer.pass.cpp
test/std/strings/string.view/string.view.comparison/oplt.string_view.string.pass.cpp
test/std/strings/string.view/string.view.comparison/oplt.string_view.string_view.pass.cpp
test/std/strings/string.view/string.view.comparison/opne.string_view.pointer.pass.cpp
test/std/strings/string.view/string.view.comparison/opne.string_view.string.pass.cpp
test/std/strings/string.view/string.view.comparison/opne.string_view.string_view.pass.cpp
test/std/strings/string.view/string.view.cons/default.pass.cpp
test/std/strings/string.view/string.view.cons/from_literal.pass.cpp
test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp
test/std/strings/string.view/string.view.cons/from_string.pass.cpp
test/std/strings/string.view/string.view.cons/from_string1.fail.cpp
test/std/strings/string.view/string.view.cons/from_string2.fail.cpp
test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
test/std/strings/string.view/string.view.hash/string_view.pass.cpp
test/std/strings/string.view/string.view.io/stream_insert.pass.cpp
test/std/strings/string.view/string.view.iterators/begin.pass.cpp
test/std/strings/string.view/string.view.iterators/end.pass.cpp
test/std/strings/string.view/string.view.iterators/rbegin.pass.cpp
test/std/strings/string.view/string.view.iterators/rend.pass.cpp
test/std/strings/string.view/string.view.modifiers/clear.pass.cpp
test/std/strings/string.view/string.view.modifiers/remove_prefix.pass.cpp
test/std/strings/string.view/string.view.modifiers/remove_suffix.pass.cpp
test/std/strings/string.view/string.view.modifiers/swap.pass.cpp
test/std/strings/string.view/string.view.nonmem/quoted.pass.cpp
test/std/strings/string.view/string.view.ops/compare.pointer.pass.cpp
test/std/strings/string.view/string.view.ops/compare.pointer_size.pass.cpp
test/std/strings/string.view/string.view.ops/compare.size_size_sv.pass.cpp
test/std/strings/string.view/string.view.ops/compare.size_size_sv_pointer_size.pass.cpp
test/std/strings/string.view/string.view.ops/compare.size_size_sv_size_size.pass.cpp
test/std/strings/string.view/string.view.ops/compare.sv.pass.cpp
test/std/strings/string.view/string.view.ops/copy.pass.cpp
test/std/strings/string.view/string.view.ops/substr.pass.cpp
test/std/strings/string.view/string.view.synop/nothing_to_do.pass.cpp
test/std/strings/string.view/string.view.template/nothing_to_do.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21459.61063.patch
Type: text/x-patch
Size: 884816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160617/24747b9a/attachment-0001.bin>
More information about the cfe-commits
mailing list