|
Boost : |
Subject: Re: [boost] [spirit] hold_any invalid assignment to destructed object?
From: Rob Desbois (rob.desbois_at_[hidden])
Date: 2013-03-13 05:36:59
On Tuesday, 12 March 2013 22:21:05 UTC, Hartmut Kaiser wrote:
>
> > *snip*
> >
> > As I understand it, the object is destroyed _and then assigned to_; does
> > it not need to be constructed at this point, i.e. have something like
> this
> > (for the first specialisation):
> >
> > new (reinterpret_cast<T*>(dest)) T(
> > *reinterpret_cast<T const*>(src) );
> >
>
> Yes, your code looks about right. Would you care to submit a patch for me
> to
> apply?
>
Patch attached.
After looking through the file in more depth it seemed more sensible to do
away with the destruct-construct cycle and just assign directly.
Thanks
--rob
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk