[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-12-04 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists closed this revision. mclow.lists added a comment. Committed as revision 319687 https://reviews.llvm.org/D40586 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/string_view:577 + bool starts_with(basic_string_view __s) const _NOEXCEPT + { return size() >= __s.size() && compare(0, __s.size(), __s) == 0; } + rsmith wrote: > mclow.lists wrote: > > rsmith wro

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/string_view:577 + bool starts_with(basic_string_view __s) const _NOEXCEPT + { return size() >= __s.size() && compare(0, __s.size(), __s) == 0; } + mclow.lists wrote: > rsmith wrote: > > Is this a confo

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists updated this revision to Diff 124677. mclow.lists added a comment. Wrapped the `string_view` bits in #ifdef for C++2a. De-tabbed. https://reviews.llvm.org/D40586 Files: include/string include/string_view test/std/strings/basic.string/string.ends_with/ends_with.char.pass.cpp

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added inline comments. Comment at: include/string:309 + bool ends_with(charT c) const noexcept; + bool ends_with(const charT* s) const; + rsmith wrote: > The indentation here seems off. Should these have a `// C++2a` comment? I may have le

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/string:309 + bool ends_with(charT c) const noexcept; + bool ends_with(const charT* s) const; + The indentation here seems off. Should these have a `// C++2a` comment? Comment at: inc

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. Sorry for the extra bits. Comment at: include/string:1365 static _LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __s) _NOEXCEPT +{ This is a leftover change. Disregard this bit. Comment

[PATCH] D40586: Implement p0457r2 - String Prefix and Suffix Checking

2017-11-28 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists created this revision. This adds six calls each to `basic_string` and `basic_string_view`: - starts_with (3 variants) - ends_with (3 variants) This is a C++2a feature https://reviews.llvm.org/D40586 Files: include/string include/string_view test/std/strings/basic.string/stri