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