aboutsummaryrefslogtreecommitdiff
path: root/absl/flags/commandlineflag.cc
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2020-05-20 00:23:37 -0700
committerMark Barolak <mbar@google.com>2020-05-21 10:16:55 -0400
commitcf1a02e2dc5a1bc9d095f4c996306de448ca200f (patch)
tree74cd530ed421fb27a8774a5a11243bd81682ee18 /absl/flags/commandlineflag.cc
parent768eb2ca2857342673fcd462792ce04b8bac3fa3 (diff)
downloadabseil-cf1a02e2dc5a1bc9d095f4c996306de448ca200f.tar.gz
abseil-cf1a02e2dc5a1bc9d095f4c996306de448ca200f.tar.bz2
abseil-cf1a02e2dc5a1bc9d095f4c996306de448ca200f.zip
Export of internal Abseil changes
-- 30e5e00a54cabc50118a3e1055826ea02a0d32e4 by Gennadiy Rozental <rogeeff@google.com>: Move flag help into flag_cold section. To facilitate this we set flag help not in a constructor, but during flag registration. This allows us to place flag name as static variable inside non constexpr lambda and invoke it immediately in FlagRegistrar argument location. PiperOrigin-RevId: 312432625 -- efd91b05152b68df648cff5ba38e9669a817c12f by Gennadiy Rozental <rogeeff@google.com>: Make CommandLineFlag public. PiperOrigin-RevId: 312404666 -- dc7f5fb73487766fa8a76d6b97d28116e5334445 by Mark Barolak <mbar@google.com>: Internal change. PiperOrigin-RevId: 312297164 GitOrigin-RevId: 30e5e00a54cabc50118a3e1055826ea02a0d32e4 Change-Id: Ic46ab011bb804645264572caddff0becba5f9170
Diffstat (limited to 'absl/flags/commandlineflag.cc')
-rw-r--r--absl/flags/commandlineflag.cc32
1 files changed, 32 insertions, 0 deletions
diff --git a/absl/flags/commandlineflag.cc b/absl/flags/commandlineflag.cc
new file mode 100644
index 00000000..83d14c1b
--- /dev/null
+++ b/absl/flags/commandlineflag.cc
@@ -0,0 +1,32 @@
+//
+// Copyright 2020 The Abseil Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// https://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "absl/flags/commandlineflag.h"
+
+namespace absl {
+ABSL_NAMESPACE_BEGIN
+
+bool CommandLineFlag::IsRetired() const { return false; }
+bool CommandLineFlag::ParseFrom(absl::string_view value, std::string* error) {
+ return ParseFrom(value, flags_internal::SET_FLAGS_VALUE,
+ flags_internal::kProgrammaticChange, error);
+}
+
+namespace flags_internal {
+FlagStateInterface::~FlagStateInterface() {}
+} // namespace flags_internal
+ABSL_NAMESPACE_END
+} // namespace absl
+