summaryrefslogtreecommitdiff
path: root/absl/flags/declare.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/declare.h')
-rw-r--r--absl/flags/declare.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/absl/flags/declare.h b/absl/flags/declare.h
index b9794d8b..a791b667 100644
--- a/absl/flags/declare.h
+++ b/absl/flags/declare.h
@@ -60,6 +60,10 @@ ABSL_NAMESPACE_END
// The ABSL_DECLARE_FLAG(type, name) macro expands to:
//
// extern absl::Flag<type> FLAGS_name;
-#define ABSL_DECLARE_FLAG(type, name) extern ::absl::Flag<type> FLAGS_##name
+#define ABSL_DECLARE_FLAG(type, name) \
+ extern absl::Flag<type> FLAGS_##name; \
+ namespace absl /* block flags in namespaces */ {} \
+ /* second redeclaration is to allow applying attributes */ \
+ extern absl::Flag<type> FLAGS_##name
#endif // ABSL_FLAGS_DECLARE_H_