X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/42d9ad7949254ed53f89ad6306dcb2a266bfffb3..dd9f8b6bb6935360a8271dc3e8749fb026b601a8:/include/wx/weakref.h?ds=sidebyside diff --git a/include/wx/weakref.h b/include/wx/weakref.h index 73dcf5cdca..d72ab4ccbc 100644 --- a/include/wx/weakref.h +++ b/include/wx/weakref.h @@ -74,8 +74,13 @@ protected: T *m_pobj; }; -#ifdef HAVE_PARTIAL_SPECIALIZATION +#if !defined(HAVE_PARTIAL_SPECIALIZATION) || !defined(HAVE_TEMPLATE_OVERLOAD_RESOLUTION) + #define USE_STATIC_WEAKREF +#endif + + +#ifndef USE_STATIC_WEAKREF template struct wxWeakRefImpl; @@ -169,17 +174,18 @@ protected: wxTrackable *m_ptbase; }; -#endif // HAVE_PARTIAL_SPECIALIZATION +#endif // #ifndef USE_STATIC_WEAKREF + // A weak reference to an object of type T, where T has type wxTrackable // (usually statically but if not dynamic_cast<> is tried). template class wxWeakRef : public -#ifdef HAVE_PARTIAL_SPECIALIZATION - wxWeakRefImpl::value> -#else +#ifdef USE_STATIC_WEAKREF wxWeakRefStatic +#else + wxWeakRefImpl::value> #endif { public: @@ -305,7 +311,7 @@ protected: // Provide some basic types of weak references class WXDLLIMPEXP_FWD_BASE wxEvtHandler; -class WXDLLIMPEXP_FWD_BASE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxWindow; typedef wxWeakRef wxEvtHandlerRef; typedef wxWeakRef wxWindowRef;