nitpicking

[SVN r48488]
This commit is contained in:
Emil Dotchevski
2008-08-31 04:05:19 +00:00
parent 5c84929742
commit 5d4c014f5b
14 changed files with 4525 additions and 4526 deletions

File diff suppressed because it is too large Load Diff

View File

@ -3,14 +3,4 @@
//Distributed under the Boost Software License, Version 1.0. (See accompanying
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef UUID_0E57632CCA3011DCB876FD9955D89593
#define UUID_0E57632CCA3011DCB876FD9955D89593
namespace
boost
{
template <class Tag,class T>
class error_info;
}
#endif
namespace boost { template <class Tag,class T> class error_info; }

View File

@ -119,6 +119,12 @@ boost
template <class>
class shared_ptr;
template <class Tag,class T>
class error_info;
template <class E,class Tag,class T>
E const & operator<<( E const &, error_info<Tag,T> const & );
namespace
exception_detail
{
@ -135,9 +141,7 @@ boost
};
template <class ErrorInfo>
shared_ptr<typename ErrorInfo::value_type const> get_data( exception const & );
void set_data( exception const *, shared_ptr<exception_detail::error_info_base const> const &, type_info_ const & );
shared_ptr<typename ErrorInfo::value_type const> get_info( exception const & );
}
class
@ -177,10 +181,11 @@ boost
private:
template <class ErrorInfo>
friend shared_ptr<typename ErrorInfo::value_type const> exception_detail::get_data( exception const & );
template <class E,class Tag,class T>
friend E const & operator<<( E const &, error_info<Tag,T> const & );
friend void exception_detail::set_data( exception const *, shared_ptr<exception_detail::error_info_base const> const &, exception_detail::type_info_ const & );
template <class ErrorInfo>
friend shared_ptr<typename ErrorInfo::value_type const> exception_detail::get_info( exception const & );
mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
};

View File

@ -20,7 +20,7 @@ boost
template <class ErrorInfo>
inline
shared_ptr<typename ErrorInfo::value_type const>
get_data( exception const & x )
get_info( exception const & x )
{
if( exception_detail::error_info_container * c=x.data_.get() )
if( shared_ptr<exception_detail::error_info_base const> eib = c->get(BOOST_EXCEPTION_STATIC_TYPEID(ErrorInfo)) )
@ -41,7 +41,7 @@ boost
shared_ptr<typename ErrorInfo::value_type const>
get_error_info( boost::exception const & x )
{
return exception_detail::get_data<ErrorInfo>(x);
return exception_detail::get_info<ErrorInfo>(x);
}
#else
template <class ErrorInfo,class E>
@ -50,7 +50,7 @@ boost
get_error_info( E const & some_exception )
{
if( exception const * x = dynamic_cast<exception const *>(&some_exception) )
return exception_detail::get_data<ErrorInfo>(*x);
return exception_detail::get_info<ErrorInfo>(*x);
else
return shared_ptr<typename ErrorInfo::value_type const>();
}

View File

@ -146,16 +146,6 @@ boost
delete this;
}
};
inline
void
set_data( exception const * e, shared_ptr<exception_detail::error_info_base const> const & x, exception_detail::type_info_ const & typeid_ )
{
exception_detail::error_info_container * c;
if( !(c=e->data_.get()) )
e->data_.adopt(c=new exception_detail::error_info_container_impl);
c->set(x,typeid_);
}
}
template <class E,class Tag,class T>
@ -165,8 +155,11 @@ boost
{
typedef error_info<Tag,T> error_info_tag_t;
shared_ptr<error_info_tag_t> p( new error_info_tag_t(v) );
exception_detail::set_data(&x,p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
return x;
exception_detail::error_info_container * c;
if( !(c=x.data_.get()) )
x.data_.adopt(c=new exception_detail::error_info_container_impl);
c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
return x;
}
}

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception/diagnostic_information.hpp>
#include <boost/exception/diagnostic_information.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception/error_info.hpp>
#include <boost/exception/error_info.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception.hpp>
#include <boost/exception.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception_ptr.hpp>
#include <boost/exception_ptr.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception/get_error_info.hpp>
#include <boost/exception/get_error_info.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception/info.hpp>
#include <boost/exception/info.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception/info_tuple.hpp>
#include <boost/exception/info_tuple.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception/to_string.hpp>
#include <boost/exception/to_string.hpp>

View File

@ -4,3 +4,4 @@
//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/exception/to_string_stub.hpp>
#include <boost/exception/to_string_stub.hpp>