|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58088 - in trunk/boost: . exception
From: emil_at_[hidden]
Date: 2009-12-01 14:48:58
Author: emildotchevski
Date: 2009-12-01 14:48:58 EST (Tue, 01 Dec 2009)
New Revision: 58088
URL: http://svn.boost.org/trac/boost/changeset/58088
Log:
Ticket #3211
Text files modified:
trunk/boost/exception/exception.hpp | 62 +++++++++++++++++++++++++--------------
trunk/boost/throw_exception.hpp | 1
2 files changed, 41 insertions(+), 22 deletions(-)
Modified: trunk/boost/exception/exception.hpp
==============================================================================
--- trunk/boost/exception/exception.hpp (original)
+++ trunk/boost/exception/exception.hpp 2009-12-01 14:48:58 EST (Tue, 01 Dec 2009)
@@ -133,6 +133,15 @@
template <class E,class Tag,class T>
E const & operator<<( E const &, error_info<Tag,T> const & );
+ template <class E>
+ E const & operator<<( E const &, throw_function const & );
+
+ template <class E>
+ E const & operator<<( E const &, throw_file const & );
+
+ template <class E>
+ E const & operator<<( E const &, throw_line const & );
+
class exception;
template <class>
@@ -205,34 +214,19 @@
#endif
;
+#if defined(__MWERKS__) && __MWERKS__<=0x3207
+ public:
+#else
private:
template <class E>
- friend
- E const &
- operator<<( E const & x, throw_function const & y )
- {
- x.throw_function_=y.v_;
- return x;
- }
+ friend E const & operator<<( E const &, throw_function const & );
template <class E>
- friend
- E const &
- operator<<( E const & x, throw_file const & y )
- {
- x.throw_file_=y.v_;
- return x;
- }
+ friend E const & operator<<( E const &, throw_file const & );
template <class E>
- friend
- E const &
- operator<<( E const & x, throw_line const & y )
- {
- x.throw_line_=y.v_;
- return x;
- }
+ friend E const & operator<<( E const &, throw_line const & );
friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
@@ -244,7 +238,7 @@
friend struct exception_detail::get_info<throw_function>;
friend struct exception_detail::get_info<throw_file>;
friend struct exception_detail::get_info<throw_line>;
-
+#endif
mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
mutable char const * throw_function_;
mutable char const * throw_file_;
@@ -257,6 +251,30 @@
{
}
+ template <class E>
+ E const &
+ operator<<( E const & x, throw_function const & y )
+ {
+ x.throw_function_=y.v_;
+ return x;
+ }
+
+ template <class E>
+ E const &
+ operator<<( E const & x, throw_file const & y )
+ {
+ x.throw_file_=y.v_;
+ return x;
+ }
+
+ template <class E>
+ E const &
+ operator<<( E const & x, throw_line const & y )
+ {
+ x.throw_line_=y.v_;
+ return x;
+ }
+
////////////////////////////////////////////////////////////////////////
namespace
Modified: trunk/boost/throw_exception.hpp
==============================================================================
--- trunk/boost/throw_exception.hpp (original)
+++ trunk/boost/throw_exception.hpp 2009-12-01 14:48:58 EST (Tue, 01 Dec 2009)
@@ -22,6 +22,7 @@
#include <boost/exception/detail/attribute_noreturn.hpp>
#include <boost/detail/workaround.hpp>
+#include <boost/config.hpp>
#include <exception>
#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk