Boost logo

Boost :

From: Howard Hinnant (hinnant_at_[hidden])
Date: 2004-06-15 07:45:16


On Jun 14, 2004, at 1:18 PM, Joaquín Mª López Muñoz wrote:

> *Without* enabling the option "ISO C++ Template Parser", everything
> works dandy and the program output is:
>
> calling A::bar
> inside A::bar
> ~foo
> calling B::bar
> inside B::bar
> ~foo
>
> But if I enable the "ISO C++ Template Parser", the output becomes:
>
> calling A::bar
> ~foo
> inside A::bar
> calling B::bar
> inside B::bar
> ~foo
>
> Which is AFAICS a flagrant bug (note that ~foo() is called before
> A::bar()
> scope ends.)
>
> Fortunately, I know how to patch this in CW 8.3 with some pragmas.
> I'd be grateful if someone with access to CW 9.2 can check whether the
> error persists in this newer version of the compiler, so as to extend
> (or not)
> the patch to cover it as well. Remember, the problem only shows when
> the "ISO C++ Template Parser" is turned on.

With "ISO C++ Template Parser" turned on I get:

3200
calling A::bar
inside A::bar
~foo
calling B::bar
inside B::bar
~foo

I added:

   std::cout << std::hex << __MWERKS__ << '\n';

in the hope that that would be helpful.

-Howard


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk