[ 1957970 ] wxWeakRef - assign from other wxWeakRef

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2008-05-06 21:04:23 +00:00
parent e846cf8776
commit 6dd21c5433
2 changed files with 11 additions and 0 deletions

View File

@ -200,6 +200,12 @@ public:
Assign(pobj);
}
// We need this copy ctor, since otherwise a default compiler (binary) copy happens
wxWeakRef(const wxWeakRef<T>& wr)
{
Assign(wr.get());
}
template <class TDerived>
wxWeakRef<T>& operator=(TDerived* pobj)
{

View File

@ -105,6 +105,11 @@ public:
*/
wxWeakRef(T* pobj = NULL);
/**
Copy constructor.
*/
wxWeakRef(const wxWeakRef<T>& wr);
/**
Destructor.
*/