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
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
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
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
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
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
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
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