Boost logo

Boost :

From: Eric Friedman (ebf_at_[hidden])
Date: 2003-04-02 21:14:44

Gennadiy Rozental wrote:
> > > 3. Copy Constructible/Assignable requirements on bounded types
> > > This only need to be required if variant should have appropriate
> > > feature.
> >
> > I disagree. As-is, every variant object requires CopyConstructible
> > bounded types, as it is the only way to construct its content.
> >
> > Some notes, however. I may be able to eliminate the Assignable
> > requirement altogether by modifying the implementation of
> > variant::swap. As well, there has been some discussion about in-place
> > construction, which could eliminate the CopyConstructible requirement
> > except in cases of actual variant copying. (This conversation occurred
> > with regard to optional, but could work with equal applicability to
> > variant.)
> I think it's the way to go. This implementation issue shouldn't affect
> overall design. It would be a pity if we couldn't use variant for
> noncopyable types.

OK, I'll certainly work to eliminate the Assignable requirement altogether.
As well, I will discuss with Fernando his progress on in-place construction,
which will make CopyConstructible an optional requirement.

Let me know if there are further issues to be considered in this regard.


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