1 | //Copyright (c) 2006-2013 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 | |
6 | #ifndef UUID_9011016A11A711E3B46CD9FA6088709B |
7 | #define UUID_9011016A11A711E3B46CD9FA6088709B |
8 | #if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) |
9 | #pragma GCC system_header |
10 | #endif |
11 | #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) |
12 | #pragma warning(push,1) |
13 | #endif |
14 | |
15 | #include <boost/exception/info.hpp> |
16 | #include <boost/exception/get_error_info.hpp> |
17 | |
18 | namespace |
19 | boost |
20 | { |
21 | //Here we're using the boost::error_info machinery to store the info in the exception |
22 | //object. Within the context of N3757, this is strictly an implementation detail. |
23 | |
24 | template <class Tag> |
25 | inline |
26 | void |
27 | exception:: |
28 | set( typename Tag::type const & v ) |
29 | { |
30 | exception_detail::set_info(*this,error_info<Tag,typename Tag::type>(v)); |
31 | } |
32 | |
33 | template <class Tag> |
34 | inline |
35 | typename Tag::type const * |
36 | exception:: |
37 | get() const |
38 | { |
39 | return get_error_info<error_info<Tag,typename Tag::type> >(*this); |
40 | } |
41 | } |
42 | |
43 | #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) |
44 | #pragma warning(pop) |
45 | #endif |
46 | #endif |
47 | |