Fixed stack overflow error with VC++.

This commit is contained in:
Vincent Richard 2007-03-12 08:36:10 +00:00
parent b90ca5481d
commit 9bada472d7

View File

@ -277,7 +277,14 @@ public:
if (m_ptr) if (m_ptr)
m_ptr->getRefManager()->addStrong(); m_ptr->getRefManager()->addStrong();
#if defined(_MSC_VER) // VC++ compiler bug (stack overflow)
ref <const T> r;
r.m_ptr = m_ptr;
return r;
#else
return ref <const T>::fromPtrImpl(m_ptr); return ref <const T>::fromPtrImpl(m_ptr);
#endif // defined(_MSC_VER)
} }
// Copy // Copy