about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2018-08-28T15·27-0700
committerjueminyang <jueminyang@google.com>2018-08-29T14·37-0400
commit6c7e5ffc43decd92f7bdfc510ad8a245a20b6dea (patch)
treedb592f2e4907c4f8bc8ffa58d66775e85db6f677
parentd6df769173bf0263489f98874b93034db0e479a2 (diff)
Export of internal Abseil changes.
--
a371d3d4e213c65354dd0e8b1aa28673455aec2a by Matt Armstrong <marmstrong@google.com>:

Fix the C++17 build of absl/types/internal/variant.h.

If ABSL_HAVE_STD_VARIANT is defined this header is now a
nop. While no code should include this header in that case,
the build system may still try to compile it, for example,
if the Bazel parse_headers feature is on.

PiperOrigin-RevId: 210544253
GitOrigin-RevId: a371d3d4e213c65354dd0e8b1aa28673455aec2a
Change-Id: I9c02018b86293b7235fcc9e03fb54f1d86c4b096
-rw-r--r--absl/types/internal/variant.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/absl/types/internal/variant.h b/absl/types/internal/variant.h
index 28ae1a5a7e3c..f220afd04415 100644
--- a/absl/types/internal/variant.h
+++ b/absl/types/internal/variant.h
@@ -37,6 +37,8 @@
 #include "absl/types/bad_variant_access.h"
 #include "absl/utility/utility.h"
 
+#if !defined(ABSL_HAVE_STD_VARIANT)
+
 namespace absl {
 
 template <class... Types>
@@ -1612,4 +1614,5 @@ struct VariantHashBase<Variant,
 }  // namespace variant_internal
 }  // namespace absl
 
+#endif  // !defined(ABSL_HAVE_STD_VARIANT)
 #endif  // ABSL_TYPES_variant_internal_H_