X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5a0c7d664e3f94655a6446b656eb77d9769a32df..9c97f8ea883afa5db14c37bea63f6d4c327b4596:/include/wx/weakref.h?ds=sidebyside diff --git a/include/wx/weakref.h b/include/wx/weakref.h index 9ae506798b..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: