Lines Matching defs:shared_ptr
253 class shared_ptr {
258 shared_ptr() : p(0), control(0) {}
259 explicit shared_ptr(T *p) : p(p), control(new control_block) {
262 shared_ptr(shared_ptr &other) : p(other.p), control(other.control) {
266 ~shared_ptr() {
277 void swap(shared_ptr &other) {
289 shared_ptr<int> a(new int);
294 shared_ptr<int> a(new int);
295 shared_ptr<int> b = a;
300 shared_ptr<int> a(new int);
301 shared_ptr<int> b = a;
304 extern void use(shared_ptr<int> &);
309 shared_ptr<int> a(new int);
311 shared_ptr<int> b = a;
317 shared_ptr<int> a(new int);
318 shared_ptr<int> b;
319 shared_ptr<int> c = a;
320 shared_ptr<int>(c).swap(b);
326 shared_ptr<int> a(p);
327 shared_ptr<int> b = a;
331 // conservatively modeled ~shared_ptr.