| 248 | |
| 249 | --------------------------------------------------------------------------------------------------- |
| 250 | == Boost.!SmartPtr.!UniquePtr == |
| 251 | * '''Author(s):''' Howard Hinnant <hinnant@twcny.rr.com> |
| 252 | * '''Version:''' |
| 253 | * '''State:''' |
| 254 | * '''Last upload:''' 2009 Jan 3 |
| 255 | * '''Links:''' [http://home.roadrunner.com/~hinnant/unique_ptr03.html Documentation & Download] |
| 256 | * '''Description:''' unique_ptr is a class template smart pointer currently in the [http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2800.pdf C++0X CD1 draft]. It is intended to be a safer and more flexible replacement for auto_ptr. It represents sole (unique) ownership of a resource such as memory (like auto_ptr). |
| 257 | The actual C++0X unique_ptr makes use of a new C++ langauge feature called rvalue reference which is similar to our current reference (&), but spelled &&. This emulation is intended to capture most of the behavior of the C++0X unique_ptr but work with C++03 compilers. Furthermore this emulation makes use of boost library facilities and has been placed in the boost namespace. Though at the time of this writing, this library is not part of the official boost library release. |