-// Helper to decide if an object has a base class or not
-// (strictly speaking, this test succeeds if a type is convertible
-// to another type in some way.)
-template <class T, class B>
-struct wxHasBase
-{
- static char Match(B *pb);
- static int Match(...);
-
- enum { value = sizeof(Match((T*)NULL)) == sizeof(char) };
-};
-
-// A structure to cast to wxTrackableBase, using either static_cast<> or
-// dynamic_cast<>.
-template <class T, bool is_static>
-struct wxTrackableCaster;
-
-template <class T>
-struct wxTrackableCaster<T, true>
-{
- static wxTrackableBase* Cast(T* pt)
- {
- return static_cast<wxTrackableBase *>(pt);
- }
-};
-
-#ifdef HAVE_DYNAMIC_CAST
-
-template <class T>
-struct wxTrackableCaster<T, false>
-{
- static wxTrackableBase *Cast(T* pt)
+ // dtor is not virtual: this class is not supposed to be used
+ // polymorphically and adding a virtual table to it would add unwanted
+ // overhead
+ ~wxTrackable()