Remove MSVC6 support.

Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-05-15 22:32:17 +00:00
parent 28f9670787
commit f4b80e5337
289 changed files with 394 additions and 38949 deletions

View File

@@ -65,8 +65,6 @@ typedef wxObjectListNode wxNode;
#define WX_DECLARE_LIST_WITH_DECL(elT, liT, decl) \
WX_DECLARE_LIST_XO(elT*, liT, decl)
#if !defined(__VISUALC__) || __VISUALC__ >= 1300 // == !VC6
template<class T>
class wxList_SortFunction
{
@@ -78,42 +76,6 @@ private:
wxSortCompareFunction m_f;
};
#define WX_LIST_SORTFUNCTION( elT, f ) wxList_SortFunction<elT>(f)
#define WX_LIST_VC6_WORKAROUND(elT, liT, decl)
#else // if defined( __VISUALC__ ) && __VISUALC__ < 1300 // == VC6
#define WX_LIST_SORTFUNCTION( elT, f ) std::greater<elT>( f )
#define WX_LIST_VC6_WORKAROUND(elT, liT, decl) \
decl liT; \
\
/* Workaround for broken VC6 STL incorrectly requires a std::greater<> */ \
/* to be passed into std::list::sort() */ \
template <> \
struct std::greater<elT> \
{ \
private: \
wxSortCompareFunction m_CompFunc; \
public: \
greater( wxSortCompareFunction compfunc = NULL ) \
: m_CompFunc( compfunc ) {} \
bool operator()(const elT X, const elT Y) const \
{ \
return m_CompFunc ? \
( m_CompFunc( wxListCastElementToVoidPtr(X), \
wxListCastElementToVoidPtr(Y) ) < 0 ) : \
( X > Y ); \
} \
};
// helper for std::greater<elT> above:
template<typename T>
inline const void *wxListCastElementToVoidPtr(const T* ptr) { return ptr; }
inline const void *wxListCastElementToVoidPtr(const wxString& str)
{ return (const char*)str; }
#endif // VC6/!VC6
/*
Note 1: the outer helper class _WX_LIST_HELPER_##liT below is a workaround
for mingw 3.2.3 compiler bug that prevents a static function of liT class
@@ -154,7 +116,6 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str)
static void DeleteFunction( _WX_LIST_ITEM_TYPE_##liT X ); \
}; \
\
WX_LIST_VC6_WORKAROUND(elT, liT, decl) \
class liT : public std::list<elT> \
{ \
private: \
@@ -166,8 +127,6 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str)
class compatibility_iterator \
{ \
private: \
/* Workaround for broken VC6 nested class name resolution */ \
typedef std::list<elT>::iterator iterator; \
friend class liT; \
\
iterator m_iter; \
@@ -318,7 +277,7 @@ inline const void *wxListCastElementToVoidPtr(const wxString& str)
} \
/* Workaround for broken VC6 std::list::sort() see above */ \
void Sort( wxSortCompareFunction compfunc ) \
{ sort( WX_LIST_SORTFUNCTION( elT, compfunc ) ); } \
{ sort( wxList_SortFunction<elT>(compfunc ) ); } \
~liT() { Clear(); } \
\
/* It needs access to our EmptyList */ \
@@ -1216,7 +1175,6 @@ public:
void Sort(wxSortCompareFunction compfunc) { wxListBase::Sort(compfunc); }
#endif // !wxUSE_STD_CONTAINERS
#ifndef __VISUALC6__
template<typename T>
wxVector<T> AsVector() const
{
@@ -1230,7 +1188,6 @@ public:
return vector;
}
#endif // !__VISUALC6__
};