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 | |
6 | #ifndef UUID_63EE924290FB11DC87BB856555D89593 |
7 | #define UUID_63EE924290FB11DC87BB856555D89593 |
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/tuple/tuple.hpp> |
17 | |
18 | namespace |
19 | boost |
20 | { |
21 | template < |
22 | class E > |
23 | inline |
24 | E const & |
25 | operator<<( |
26 | E const & x, |
27 | tuple< > const & v ) |
28 | { |
29 | return x; |
30 | } |
31 | |
32 | template < |
33 | class E, |
34 | class Tag1,class T1 > |
35 | inline |
36 | E const & |
37 | operator<<( |
38 | E const & x, |
39 | tuple< |
40 | error_info<Tag1,T1> > const & v ) |
41 | { |
42 | return x << v.template get<0>(); |
43 | } |
44 | |
45 | template < |
46 | class E, |
47 | class Tag1,class T1, |
48 | class Tag2,class T2 > |
49 | inline |
50 | E const & |
51 | operator<<( |
52 | E const & x, |
53 | tuple< |
54 | error_info<Tag1,T1>, |
55 | error_info<Tag2,T2> > const & v ) |
56 | { |
57 | return x << v.template get<0>() << v.template get<1>(); |
58 | } |
59 | |
60 | template < |
61 | class E, |
62 | class Tag1,class T1, |
63 | class Tag2,class T2, |
64 | class Tag3,class T3 > |
65 | inline |
66 | E const & |
67 | operator<<( |
68 | E const & x, |
69 | tuple< |
70 | error_info<Tag1,T1>, |
71 | error_info<Tag2,T2>, |
72 | error_info<Tag3,T3> > const & v ) |
73 | { |
74 | return x << v.template get<0>() << v.template get<1>() << v.template get<2>(); |
75 | } |
76 | |
77 | template < |
78 | class E, |
79 | class Tag1,class T1, |
80 | class Tag2,class T2, |
81 | class Tag3,class T3, |
82 | class Tag4,class T4 > |
83 | inline |
84 | E const & |
85 | operator<<( |
86 | E const & x, |
87 | tuple< |
88 | error_info<Tag1,T1>, |
89 | error_info<Tag2,T2>, |
90 | error_info<Tag3,T3>, |
91 | error_info<Tag4,T4> > const & v ) |
92 | { |
93 | return x << v.template get<0>() << v.template get<1>() << v.template get<2>() << v.template get<3>(); |
94 | } |
95 | } |
96 | |
97 | #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) |
98 | #pragma warning(pop) |
99 | #endif |
100 | #endif |
101 | |