]> git.saurik.com Git - wxWidgets.git/commitdiff
Work around wxNumValidator compilation problems with MSVC 6.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 19 Jan 2011 23:47:09 +0000 (23:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 19 Jan 2011 23:47:09 +0000 (23:47 +0000)
Surprisingly, MSVC 6 seems to be able to compile most of the code but chokes
on a wxCOMPILE_TIME_ASSERT involving an inherited typedef. As this assert is
not critical, simply disable it for this compiler.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/valnum.h

index 428fe7ff8a48f73ffbf75e7a61ac1c93e8a0ea0f..5971e612a67f570d8f978e56a705e575fdbfa0a5 100644 (file)
@@ -135,11 +135,17 @@ public:
 
     typedef typename BaseValidator::LongestValueType LongestValueType;
 
+    // FIXME-VC6: This compiler fails to compile the assert below with a
+    // nonsensical error C2248: "'LongestValueType' : cannot access protected
+    // typedef declared in class 'wxIntegerValidatorBase'" so just disable the
+    // check for it.
+#ifndef __VISUALC6__
     wxCOMPILE_TIME_ASSERT
     (
         sizeof(ValueType) <= sizeof(LongestValueType),
         UnsupportedType
     );
+#endif // __VISUALC6__
 
     void SetMin(ValueType min)
     {