about summary refs log tree commit diff
path: root/absl
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-02-12T18·22-0800
committerShaindel Schwartz <shaindel@google.com>2019-02-13T15·51-0500
commit426eaa4aa44e4580418bee46c1bd13911151bfb1 (patch)
tree39180de4765728259d37759395f6a82e9a4ef58c /absl
parent2901ec32a919311384d6ad4194e2d927c06831f7 (diff)
Export of internal Abseil changes.
--
0c2e865b4611eda0b43e64c177ac34540f059be2 by Mark Barolak <mbar@google.com>:

Fix a sample code snippet that assumes `absl::string_view::const_iterator` is `const char*`.  This is generally true, however in C++17 builds, absl::string_view is an alias for std::string_view and on MSVC, the std::string_view::const_iterator is an object instead of just a pointer.

PiperOrigin-RevId: 233631168

--
16f472f1b94dabf81632d6845574513546c8026e by Abseil Team <absl-team@google.com>:

Updating documentation for custom StrSplit delimiters to reflect
the fact that string_view does not have a (string_view, start, len)
constructor.

PiperOrigin-RevId: 233611745

--
a3192dc5122a9a67e0e4d4d2421b0cdb10612c27 by Eric Fiselier <ericwf@google.com>:

Add missing <cassert> include.

PiperOrigin-RevId: 233523528
GitOrigin-RevId: 0c2e865b4611eda0b43e64c177ac34540f059be2
Change-Id: Ic12e547da3e9c4fe2e79b880f9426fa3cc0f4866
Diffstat (limited to 'absl')
-rw-r--r--absl/container/internal/common.h1
-rw-r--r--absl/strings/str_split.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/absl/container/internal/common.h b/absl/container/internal/common.h
index c7816566533d..aca1a95da81a 100644
--- a/absl/container/internal/common.h
+++ b/absl/container/internal/common.h
@@ -15,6 +15,7 @@
 #ifndef ABSL_CONTAINER_INTERNAL_CONTAINER_H_
 #define ABSL_CONTAINER_INTERNAL_CONTAINER_H_
 
+#include <cassert>
 #include <type_traits>
 
 #include "absl/meta/type_traits.h"
diff --git a/absl/strings/str_split.h b/absl/strings/str_split.h
index c7eb280c4113..485f24354d1a 100644
--- a/absl/strings/str_split.h
+++ b/absl/strings/str_split.h
@@ -96,9 +96,9 @@ namespace absl {
 //     absl::string_view Find(absl::string_view text, size_t pos) {
 //       auto found = text.find(c_, pos);
 //       if (found == absl::string_view::npos)
-//         return absl::string_view(text.end(), 0);
+//         return text.substr(text.size());
 //
-//       return absl::string_view(text, found, 1);
+//       return text.substr(found, 1);
 //     }
 //   };