public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/59529] New: fix experimental/string_view end-of-string edge cases
@ 2013-12-16 19:31 bigotp at acm dot org
2014-01-24 20:15 ` [Bug libstdc++/59529] " emsr at gcc dot gnu.org
2014-01-27 10:22 ` paolo.carlini at oracle dot com
0 siblings, 2 replies; 3+ messages in thread
From: bigotp at acm dot org @ 2013-12-16 19:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59529
Bug ID: 59529
Summary: fix experimental/string_view end-of-string edge cases
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: bigotp at acm dot org
Created attachment 31448
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31448&action=edit
Patch and test update
Per http://isocpp.org/files/papers/N3762.html#string.view.ops, for a given
string_view sv:
stringview sv{"text"};
auto rv = sv.substr(sv.size());
rv should be a string view starting at sv.end() with size zero. In the current
implementation this code improperly raises std::out_of_range.
Related to this, basic_string_view constructors with length zero and a valid
str should not be re-mapped to the internal empty string.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/59529] fix experimental/string_view end-of-string edge cases
2013-12-16 19:31 [Bug libstdc++/59529] New: fix experimental/string_view end-of-string edge cases bigotp at acm dot org
@ 2014-01-24 20:15 ` emsr at gcc dot gnu.org
2014-01-27 10:22 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: emsr at gcc dot gnu.org @ 2014-01-24 20:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59529
--- Comment #1 from emsr at gcc dot gnu.org ---
Author: emsr
Date: Fri Jan 24 20:15:00 2014
New Revision: 207060
URL: http://gcc.gnu.org/viewcvs?rev=207060&root=gcc&view=rev
Log:
2014-01-24 Ed Smith-Rowland <3dw4rd@verizon.net>
PR libstdc++/59531
* testsuite/experimental/string_view/operations/copy/char/1.cc: New.
* testsuite/experimental/string_view/operations/copy/wchar_t/1.cc: New.
2014-01-24 Ed Smith-Rowland <3dw4rd@verizon.net>
Peter A. Bigot <pab@pabigot.com>
PR libstdc++/59531
* include/experimental/string_view
(copy(_CharT*, size_type, size_type) const): Correct throw string.
Correct copy start location.
2014-01-24 Ed Smith-Rowland <3dw4rd@verizon.net>
Peter A. Bigot <pab@pabigot.com>
PR libstdc++/59530
* include/experimental/string_view (operator[](size_type) const):
Fix one-off index error in debug check.
* testsuite/experimental/string_view/element_access/char/1.cc: Don't
test basic_string_view at size().
* testsuite/experimental/string_view/element_access/wchar_t/1.cc: Ditto.
2014-01-24 Ed Smith-Rowland <3dw4rd@verizon.net>
Peter A. Bigot <pab@pabigot.com>
PR libstdc++/59529
* include/experimental/string_view
(basic_string_view(const _CharT*, size_type)): Don't care if len == 0.
* testsuite/experimental/string_view/operations/substr/char/1.cc:
Comment out catch of out_of_range; No terminating null
in basic_string_view. Check begin == end.
* testsuite/experimental/string_view/operations/substr/wchar_t/1.cc:
Ditto.
Added:
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/char/
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/char/1.cc
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/wchar_t/
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/copy/wchar_t/1.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/experimental/string_view
trunk/libstdc++-v3/testsuite/experimental/string_view/element_access/char/1.cc
trunk/libstdc++-v3/testsuite/experimental/string_view/element_access/wchar_t/1.cc
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/substr/char/1.cc
trunk/libstdc++-v3/testsuite/experimental/string_view/operations/substr/wchar_t/1.cc
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/59529] fix experimental/string_view end-of-string edge cases
2013-12-16 19:31 [Bug libstdc++/59529] New: fix experimental/string_view end-of-string edge cases bigotp at acm dot org
2014-01-24 20:15 ` [Bug libstdc++/59529] " emsr at gcc dot gnu.org
@ 2014-01-27 10:22 ` paolo.carlini at oracle dot com
1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-27 10:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59529
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |4.9.0
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-27 10:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16 19:31 [Bug libstdc++/59529] New: fix experimental/string_view end-of-string edge cases bigotp at acm dot org
2014-01-24 20:15 ` [Bug libstdc++/59529] " emsr at gcc dot gnu.org
2014-01-27 10:22 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).