williamr@2: #ifndef BOOST_BAD_WEAK_PTR_HPP_INCLUDED williamr@2: #define BOOST_BAD_WEAK_PTR_HPP_INCLUDED williamr@2: williamr@2: // MS compatible compilers support #pragma once williamr@2: williamr@2: #if defined(_MSC_VER) && (_MSC_VER >= 1020) williamr@2: # pragma once williamr@2: #endif williamr@2: williamr@2: // williamr@2: // detail/bad_weak_ptr.hpp williamr@2: // williamr@2: // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd. williamr@2: // williamr@2: // Distributed under the Boost Software License, Version 1.0. (See williamr@2: // accompanying file LICENSE_1_0.txt or copy at williamr@2: // http://www.boost.org/LICENSE_1_0.txt) williamr@2: // williamr@2: williamr@2: #include williamr@2: williamr@2: #ifdef __BORLANDC__ williamr@2: # pragma warn -8026 // Functions with excep. spec. are not expanded inline williamr@2: #endif williamr@2: williamr@2: namespace boost williamr@2: { williamr@2: williamr@2: // The standard library that comes with Borland C++ 5.5.1, 5.6.4 williamr@2: // defines std::exception and its members as having C calling williamr@2: // convention (-pc). When the definition of bad_weak_ptr williamr@2: // is compiled with -ps, the compiler issues an error. williamr@2: // Hence, the temporary #pragma option -pc below. williamr@2: williamr@2: #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 williamr@2: # pragma option push -pc williamr@2: #endif williamr@2: williamr@2: class bad_weak_ptr: public std::exception williamr@2: { williamr@2: public: williamr@2: williamr@2: virtual char const * what() const throw() williamr@2: { williamr@2: return "tr1::bad_weak_ptr"; williamr@2: } williamr@2: }; williamr@2: williamr@2: #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564 williamr@2: # pragma option pop williamr@2: #endif williamr@2: williamr@2: } // namespace boost williamr@2: williamr@2: #ifdef __BORLANDC__ williamr@2: # pragma warn .8026 // Functions with excep. spec. are not expanded inline williamr@2: #endif williamr@2: williamr@2: #endif // #ifndef BOOST_BAD_WEAK_PTR_HPP_INCLUDED