10 Oct
2011
10 Oct
'11
6:30 p.m.
I believe it's just not too generic. Note that it "does nothing" and returns a default-constructed result type, when the weak_ptr expires. It may be appropriate for your specific case, but it's definitely not generic.
...but it could be made better and more consistent with weak_ptr behavior, if instead of "doing nothing" it would throw boost::bad_weak_ptr.