Boost logo

Boost :

Subject: Re: [boost] [variant] compatibility with move-constructible objects
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-02-23 10:01:27

On 02/23/10 00:04, Zachary Turner wrote:
> Also, for the record, i realize the problem is probably related to
> variant requiring its bounded types to support the CopyConstructible
> concept, but my question is more along the lines of whether this
> requirement can be eliminated or relaxed in the presence of r-value
> refernces. I.e. Something along the lines of requiring one or more of
> CopyConstructible, MoveConstructible.

I don't know about r-value references as a solution; however,
would one possible workaround be to derive from unique_ptr and
then in the derived unique_ptr provide a copy CTOR?

Although not for boost::variant, something like that was done in
composite_tagged_seq.recur.test.cpp in in
The derived unique_ptr was:




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