mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 20:14:23 +08:00
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
This commit is contained in:
committed by
Copybara-Service
parent
b2a6c1bca7
commit
25800da223
@@ -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 "
|
||||
|
||||
Reference in New Issue
Block a user