]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/exception/current_exception_cast.hpp
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / boost / boost / exception / current_exception_cast.hpp
CommitLineData
7c673cae
FG
1//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
2
3//Distributed under the Boost Software License, Version 1.0. (See accompanying
4//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
f67539c2
TL
6#ifndef BOOST_EXCEPTION_7E83C166200811DE885E826156D89593
7#define BOOST_EXCEPTION_7E83C166200811DE885E826156D89593
8
9#ifndef BOOST_EXCEPTION_ENABLE_WARNINGS
10#if __GNUC__*100+__GNUC_MINOR__>301
7c673cae
FG
11#pragma GCC system_header
12#endif
f67539c2
TL
13#ifdef __clang__
14#pragma clang system_header
15#endif
16#ifdef _MSC_VER
7c673cae
FG
17#pragma warning(push,1)
18#endif
f67539c2 19#endif
7c673cae
FG
20
21namespace
22boost
23 {
24 template <class E>
25 inline
26 E *
27 current_exception_cast()
28 {
29 try
30 {
31 throw;
32 }
33 catch(
34 E & e )
35 {
36 return &e;
37 }
38 catch(
39 ...)
40 {
41 return 0;
42 }
43 }
44 }
45
46#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
47#pragma warning(pop)
48#endif
49#endif