
12 Apr
2008
12 Apr
'08
2:09 p.m.
Patrick Twohig:
I've been maintaining/developing a fairly large application which has been built entirely without the use of exceptions. Two of the major target platforms have weak or no exception support. Anyhow, It appears that the function weak_ptr<T>::lock() relies on an exception thrown by shared_ptr<T>'s constructor in order to work properly.
Very good point. I consider this a bug; please feel free to add a Trac ticket for it. Unfortunately it's not easy to make a test for that due to the "optimization: avoid throw overhead" early check. :-)