From: "david_at_2good"
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
--- In Boost-Users@y..., "Peter Dimov"
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