Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::spirit program crashes
From: Joel de Guzman (joel_at_[hidden])
Date: 2010-03-26 10:52:30


On 3/26/2010 9:43 PM, Lars Rohwedder wrote:
>
> I solved the problem by writing
>
> // unchanged:
> struct Configurable { const char* name; const rule<>& rule; };
>
> // make an explicit object here, not a bound temporary:
> const rule<> myRule = +(__)>>(...);
>
> // bound the reference to the copy:
> const Configurable cfg = {"Name", myRule };
>
> and it seems to work. :-)

Yes, that will work.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel
Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net