Lines Matching refs:Policy
30 handled externally by a policy class. If the object holds a
44 The policy class must provide two static methods:
48 template<typename T, typename Policy>
77 Policy::incref (m_obj);
91 Policy::decref (m_obj);
102 Policy::incref (m_obj);
124 Policy::decref (m_obj);
153 static ref_ptr<T, Policy> new_reference (T *obj)
155 Policy::incref (obj);
156 return ref_ptr<T, Policy> (obj);
164 template<typename T, typename Policy>
165 inline bool operator== (const ref_ptr<T, Policy> &lhs,
166 const ref_ptr<T, Policy> &rhs)
171 template<typename T, typename Policy>
172 inline bool operator== (const ref_ptr<T, Policy> &lhs, const T *rhs)
177 template<typename T, typename Policy>
178 inline bool operator== (const ref_ptr<T, Policy> &lhs, const std::nullptr_t)
183 template<typename T, typename Policy>
184 inline bool operator== (const T *lhs, const ref_ptr<T, Policy> &rhs)
189 template<typename T, typename Policy>
190 inline bool operator== (const std::nullptr_t, const ref_ptr<T, Policy> &rhs)
195 template<typename T, typename Policy>
196 inline bool operator!= (const ref_ptr<T, Policy> &lhs,
197 const ref_ptr<T, Policy> &rhs)
202 template<typename T, typename Policy>
203 inline bool operator!= (const ref_ptr<T, Policy> &lhs, const T *rhs)
208 template<typename T, typename Policy>
209 inline bool operator!= (const ref_ptr<T, Policy> &lhs, const std::nullptr_t)
214 template<typename T, typename Policy>
215 inline bool operator!= (const T *lhs, const ref_ptr<T, Policy> &rhs)
220 template<typename T, typename Policy>
221 inline bool operator!= (const std::nullptr_t, const ref_ptr<T, Policy> &rhs)