Make scoped_ptr's constructor explicit

Originally committed to SVN as r5202.
This commit is contained in:
Thomas Goyne 2011-01-16 07:16:07 +00:00
parent 71937757a2
commit 1aeded1a29

View file

@ -43,7 +43,7 @@ public:
void swap(scoped_ptr &b) { using std::swap; swap(ptr, b.ptr); }
scoped_ptr(T *ptr = NULL) : ptr(ptr){ }
explicit scoped_ptr(T *ptr = NULL) : ptr(ptr){ }
~scoped_ptr() { delete ptr; }
};