Boost logo

Boost :

Subject: Re: [boost] [move] will boost::rv work with types with virtual destructor?
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2010-02-25 14:35:31

DE wrote:
> sorry for a dumb question
> i noticed boost move lib mentioned in a recent message and decided to
> look at it
> i noticed that destructor for boost::rv class is declared but not
> defined so it can no longer be generated automatically
> then if an arbitrary type has a virtual destructor and we want to
> parameterize the boost::rv template with it a vtable for the
> boost::rv<type> must be generated
> among other things it must hold a pointer to rv<type>::~rv which is
> not defined
> is that really a problem?
> --
> Pavel

boost::rv<T> is never (and cannot be) instantiated. You only ever refer
to references (for lack of better wording at the moment) to
boost::rv<T>. It's purpose is really only to statically tag an object
of type T as movable, yet still be able to access the object's member

So no, the lack of constructors and destructor is not a problem ;)

- Jeff

Boost list run by bdawes at, gregod at, cpdaniel at, john at