]> git.saurik.com Git - wxWidgets.git/commit
Fix using weak references to incomplete classes.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 15 Apr 2010 22:47:37 +0000 (22:47 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 15 Apr 2010 22:47:37 +0000 (22:47 +0000)
commit7f2468e96a3887eb767ed6fcf452834a4c7b7a28
tree4c81027eaf05eb1cfef250b7d60984eea380ae4d
parent52cda80e1c94758a720d48c5b9743dbb18764cb6
Fix using weak references to incomplete classes.

wxWeakRef can work with forward-declared classes provided dynamic_cast<> is
available but this wasn't detected as being the case due to the use of the
obsolete HAVE_DYNAMIC_CAST in its code.

Replace HAVE_DYNAMIC_CAST with !wxNO_RTTI to fix this.

Also add a unit test checking that this does work.

Closes #11916.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/weakref.h
tests/weakref/weakref.cpp