From 2ebf99f86ddcbcd4808f00176aedb9b19f62dd37 Mon Sep 17 00:00:00 2001 From: Laramie Leavitt Date: Tue, 9 Jan 2024 18:22:12 -0800 Subject: [PATCH] Preprocessor fixes for xtl_config.hpp Avoid re-#defines of XTL_NO_EXCEPTIONS Properly #include for XTL_NO_EXCEPTIONS --- include/xtl/xtl_config.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/xtl/xtl_config.hpp b/include/xtl/xtl_config.hpp index 2f58d2f..eca552f 100644 --- a/include/xtl/xtl_config.hpp +++ b/include/xtl/xtl_config.hpp @@ -22,11 +22,16 @@ #if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(XTL_NO_EXCEPTIONS) // Exceptions are enabled. #else +#if !defined(XTL_NO_EXCEPTIONS) // Exceptions are disabled. #define XTL_NO_EXCEPTIONS #endif +#endif #if defined(XTL_NO_EXCEPTIONS) + +#include + #define XTL_THROW(_, msg) \ { \ std::cerr << msg << std::endl; \