ChipMaster's trial hacks on C++CMS starting with v1.2.1. Not sure I'll follow on with the v2 since it looks to be breaking and mostly frivolous.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

57 lines
1.4 KiB

  1. #ifndef BOOSTER_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
  2. #define BOOSTER_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
  3. //
  4. // boost/smart_ptr/bad_weak_ptr.hpp
  5. //
  6. // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
  7. //
  8. // Distributed under the Boost Software License, Version 1.0. (See
  9. // accompanying file LICENSE_1_0.txt or copy at
  10. // http://www.boost.org/LICENSE_1_0.txt)
  11. //
  12. #include <booster/backtrace.h>
  13. #ifdef __BORLANDC__
  14. # pragma warn -8026 // Functions with excep. spec. are not expanded inline
  15. #endif
  16. namespace booster
  17. {
  18. // The standard library that comes with Borland C++ 5.5.1, 5.6.4
  19. // defines std::exception and its members as having C calling
  20. // convention (-pc). When the definition of bad_weak_ptr
  21. // is compiled with -ps, the compiler issues an error.
  22. // Hence, the temporary #pragma option -pc below.
  23. #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
  24. # pragma option push -pc
  25. #endif
  26. ///
  27. /// An exeption that is throws in case of creating of shared_ptr from expired weak_ptr
  28. ///
  29. class bad_weak_ptr: public booster::exception
  30. {
  31. public:
  32. virtual char const * what() const throw()
  33. {
  34. return "booster::bad_weak_ptr";
  35. }
  36. };
  37. #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
  38. # pragma option pop
  39. #endif
  40. } // namespace boost
  41. #ifdef __BORLANDC__
  42. # pragma warn .8026 // Functions with excep. spec. are not expanded inline
  43. #endif
  44. #endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED