Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost Graph Very Strange Behavior
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-08-20 19:03:54


On Sun, 21 Aug 2011, Alexander Feldman wrote:

> Dear All,
>
> I have upgraded to Boost 1.47.0 and I have spent a day on the following
> strange behavior that someone who knows Boost better may explain to me.
> Consider the source below. If I uncomment the line:
>
> //cout << "";
>
> in line 39, then the program starts working, i.e., it outputs:
>
> 0x1
>
> If I comment out line 39, then I get
>
> 0
>
> There are no memory leaks.
>
> This kind of stuff gives me nightmares.
>
> Thanks for your help and sorry for the longish example.

I tried your example with GCC 4.6 on Linux and it worked just fine, both
with and without the printout. BTW, it is not recommended to inherit from
BGL (or STL) objects since they do not have virtual destructors and are
not meant for that usage.

-- Jeremiah Willcock


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