
12 Apr
2010
12 Apr
'10
6:09 a.m.
Hartmut Kaiser wrote:
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
I use VS, 2008. My paste and run, that was obvious from the compiler error and knowing the stream call must return the stream. What is this that it would compile and run without a proper return?!? Best, Dan.