use `#pragma message` instead of `#warning` for non-GCC compilers
authorSegaraRai <SegaraRai@users.noreply.github.com>
Wed, 10 Nov 2021 18:14:19 +0000 (03:14 +0900)
committerSegaraRai <SegaraRai@users.noreply.github.com>
Wed, 10 Nov 2021 18:14:19 +0000 (03:14 +0900)
modules/gapi/include/opencv2/gapi/util/any.hpp

index 5f97e95..94451c7 100644 (file)
@@ -31,7 +31,11 @@ namespace internal
 #if defined(__GXX_RTTI) || defined(_CPPRTTI)
        return dynamic_cast<T>(operand);
 #else
-    #warning used static cast instead of dynamic because RTTI is disabled
+#ifdef __GNUC__
+#warning used static cast instead of dynamic because RTTI is disabled
+#else
+#pragma message("WARNING: used static cast instead of dynamic because RTTI is disabled")
+#endif
        return static_cast<T>(operand);
 #endif
     }