From: Thomas Matelich (sosedada_at_[hidden])
Date: 2000-04-07 00:24:30
Todd Greer wrote:
> Thomas Matelich tmatelich_at_[hidden] writes:
> > This probably applies to all of the smart pointers, I just haven't
> > them. My problem is that I'm replacing some dumb pointers with
> > shared_ptr and now, I can't use forward references in my headers.
> > I can as long as every class used with shared_ptrs is included in
> > C file that includes the shared_ptr, in which case I might as will
> > include the header rather than forward declare.
> > The error involves deletion of incomplete type. Oops just noticed
> > its a warning. In any case, I would like to avoid the warning.
> > have other people done with regards to this?
> Define your dtor out-of-line in the C file, where the type is
> complete. An empty dtor is fine. This will cause the dtor of the
> smart pointer to be instantiated there, so it will see the complete
> type. This will be necessary for any normal variety of smart
> pointer--some will need copying to be defined out-of-line also.
> Todd Greer tgreer_at_[hidden]
Greg Colvin's little bump upside the head forced me to figure out what
you meant, rather than jump to conclusions. I lazily left it with the
includes. However, today I ran into this again, and verified that my
destructor did exist and was in the C file, and I still get the error!
Perhaps it is a MSVC problem? Can anyone confirm or deny this?
-- Thomas O Matelich Senior Software Designer Zetec, Inc. sosedada_at_[hidden] tmatelich_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk