From 41308e28baf63d39d213c18e008c70576cdb8347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pedro=20Bol=C3=ADvar=20Puente?= Date: Tue, 17 Sep 2024 15:05:07 +0200 Subject: [PATCH] Fix exception detection code --- immer/config.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/immer/config.hpp b/immer/config.hpp index 9942c134..4f995b1f 100644 --- a/immer/config.hpp +++ b/immer/config.hpp @@ -22,8 +22,12 @@ #endif #endif -#ifdef __has_feature -#if !__has_feature(cxx_exceptions) +#if defined(_MSC_VER) +#if !_HAS_EXCEPTIONS +#define IMMER_NO_EXCEPTIONS +#endif +#else +#if !__cpp_exceptions #define IMMER_NO_EXCEPTIONS #endif #endif