about summary refs log tree commit diff
path: root/absl/flags/flag.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2019-07-18T22·07-0700
committerDerek Mauro <dmauro@google.com>2019-07-19T17·04-0400
commitf3840bc5e33ce4932e35986cf3718450c6f02af2 (patch)
tree43dd14bfbd542b155040546c4fab6e592c504988 /absl/flags/flag.h
parent278b26058c036833a4f7f3047d3f4d9296527f87 (diff)
Export of internal Abseil changes.
--
dcff7cc4eb3837d39d1e083cbf1d4f082054cbf6 by Laramie Leavitt <lar@google.com>:

Add default and fallback modes for SaltedSeedSeq::generate().

SeedSeq::generate will often be called with contiguous ranges of uint32_t.
Detect this case and use the currently direct code paths to handle it.
Otherwise use a fallback mechanism which does an additional copy.
PiperOrigin-RevId: 258853656

--
59ec88845ac2ee6567c493021b54385940d66762 by Gennadiy Rozental <rogeeff@google.com>:

Internal change

PiperOrigin-RevId: 258822137

--
eb2d1ab21f6f94c24c51c1cd3719846be259e8e7 by Abseil Team <absl-team@google.com>:

Add iOS version 11 to the mix of Apple OS versions that have various C++17 header files
but do not support them.

PiperOrigin-RevId: 258820405

--
452cea3e13b29797b2c385d7c6da7613d36bdc45 by Gennadiy Rozental <rogeeff@google.com>:

Internal change

PiperOrigin-RevId: 258802436
GitOrigin-RevId: dcff7cc4eb3837d39d1e083cbf1d4f082054cbf6
Change-Id: I2261cb58e142eb15017ef646a56710dd64f06496
Diffstat (limited to 'absl/flags/flag.h')
-rw-r--r--absl/flags/flag.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/absl/flags/flag.h b/absl/flags/flag.h
index c70023aba8c7..6c9f48765cfa 100644
--- a/absl/flags/flag.h
+++ b/absl/flags/flag.h
@@ -216,17 +216,16 @@ void SetFlag(absl::Flag<T>* flag, const V& v) {
 // Note: Name of registrar object is not arbitrary. It is used to "grab"
 // global name for FLAGS_no<flag_name> symbol, thus preventing the possibility
 // of defining two flags with names foo and nofoo.
-#define ABSL_FLAG_IMPL(Type, name, default_value, help)              \
-  namespace absl {}                                                  \
-  ABSL_FLAG_IMPL_DECLARE_DEF_VAL_WRAPPER(name, Type, default_value)  \
-  ABSL_FLAG_IMPL_DECLARE_HELP_WRAPPER(name, help)                    \
-  absl::Flag<Type> FLAGS_##name(                                     \
-      ABSL_FLAG_IMPL_FLAGNAME(#name),                                \
-      &AbslFlagsWrapHelp##name,                                      \
-      ABSL_FLAG_IMPL_FILENAME(),                                     \
-      &absl::flags_internal::FlagMarshallingOps<Type>,               \
-      &AbslFlagsInitFlag##name);                                     \
-  extern bool FLAGS_no##name;                                        \
+#define ABSL_FLAG_IMPL(Type, name, default_value, help)             \
+  namespace absl {}                                                 \
+  ABSL_FLAG_IMPL_DECLARE_DEF_VAL_WRAPPER(name, Type, default_value) \
+  ABSL_FLAG_IMPL_DECLARE_HELP_WRAPPER(name, help)                   \
+  ABSL_CONST_INIT absl::Flag<Type> FLAGS_##name(                    \
+      ABSL_FLAG_IMPL_FLAGNAME(#name), &AbslFlagsWrapHelp##name,     \
+      ABSL_FLAG_IMPL_FILENAME(),                                    \
+      &absl::flags_internal::FlagMarshallingOps<Type>,              \
+      &AbslFlagsInitFlag##name);                                    \
+  extern bool FLAGS_no##name;                                       \
   bool FLAGS_no##name = ABSL_FLAG_IMPL_REGISTRAR(Type, FLAGS_##name)
 
 // ABSL_RETIRED_FLAG