|
Boost : |
Subject: Re: [boost] gcc 4.4.3 + boost optional 1.40 crash
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2012-11-23 03:46:26
On Fri, Nov 23, 2012 at 12:28 PM, Gaetano Mendola <mendola_at_[hidden]> wrote:
> Hi all,
> after banging my head for an entire day I come out with this
> test case showing a possible bug in gcc 4.4.3 or in boost optional,
> the test crashes with a pure virtual method called only if compiled
> only with -O1, -O2, -O3.
> The same code in another machine with gcc 4.7.2 and boost 1.49 works
> fine.
The only virtual function I see is B::bar so I assume that's where it
breaks. That's only possible if the compiler messed up the second D's
construction somehow. IMO, this is a compiler issue since optional is
not used with D. Did you try to accept the D::foo argument by const
reference instead of by value?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk