#pragma option -pc around use_count_is_zero added for Borland 5.5.1, to enable compilation with -ps set.

[SVN r14927]
This commit is contained in:
Peter Dimov
2002-08-16 15:55:19 +00:00
parent a09c2e556f
commit 8436c4d271

View File

@@ -38,16 +38,31 @@
namespace boost namespace boost
{ {
// The standard library that comes with Borland C++ 5.5.1
// defines std::exception and its members as having C calling
// convention (-pc). When the definition of use_count_is_zero
// is compiled with -ps, the compiler issues an error.
// Hence, the temporary #pragma option -pc below. The version
// check is deliberately conservative.
#if defined(__BORLANDC__) && __BORLANDC__ == 0x551
# pragma option push -pc
#endif
class use_count_is_zero: public std::exception class use_count_is_zero: public std::exception
{ {
public: public:
virtual char const * what() const throw() virtual char const * what() const throw()
{ {
return "use_count_is_zero"; return "boost::use_count_is_zero";
} }
}; };
#if defined(__BORLANDC__) && __BORLANDC__ == 0x551
# pragma option pop
#endif
class counted_base class counted_base
{ {
private: private: