about summary refs log tree commit diff
path: root/absl/flags/parse.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-12-18T19·46-0800
committerCJ Johnson <johnsoncj@google.com>2019-12-18T20·38-0500
commit29235139149790f5afc430c11cec8f1eb1677607 (patch)
treea83dfbf7b31ea89bcc562322ca730ce9a2dee5ad /absl/flags/parse.cc
parentbf86cfe165ef7d70dfe68f0b8fc0c018bc79a577 (diff)
Export of internal Abseil changes
--
a7e789be4687681b98060fddbf8bd1c64a8f5908 by Abseil Team <absl-team@google.com>:

Support C++20 erase_if API in btree.

See the reference here: https://en.cppreference.com/w/cpp/container/set/erase_if.

PiperOrigin-RevId: 286235196

--
952dd2fdd8435dd293e2186c97e14ef3f29a1aa6 by Derek Mauro <dmauro@google.com>:

Avoids accessing an out-of-bounds value during flag parsing

PiperOrigin-RevId: 286206167

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

Change null term* (and nul term*) to NUL-term* in comments.

PiperOrigin-RevId: 286066376

--
d770baecf36f3d7a8214ca2033d90696ba353d00 by Andy Soffer <asoffer@google.com>:

cmake: Fix x86_64 check on Windows for random copts

Import of https://github.com/abseil/abseil-cpp/pull/518

PiperOrigin-RevId: 286056395

--
9ed007e284ecf6ec79547437dbed9ce3023204b9 by Greg Falcon <gfalcon@google.com>:

Manual re-import of CCTZ from GitHub.  filegroup() moved as a side effect of an internal change.

PiperOrigin-RevId: 286015866

--
25441cc5cb7ee906177f8dac0dcd524df0e6e305 by Derek Mauro <dmauro@google.com>:

Fix implicit cycle in debugging build rules due to .inc files

PiperOrigin-RevId: 285873346
GitOrigin-RevId: a7e789be4687681b98060fddbf8bd1c64a8f5908
Change-Id: Idef8cce4e723fccae6bdd749e94e11e655908214
Diffstat (limited to 'absl/flags/parse.cc')
-rw-r--r--absl/flags/parse.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/flags/parse.cc b/absl/flags/parse.cc
index 5a56a35625df..2f07725f5614 100644
--- a/absl/flags/parse.cc
+++ b/absl/flags/parse.cc
@@ -525,7 +525,7 @@ std::tuple<bool, absl::string_view> DeduceFlagValue(const CommandLineFlag& flag,
     // --my_string_var --foo=bar
     // We look for a flag of std::string type, whose value begins with a
     // dash and corresponds to known flag or standalone --.
-    if (value[0] == '-' && flag.IsOfType<std::string>()) {
+    if (!value.empty() && value[0] == '-' && flag.IsOfType<std::string>()) {
       auto maybe_flag_name = std::get<0>(SplitNameAndValue(value.substr(1)));
 
       if (maybe_flag_name.empty() ||