Commit d24d597a authored by Raul Tambre's avatar Raul Tambre Committed by Commit Bot

string_util: Disambiguate base::empty()

../../base/strings/string_util.cc(930,7): error: call to 'empty' is ambiguous
  if (empty(parts))
      ^~~~~
../../base/strings/string_util.cc(959,10): note: in instantiation of function template specialization 'base::JoinStringT<std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >, std::__1::basic_string<char> >' requested here
  return JoinStringT(parts, separator);
         ^
C:\Google\chromium\src\out\release\..\..\buildtools\third_party\libc++\trunk\include\iterator(1899,16): note: candidate function [with _Cont = std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >]
constexpr auto empty(const _Cont& __c)
               ^
../..\base/stl_util.h(102,16): note: candidate function [with Container = std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >]
constexpr auto empty(const Container& c) -> decltype(c.empty()) {
               ^

Bug: 752720
Change-Id: I4382b78e772743976cd0bd3682f81c64788c9bb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089762
Auto-Submit: Raul Tambre <raul@tambre.ee>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747492}
parent a75d9361
......@@ -927,7 +927,7 @@ char16* WriteInto(string16* str, size_t length_with_null) {
template <typename list_type, typename string_type>
static string_type JoinStringT(const list_type& parts,
BasicStringPiece<string_type> sep) {
if (empty(parts))
if (base::empty(parts))
return string_type();
// Pre-allocate the eventual size of the string. Start with the size of all of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment