|
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 composite_tagged_seq.zip in
http://www.boostpro.com/vault/index.php?&directory=Data%20Structures.
The derived unique_ptr was:
boost::composite_tagged_recur::unique_ptr
HTH.
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk