]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/exception/current_exception_cast.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
bc7f97a3881d5196fefa3b2acb1a7541568651d5
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / exception / current_exception_cast.hpp
1 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.\r
2 \r
3 //Distributed under the Boost Software License, Version 1.0. (See accompanying\r
4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r
5 \r
6 #ifndef UUID_7E83C166200811DE885E826156D89593\r
7 #define UUID_7E83C166200811DE885E826156D89593\r
8 #if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
9 #pragma GCC system_header\r
10 #endif\r
11 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
12 #pragma warning(push,1)\r
13 #endif\r
14 \r
15 namespace\r
16 boost\r
17     {\r
18     template <class E>\r
19     inline\r
20     E *\r
21     current_exception_cast()\r
22         {\r
23         try\r
24             {\r
25             throw;\r
26             }\r
27         catch(\r
28         E & e )\r
29             {\r
30             return &e;\r
31             }\r
32         catch(\r
33         ...)\r
34             {\r
35             return 0;\r
36             }\r
37         }\r
38     }\r
39 \r
40 #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)\r
41 #pragma warning(pop)\r
42 #endif\r
43 #endif\r