Comment Re:Answer (Score 4, Funny) 336
unique_ptr
LOL at how C++ gets new smart pointers every couple years.
It's like they're trolling their own users with their:
- classes are kinda like structs, so you can use 'typedef struct
- no! 'void *' pointers are broken! use 'auto_ptr' instead (C++03)
- no! 'auto_ptr' is broken! use 'shared_ptr' instead (C++07/TR1)
- no! 'shared_ptr' is broken!(for most use cases) use
- 'boost::scoped_ptr' instead (non-standard, but more useful than the standard's shared_ptr)
- no! 'boost::scoped_ptr' is broken! use 'std::unique_ptr const' instead (C++11)
- no! 'std::unique_ptr const' is fugly! use "auto" and hope C++14's "return type deduction" will guess a safe type and hope C++17's "new rules for auto deduction" won't break stuff (C++14)
crap.
How the heck can people take an "object oriented" language seriously when it takes literally 30 years (1983 to 2014) for them to come up with a non broken way of making a reference to an object....
W.T.F.