Boost logo

Boost :

Subject: Re: [boost] [fusion] flatten/flatten_view Proposal
From: TONGARI J (tongari95_at_[hidden])
Date: 2013-10-25 12:52:42


Hi Eric,

2013/10/26 Eric Niebler <eniebler_at_[hidden]>

> On 10/25/2013 2:40 AM, TONGARI J wrote:
> > 2013/10/24 Eric Niebler <eniebler_at_[hidden]>
> >
> >> On 10/23/2013 8:35 PM, TONGARI J wrote:
> >>>
> >>> I just tried to re-implement it by segments_impl, but seems to cause
> >> memory
> >>> violation.
> >>>
> >>> Code is attached. Could you shed some light on this?
> >>> (note: flatten_view should be writable if the underlying sequence is
> >>> writable)
> >>
> >> I'm afraid I really can't tell by looking at the code.
> >>
> >
> > I still can't figure out what went wrong with the simple segmented one.
> > If somebody can make it work, I'd like to compare both implementations.
> >
> > Joel?
>
> You haven't yet posted the code that reproduces the crash.
>

It's so simple to reproduce the crash. Sample code attached.

If you debug with MSVC, you'll see access violation.
With GCC you might get weird results and it probably crashes.

Thanks,




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk