Fix VC6 compilation which was somehow broken by adding wxWeakRef ctor.
For some mysterious reason, adding non-template wxWeakRef ctor breaks VC6 build with the apparently completely unrelated errors: include\wx/toplevel.h(223) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class wxWindow *' (or there is no acceptable conversion) include\wx/toplevel.h(231) : error C2679: binary '=' : no operator defined which takes a right-hand operand of type 'class wxWindow *' (or there is no acceptable conversion) src\common\dummy.cpp(27) : error C2856: #pragma hdrstop cannot be inside an #if block Simply don't define it for VC6 to at least allow the code not using wxWeakRef to compile. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -211,12 +211,16 @@ public:
|
|||||||
// Default ctor
|
// Default ctor
|
||||||
wxWeakRef() { }
|
wxWeakRef() { }
|
||||||
|
|
||||||
|
// Enabling this ctor for VC6 results in mysterious compilation failures in
|
||||||
|
// wx/window.h when assigning wxWindow pointers (FIXME-VC6)
|
||||||
|
#ifndef __VISUALC6__
|
||||||
// Ctor from the object of this type: this is needed as the template ctor
|
// Ctor from the object of this type: this is needed as the template ctor
|
||||||
// below is not used by at least g++4 when a literal NULL is used
|
// below is not used by at least g++4 when a literal NULL is used
|
||||||
wxWeakRef(T *pobj)
|
wxWeakRef(T *pobj)
|
||||||
{
|
{
|
||||||
Assign(pobj);
|
Assign(pobj);
|
||||||
}
|
}
|
||||||
|
#endif // !__VISUALC6__
|
||||||
|
|
||||||
// When we have the full type here, static_cast<> will always work
|
// When we have the full type here, static_cast<> will always work
|
||||||
// (or give a straight compiler error).
|
// (or give a straight compiler error).
|
||||||
|
Reference in New Issue
Block a user