CppCMS
booster/bad_weak_ptr.h
00001 #ifndef BOOSTER_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
00002 #define BOOSTER_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
00003 
00004 //
00005 //  boost/smart_ptr/bad_weak_ptr.hpp
00006 //
00007 //  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
00008 //
00009 // Distributed under the Boost Software License, Version 1.0. (See
00010 // accompanying file LICENSE_1_0.txt or copy at
00011 // http://www.boost.org/LICENSE_1_0.txt)
00012 //
00013 
00014 #include <booster/backtrace.h>
00015 
00016 #ifdef __BORLANDC__
00017 # pragma warn -8026     // Functions with excep. spec. are not expanded inline
00018 #endif
00019 
00020 namespace booster
00021 {
00022 
00023 // The standard library that comes with Borland C++ 5.5.1, 5.6.4
00024 // defines std::exception and its members as having C calling
00025 // convention (-pc). When the definition of bad_weak_ptr
00026 // is compiled with -ps, the compiler issues an error.
00027 // Hence, the temporary #pragma option -pc below.
00028 
00029 #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
00030 # pragma option push -pc
00031 #endif
00032 
00036 class bad_weak_ptr: public booster::exception
00037 {
00038 public:
00039 
00040     virtual char const * what() const throw()
00041     {
00042         return "booster::bad_weak_ptr";
00043     }
00044 };
00045 
00046 #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
00047 # pragma option pop
00048 #endif
00049 
00050 } // namespace boost
00051 
00052 #ifdef __BORLANDC__
00053 # pragma warn .8026     // Functions with excep. spec. are not expanded inline
00054 #endif
00055 
00056 #endif  // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED