Boost logo

Boost Users :

From: david_at_2good (david_at_[hidden])
Date: 2002-08-15 10:46:15


--- In Boost-Users_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: "david_at_2good" <david_at_2...>
> > But trying even harder, I examined the compiler flags used by the
> > framework I use. The framework uses the Stdcall calling sequence
for
> > function calls by sending the -ps switch to the compiler. Without
that
> > switch, everything works fine. With the flag, the error above.
Now I
> > just have to figure out why this is a problem... hints, anyone?
>
> The reason is that <exception> (exceptio.h) contains
>
> #pragma option push -b -a8 -pc -Vx- -Ve- -w-inl -w-aus -w-sig
>
> as its first line, making standard-conformant code a bit difficult
to
> compile under -ps.
>
> I can surround the use_count_is_zero definition with #pragma option
> push -pc, but is this the right thing to do?

I surrounded the place where I include boost/shared_ptr.hpp and
boost/shared_array.hpp with the #pragma option push/pop. Not a very
elegant solution, but it seems to do the trick.

Surrounding the use_count_is_zero definition with the #pragmas would
allow Boost to handle this case on its own, which is a Good Thing, but
clutters the code with compiler-specific #ifdefs.

Thank you very much for your help,

David


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