boost::weak_ptr exception
C / C++ / MFC
1
Posts
1
Posters
0
Views
1
Watching
-
Hello! Why does the boost::weak_ptr throw an exception when I'm trying to construct an shared_ptr from it, if the weak_ptr has not been initialized? Wouldn't it make more sense if the shared_ptr would be initialized as an empty_ptr? (I have to check for emptyness anyway!) Because of this I need an additional try-catch-block (in this case for checking an integer value in the object pointed to)... Alex