Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-05-17 07:12:02


Hartmut Kaiser <hartmut.kaiser_at_[hidden]> writes:

> This I don't understand anymore. The code in question is:
>
> some_spirit_grammar g;
> boost::spirit::pt_parse(it, end, g);
>
> the programm crashes inside pt_parse because of g == 0xcccccccc (destroyed
> object), where pt_parse takes 'g' by const reference. Initially 'g' was
> defined as a function local static instance, which I've removed now because
> I had the suspicion CW8.x couldn't handle that correctly.
>
> Any clues?
> Regards Hartmut

Are you running into the CW 8.3 "CRTP bug" where casting to a derived
class reference can induce a copy?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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