Skip to content

Commit b28d586

Browse files
committed
Move assignment operator inline as a workaround for a vc7 bug.
[SVN r19416]
1 parent f48aacf commit b28d586

1 file changed

Lines changed: 6 additions & 9 deletions

File tree

include/boost/python/handle.hpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,12 @@ class handle
8181
{
8282
}
8383

84-
handle& operator=(handle const& r);
84+
handle& operator=(handle const& r)
85+
{
86+
python::xdecref(m_p);
87+
m_p = python::xincref(r.m_p);
88+
return *this;
89+
}
8590

8691
#if !defined(BOOST_MSVC) || (BOOST_MSVC > 1200)
8792

@@ -189,14 +194,6 @@ inline handle<T>::~handle()
189194
python::xdecref(m_p);
190195
}
191196

192-
template <class T>
193-
inline handle<T>& handle<T>::operator=(handle<T> const& r)
194-
{
195-
python::xdecref(m_p);
196-
m_p = python::xincref(r.m_p);
197-
return *this;
198-
}
199-
200197
template <class T>
201198
inline T* handle<T>::operator->() const
202199
{

0 commit comments

Comments
 (0)