Commit 25800da2 by Mark Barolak Committed by Copybara-Service

Add a comment to absl/flags/parse.cc indicating that the flags defined there are…

Add a comment to absl/flags/parse.cc indicating that the flags defined there are not intended to be read or set from C++ code.

PiperOrigin-RevId: 547264846
Change-Id: Idd0958f308ec74f907c22cce965fac2e06692e2c
parent b2a6c1bc
......@@ -99,6 +99,8 @@ struct SpecifiedFlagsCompare {
ABSL_NAMESPACE_END
} // namespace absl
// These flags influence how command line flags are parsed and are only intended
// to be set on the command line. Avoid reading or setting them from C++ code.
ABSL_FLAG(std::vector<std::string>, flagfile, {},
"comma-separated list of files to load flags from")
.OnUpdate([]() {
......@@ -148,6 +150,8 @@ ABSL_FLAG(std::vector<std::string>, tryfromenv, {},
absl::flags_internal::tryfromenv_needs_processing = true;
});
// Rather than reading or setting --undefok from C++ code, please consider using
// ABSL_RETIRED_FLAG instead.
ABSL_FLAG(std::vector<std::string>, undefok, {},
"comma-separated list of flag names that it is okay to specify "
"on the command line even if the program does not define a flag "
......
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