Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-08-15 10:23:40


From: "david_at_2good" <david_at_[hidden]>
> --- In Boost-Users_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> > From: "david_at_2good" <david_at_2...>
> > > I am using the free C++Builder Compiler version 5.5.1 for Win32.
> > > (http://www.borland.com/products/downloads/download_cbuilder.html)
> > >
> > > I have used Boost 1.27 without problems, but when compiling the same
> > > code with Boost 1.28 I get this error message for the compiler:
> > >
> > > Error E2113 c:\borland\boost_1_28_0\boost/detail/shared_count.hpp 39:
> > > Virtual function 'use_count_is_zero::what() const throw()' conflicts
> > > with base class 'exception'
> >
> > Seems to work for me with the same compiler. Have you installed the
> service
> > packs?
>
> Good idea! I didn't know there were any for the free compiler but I
> downloaded and installed them. No difference, though.
>
> 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?


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