From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-01-21 17:25:09
On Jan 21, 2004, at 4:46 PM, Daryle Walker wrote:
> I think the reverse; that "S<T>" is worse, because it's
> When I see a specialization, I think of something that has the same
> interface, but with some sort of optimized implementation. Your idea
> is bad
> because you're deliberately giving this specialization a _different_
> interface. It's worse than the "std::vector<bool> sucks compared to
> unspecialized std::vector<T>" quirk (vector's problem is in the subtle
> difference in the dereferencing interfaces).
<nod> I understand your position.
But with vector<bool> there's no obvious visual indicator that says:
Hey, there's something different going on here!
With move_ptr<T> you (or at least I) immediately think: Ok, a smart
pointer to an array.
Intuitive? I must admit that I unceremoniously stole the idea. I
stole it from a complete C++ newbie on comp.lang.c++:
---- From: Luca (luca_at_[hidden]) Subject: auto_ptr question Newsgroups: comp.lang.c++ Date: 2001-01-03 13:03:14 PST Can auto_ptr handle raw arrays properly? auto_ptr<char > ptr(new char); Will the array be properly deleted when ptr goes out of scope? TIA Luca ---- The guy looked like smart pointer prodigy to me. :-) -Howard
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk