
On Sun, Apr 15, 2012 at 8:17 AM, Andrey Semashev <andrey.semashev@gmail.com>wrote:
On Sunday 15 April 2012 12:34:07 Olaf van der Spek wrote:
On Sun, Apr 15, 2012 at 10:54 AM, Andrey Semashev
<andrey.semashev@gmail.com> wrote:
Using a separate implementation of checked_delete in shared_ptr is what I had in mind. And this implementation should not be public, I think.
Isn't the type guaranteed to be complete when shared_ptr calls delete?
No. The deleter is initialized at the shared_ptr construction and you can initialize shared_ptr with a pointer allocated somewhere else. At the point of shared_ptr construction the type may be incomplete.
I'm pretty sure that this warning shouldn't be dealt with within the shared_ptr framework, since it does seem to refer specifically to the boost::error_info's destructor. Does anyone have a simple cpp file and an exact g++ command line that triggers the warning? Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode