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