summaryrefslogtreecommitdiff
path: root/absl/flags/flag.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/flag.h')
-rw-r--r--absl/flags/flag.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/absl/flags/flag.h b/absl/flags/flag.h
index e1707252..cdac545b 100644
--- a/absl/flags/flag.h
+++ b/absl/flags/flag.h
@@ -381,8 +381,10 @@ ABSL_NAMESPACE_END
// unused.
// TODO(rogeeff): replace RETIRED_FLAGS with FLAGS once forward declarations of
// retired flags are cleaned up.
-#define ABSL_RETIRED_FLAG(type, name, default_value, explanation) \
- ABSL_ATTRIBUTE_UNUSED static const absl::flags_internal::RetiredFlag<type> \
- RETIRED_FLAGS_##name(#name)
+#define ABSL_RETIRED_FLAG(type, name, default_value, explanation) \
+ static absl::flags_internal::RetiredFlag<type> RETIRED_FLAGS_##name; \
+ ABSL_ATTRIBUTE_UNUSED static const auto RETIRED_FLAGS_REG_##name = \
+ (RETIRED_FLAGS_##name.Retire(#name), \
+ ::absl::flags_internal::FlagRegistrarEmpty{})
#endif // ABSL_FLAGS_FLAG_H_