Topic: A minor defect for shared_ptr


Author: =?ISO-8859-2?Q?Andrzej_Krzemie=F1ski?=<akrzemi1@gmail.com>
Date: Tue, 20 Dec 2011 09:16:45 -0800 (PST)
Raw View
Hi, the "nullptr-constructor" for shared_ptr is defined as follows
constexpr shared_ptr<T>::shared_ptr(nullptr_t) : shared_ptr() {}
It is not declared as noexcept even though the default constructor is,
and the implementation is clearly required to just call the default
constructor, which IS declared as noexcept.

I think the "nullptr-constructor" should also be declared noexcept.
Regards,
&rzej


--
[ comp.std.c++ is moderated.  To submit articles, try posting with your ]
[ newsreader.  If that fails, use mailto:std-cpp-submit@vandevoorde.com ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html                      ]