scoped_ptr(auto_ptr) constructor

29 Apr
2003
29 Apr
'03
12:16 p.m.
Is the constructor for scoped_ptr that takes an auto_ptr argument part of the proposed standard? The boost documentation makes no mention of it, yet it exists in the implementation as: explicit scoped_ptr(std::auto_ptr<T> p): ptr(p.release()) // never throws { } Personally I think it should be included in the proposed standard if it is not. I can't see any reason why it shouldn't be, as it doesn't seem to break the fundamental concepts behind auto_ptrs (ownership transferal) or scoped_ptrs (sole ownership). Ownership of the object is transfered from the auto_ptr to the scoped_ptr, and thereafter retained solely by that scoped_ptr. Regards, Daniel Franklin
8026
Age (days ago)
8026
Last active (days ago)
0 comments
1 participants
participants (1)
-
Daniel Franklin