We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 24dd7d0 + 2025275 commit 5f0d93cCopy full SHA for 5f0d93c
1 file changed
libvisual/libvisual/lv_intrusive_ptr.hpp
@@ -135,22 +135,17 @@ namespace LV
135
rhs.m_ptr = tmp;
136
}
137
138
+ //! Swaps two intrusive pointers.
139
+ friend void swap (LV::IntrusivePtr<T>& lhs, LV::IntrusivePtr<T>& rhs)
140
+ {
141
+ lhs.swap (rhs);
142
+ }
143
+
144
private:
145
146
T* m_ptr;
147
};
148
149
} // LV namespace
150
-namespace std {
-
- // std::swap() overload for efficiently swapping IntrusivePtrs
- template <class T>
- void swap (LV::IntrusivePtr<T>& lhs, LV::IntrusivePtr<T>& rhs)
- {
151
- lhs.swap (rhs);
152
- }
153
154
-} // std namespace
155
156
#endif // _LV_INTRUSIVE_HPP
0 commit comments