about summary refs log tree commit diff
path: root/absl/base/internal
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/internal')
-rw-r--r--absl/base/internal/exception_safety_testing.cc4
-rw-r--r--absl/base/internal/exception_safety_testing.h7
2 files changed, 10 insertions, 1 deletions
diff --git a/absl/base/internal/exception_safety_testing.cc b/absl/base/internal/exception_safety_testing.cc
index 6ef4325c8613..6ccac41864b1 100644
--- a/absl/base/internal/exception_safety_testing.cc
+++ b/absl/base/internal/exception_safety_testing.cc
@@ -14,6 +14,8 @@
 
 #include "absl/base/internal/exception_safety_testing.h"
 
+#ifdef ABSL_HAVE_EXCEPTIONS
+
 #include "gtest/gtest.h"
 #include "absl/meta/type_traits.h"
 
@@ -73,3 +75,5 @@ std::string GetSpecString(AllocSpec spec) {
 }  // namespace exceptions_internal
 
 }  // namespace testing
+
+#endif  // ABSL_HAVE_EXCEPTIONS
diff --git a/absl/base/internal/exception_safety_testing.h b/absl/base/internal/exception_safety_testing.h
index be38ba549ef7..6ba89d05dfca 100644
--- a/absl/base/internal/exception_safety_testing.h
+++ b/absl/base/internal/exception_safety_testing.h
@@ -17,6 +17,10 @@
 #ifndef ABSL_BASE_INTERNAL_EXCEPTION_SAFETY_TESTING_H_
 #define ABSL_BASE_INTERNAL_EXCEPTION_SAFETY_TESTING_H_
 
+#include "absl/base/config.h"
+
+#ifdef ABSL_HAVE_EXCEPTIONS
+
 #include <cstddef>
 #include <cstdint>
 #include <functional>
@@ -27,7 +31,6 @@
 #include <unordered_map>
 
 #include "gtest/gtest.h"
-#include "absl/base/config.h"
 #include "absl/base/internal/pretty_function.h"
 #include "absl/memory/memory.h"
 #include "absl/meta/type_traits.h"
@@ -1093,4 +1096,6 @@ class ExceptionSafetyTestBuilder {
 
 }  // namespace testing
 
+#endif  // ABSL_HAVE_EXCEPTIONS
+
 #endif  // ABSL_BASE_INTERNAL_EXCEPTION_SAFETY_TESTING_H_