]> git.lyx.org Git - lyx.git/blob - boost/boost/smart_ptr/bad_weak_ptr.hpp
How about if we write a script to do some of this and stop doing it
[lyx.git] / boost / boost / smart_ptr / bad_weak_ptr.hpp
1 #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED\r
2 #define BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED\r
3 \r
4 // MS compatible compilers support #pragma once\r
5 \r
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)\r
7 # pragma once\r
8 #endif\r
9 \r
10 //\r
11 //  boost/smart_ptr/bad_weak_ptr.hpp\r
12 //\r
13 //  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.\r
14 //\r
15 // Distributed under the Boost Software License, Version 1.0. (See\r
16 // accompanying file LICENSE_1_0.txt or copy at\r
17 // http://www.boost.org/LICENSE_1_0.txt)\r
18 //\r
19 \r
20 #include <exception>\r
21 \r
22 #ifdef __BORLANDC__\r
23 # pragma warn -8026     // Functions with excep. spec. are not expanded inline\r
24 #endif\r
25 \r
26 namespace boost\r
27 {\r
28 \r
29 // The standard library that comes with Borland C++ 5.5.1, 5.6.4\r
30 // defines std::exception and its members as having C calling\r
31 // convention (-pc). When the definition of bad_weak_ptr\r
32 // is compiled with -ps, the compiler issues an error.\r
33 // Hence, the temporary #pragma option -pc below.\r
34 \r
35 #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564\r
36 # pragma option push -pc\r
37 #endif\r
38 \r
39 class bad_weak_ptr: public std::exception\r
40 {\r
41 public:\r
42 \r
43     virtual char const * what() const throw()\r
44     {\r
45         return "tr1::bad_weak_ptr";\r
46     }\r
47 };\r
48 \r
49 #if defined(__BORLANDC__) && __BORLANDC__ <= 0x564\r
50 # pragma option pop\r
51 #endif\r
52 \r
53 } // namespace boost\r
54 \r
55 #ifdef __BORLANDC__\r
56 # pragma warn .8026     // Functions with excep. spec. are not expanded inline\r
57 #endif\r
58 \r
59 #endif  // #ifndef BOOST_SMART_PTR_BAD_WEAK_PTR_HPP_INCLUDED\r