diff --git a/include/wx/weakref.h b/include/wx/weakref.h index b8324d07ec..96ed48ee6f 100644 --- a/include/wx/weakref.h +++ b/include/wx/weakref.h @@ -206,6 +206,8 @@ class wxWeakRef : public #endif { public: + typedef T element_type; + // Default ctor wxWeakRef() { } @@ -224,13 +226,6 @@ public: Assign(wr.get()); } - template - wxWeakRef& operator=(TDerived* pobj) - { - this->Assign(pobj); - return *this; - } - wxWeakRef& operator=(const wxWeakRef& wr) { AssignCopy(wr); diff --git a/interface/wx/weakref.h b/interface/wx/weakref.h index 05a5503fd8..d6eb9fe4d8 100644 --- a/interface/wx/weakref.h +++ b/interface/wx/weakref.h @@ -102,6 +102,9 @@ template class wxWeakRef : public wxTrackerNode { public: + /// Type of the element stored by this reference. + typedef T element_type; + /** Constructor. The weak reference is initialized to @e pobj. */ @@ -115,7 +118,7 @@ public: /** Destructor. */ - ~wxWeakRef(); + virtual ~wxWeakRef(); /** Called when the tracked object is destroyed. Be default sets