$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Spirit?] core dump in endl?
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2010-04-11 18:24:36
> I enclose a Spirit parser with two BOOST_FOREACH loops, one of which
> works and the other coredumps.
> I also enclose a gdb backtrace.
>
> Can you explain what's going on here?
If you add the return statement to your operator<<(), everything will be
fine.
For instance:
std::ostream& operator<<(std::ostream& o, const test& b) {
b.print(o);
return o; // <-- here
};
Regards Hartmut
---------------
Meet me at BoostCon
www.boostcon.com