¡@

Home 

c++ Programming Glossary: auto_ptr

What is a smart pointer and when should I use one?

http://stackoverflow.com/questions/106508/what-is-a-smart-pointer-and-when-should-i-use-one

C library does define a special kind of smart pointer std auto_ptr . It is very much like a scoped pointer except that it also.. be copied which also unexpectedly transfers ownership std auto_ptr MyObject p1 new MyObject std auto_ptr MyObject p2 p1 Copy and.. ownership std auto_ptr MyObject p1 new MyObject std auto_ptr MyObject p2 p1 Copy and transfer ownership. p1 gets set to..

Why is it wrong to use std::auto_ptr<> with standard containers?

http://stackoverflow.com/questions/111478/why-is-it-wrong-to-use-stdauto-ptr-with-standard-containers

is it wrong to use std auto_ptr with standard containers Why is it wrong to use std auto_ptr.. with standard containers Why is it wrong to use std auto_ptr with standard containers c stl raii auto ptr c faq share.. copied and the two elements are logically independent. std auto_ptr does not fulfill this requirement. Take for example this code..

What C++ Smart Pointer Implementations are available?

http://stackoverflow.com/questions/5026197/what-c-smart-pointer-implementations-are-available

pointers c faq share improve this question C 03 std auto_ptr Perhaps one of the originals it suffered from first draft syndrome.. slated to be deprecated in the next standard of C . std auto_ptr_ref This is not a smart pointer it's actually a design detail.. it's actually a design detail used in conjunction with std auto_ptr to allow copying and assignment in certain situations. Specifically..

smart pointers (boost) explained

http://stackoverflow.com/questions/569775/smart-pointers-boost-explained

legal This is the semantic that std auto_ptr obeys but because of missing native support for moving it fails.. which is one of the key features of move semantics. auto_ptr will be deprecated in the next C Standard release in favor of..

Which kind of pointer do I use when?

http://stackoverflow.com/questions/8706192/which-kind-of-pointer-do-i-use-when

I use when Ok so the last time I wrote C for a living std auto_ptr was all the std lib had available and boost shared_ptr was all.. operator instead of operator and operator . Note that std auto_ptr is still in the standard but it is deprecated . §D.10 depr.auto.ptr.. it is deprecated . §D.10 depr.auto.ptr The class template auto_ptr is deprecated. Note The class template unique_ptr 20.7.1 provides..

Why does the use of 'new' cause memory leaks?

http://stackoverflow.com/questions/8839943/why-does-the-use-of-new-cause-memory-leaks

std unique_ptr . There's also an old one pre C 11 named auto_ptr but it's now deprecated because it has a strange copying behaviour...