Add more general fix for the const/none-const type compatibility-check issue git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@6592 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-headers/crt/math.h b/mingw-w64-headers/crt/math.h index c3837b4..91ccebf 100644 --- a/mingw-w64-headers/crt/math.h +++ b/mingw-w64-headers/crt/math.h
@@ -82,9 +82,17 @@ template <typename type1> struct __mingw_types_compatible_p<type1, type1> { static const bool result = true; }; + +template <typename type1> struct __mingw_types_compatible_p<const type1, type1> { + static const bool result = true; +}; + +template <typename type1> struct __mingw_types_compatible_p<type1, const type1> { + static const bool result = true; +}; } -#define __mingw_types_compatible_p(type1, type2) (__mingw_types_compatible_p <type1, type2>::result || __mingw_types_compatible_p <type1, const type2>::result) +#define __mingw_types_compatible_p(type1, type2) __mingw_types_compatible_p <type1, type2>::result #else #define __mingw_types_compatible_p(type1, type2) __builtin_types_compatible_p (type1, type2) #endif