bad_weak_ptr.hpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
  2. #define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED
  3. // MS compatible compilers support #pragma once
  4. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  5. # pragma once
  6. #endif
  7. //
  8. // boost/smart_ptr/bad_weak_ptr.hpp
  9. //
  10. // Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
  11. //
  12. // Distributed under the Boost Software License, Version 1.0. (See
  13. // accompanying file LICENSE_1_0.txt or copy at
  14. // http://www.boost.org/LICENSE_1_0.txt)
  15. //
  16. #include <boost/config.hpp>
  17. #include <exception>
  18. namespace boost
  19. {
  20. #if defined(BOOST_CLANG)
  21. // Intel C++ on Mac defines __clang__ but doesn't support the pragma
  22. # pragma clang diagnostic push
  23. # pragma clang diagnostic ignored "-Wweak-vtables"
  24. #endif
  25. class bad_weak_ptr: public std::exception
  26. {
  27. public:
  28. char const * what() const noexcept override
  29. {
  30. return "tr1::bad_weak_ptr";
  31. }
  32. };
  33. #if defined(BOOST_CLANG)
  34. # pragma clang diagnostic pop
  35. #endif
  36. } // namespace boost
  37. #endif // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED