Fix macro for exception to disable exception
diff --git a/src/xnnpack/AlignedAllocator.h b/src/xnnpack/AlignedAllocator.h
index 2750473..25337d0 100644
--- a/src/xnnpack/AlignedAllocator.h
+++ b/src/xnnpack/AlignedAllocator.h
@@ -81,7 +81,7 @@
     void* memory = nullptr;
     memory = _aligned_malloc(n * sizeof(T), Alignment);
     if (memory == 0) {
-#if !defined(__GNUC__) || defined(__EXCEPTIONS)
+#if !defined(__GNUC__) && !defined(_MSC_VER) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)
       throw std::bad_alloc();
 #endif
     }