summaryrefslogtreecommitdiff
path: root/absl/flags
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags')
-rw-r--r--absl/flags/internal/flag.h2
-rw-r--r--absl/flags/marshalling.h9
2 files changed, 2 insertions, 9 deletions
diff --git a/absl/flags/internal/flag.h b/absl/flags/internal/flag.h
index 6402866f..9b32f467 100644
--- a/absl/flags/internal/flag.h
+++ b/absl/flags/internal/flag.h
@@ -56,7 +56,7 @@ class Flag {
// forward declared types.
// auto IsCopyConstructible(const T& v) -> decltype(T(v));
// auto HasAbslParseFlag(absl::string_view in, T* dst, std::string* err)
- // -> decltype(AbslParseFlag(in, dst, GlobalStringADLGuard(err)));
+ // -> decltype(AbslParseFlag(in, dst, err));
// auto HasAbslUnparseFlag(const T& v) -> decltype(AbslUnparseFlag(v));
};
diff --git a/absl/flags/marshalling.h b/absl/flags/marshalling.h
index 669cf452..7eb75cde 100644
--- a/absl/flags/marshalling.h
+++ b/absl/flags/marshalling.h
@@ -185,18 +185,11 @@ bool AbslParseFlag(absl::string_view, double*, std::string*);
bool AbslParseFlag(absl::string_view, std::string*, std::string*);
bool AbslParseFlag(absl::string_view, std::vector<std::string>*, std::string*);
-struct GlobalStringADLGuard {
- explicit GlobalStringADLGuard(std::string* p) : ptr(p) {}
- operator std::string*() { return ptr; } // NOLINT
- std::string* ptr;
-};
-
template <typename T>
bool InvokeParseFlag(absl::string_view input, T* dst, std::string* err) {
// Comment on next line provides a good compiler error message if T
// does not have AbslParseFlag(absl::string_view, T*, std::string*).
- return AbslParseFlag( // Is T missing AbslParseFlag?
- input, dst, GlobalStringADLGuard(err));
+ return AbslParseFlag(input, dst, err); // Is T missing AbslParseFlag?
}
// Strings and std:: containers do not have the same overload resolution