Topic: Smart Pointers organizational logic in draft C++0x


Author: Scott Meyers <usenet@aristeia.com>
Date: Mon, 16 Nov 2009 16:58:15 CST
Raw View
I see that in the latest draft of C++0x (N3000), unique_ptr (which
syntactically
acts like a pointer, i.e., overloads operator* and operator->) is still not
listed under "Smart Pointers," and weak_ptr (which doesn't syntactically
act
like a pointer) is.  shared_ptr and weak_ptr work hand-in-glove, so it
makes
sense to have them both under "Smart Pointers," IMO, but is there a
reason why
unique_ptr isn't listed there?

Thanks,

Scott

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Pete Becker <pete@versatilecoding.com>
Date: Mon, 16 Nov 2009 23:20:25 CST
Raw View
Scott Meyers wrote:
>
> I see that in the latest draft of C++0x (N3000), unique_ptr (which syntactically
> acts like a pointer, i.e., overloads operator* and operator->) is still not
> listed under "Smart Pointers," and weak_ptr (which doesn't syntactically act
> like a pointer) is.  shared_ptr and weak_ptr work hand-in-glove, so it makes
> sense to have them both under "Smart Pointers," IMO, but is there a reason why
> unique_ptr isn't listed there?
>

Yes. The reason is that there have been more pressing things to do,
such as removing concepts and then getting the draft back in one
piece, more or less.

It's still a draft.

--
 Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of
"The Standard C++ Library Extensions: a Tutorial and Reference"
(www.petebecker.com/tr1book)

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]





Author: Scott Meyers <usenet@aristeia.com>
Date: Tue, 17 Nov 2009 10:27:34 CST
Raw View
Pete Becker wrote:
> Yes. The reason is that there have been more pressing things to do,
> such as removing concepts and then getting the draft back in one
> piece, more or less.
>
> It's still a draft.

I understand.

Thanks,

Scott

--
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]