Ticket #12553, plus tabs converted to spaces.

This commit is contained in:
Emil Dotchevski
2016-10-26 11:51:40 -07:00
parent 27598f92db
commit e1378f7aef
7 changed files with 108 additions and 108 deletions

View File

@ -43,7 +43,7 @@ boost
error_info: error_info:
public exception_detail::error_info_base public exception_detail::error_info_base
{ {
public: public:
typedef T value_type; typedef T value_type;
@ -67,7 +67,7 @@ boost
return value_; return value_;
} }
private: private:
error_info & operator=( error_info const & ); error_info & operator=( error_info const & );
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
error_info & operator=( error_info && x ); error_info & operator=( error_info && x );

View File

@ -47,27 +47,27 @@ boost
} }
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class Tag,class T>
inline
error_info<Tag,T>::
error_info( error_info const & x ):
value_(x.value_)
{
}
template <class Tag,class T> template <class Tag,class T>
inline inline
error_info<Tag,T>:: error_info<Tag,T>::
error_info( value_type && value ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(value)))): error_info( error_info const & x ):
value_(std::move(value)) value_(x.value_)
{ {
} }
template <class Tag,class T> template <class Tag,class T>
inline inline
error_info<Tag,T>:: error_info<Tag,T>::
error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.value_)))): error_info( value_type && value ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(value)))):
value_(std::move(x.value_)) value_(std::move(value))
{ {
} }
template <class Tag,class T>
inline
error_info<Tag,T>::
error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.value_)))):
value_(std::move(x.value_))
{
}
#endif #endif
template <class Tag,class T> template <class Tag,class T>
@ -202,79 +202,79 @@ boost
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class E,class Tag,class T> template <class E,class Tag,class T>
E const & set_info( E const &, error_info<Tag,T> && ); E const & set_info( E const &, error_info<Tag,T> && );
template <class T> template <class T>
class set_info_rv; struct set_info_rv;
template <class Tag,class T> template <class Tag,class T>
class class
set_info_rv<error_info<Tag,T> > set_info_rv<error_info<Tag,T> >
{ {
template <class E,class Tag1,class T1> template <class E,class Tag1,class T1>
friend E const & set_info( E const &, error_info<Tag1,T1> && ); friend E const & set_info( E const &, error_info<Tag1,T1> && );
template <class E> template <class E>
static static
E const & E const &
set( E const & x, error_info<Tag,T> && v ) set( E const & x, error_info<Tag,T> && v )
{ {
typedef error_info<Tag,T> error_info_tag_t; typedef error_info<Tag,T> error_info_tag_t;
shared_ptr<error_info_tag_t> p( new error_info_tag_t(std::move(v)) ); shared_ptr<error_info_tag_t> p( new error_info_tag_t(std::move(v)) );
exception_detail::error_info_container * c=x.data_.get(); exception_detail::error_info_container * c=x.data_.get();
if( !c ) if( !c )
x.data_.adopt(c=new exception_detail::error_info_container_impl); x.data_.adopt(c=new exception_detail::error_info_container_impl);
c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t)); c->set(p,BOOST_EXCEPTION_STATIC_TYPEID(error_info_tag_t));
return x; return x;
} }
}; };
template <> template <>
class class
set_info_rv<throw_function> set_info_rv<throw_function>
{ {
template <class E,class Tag1,class T1> template <class E,class Tag1,class T1>
friend E const & set_info( E const &, error_info<Tag1,T1> && ); friend E const & set_info( E const &, error_info<Tag1,T1> && );
template <class E> template <class E>
static static
E const & E const &
set( E const & x, throw_function && y ) set( E const & x, throw_function && y )
{ {
x.throw_function_=y.v_; x.throw_function_=y.v_;
return x; return x;
} }
}; };
template <> template <>
class class
set_info_rv<throw_file> set_info_rv<throw_file>
{ {
template <class E,class Tag1,class T1> template <class E,class Tag1,class T1>
friend E const & set_info( E const &, error_info<Tag1,T1> && ); friend E const & set_info( E const &, error_info<Tag1,T1> && );
template <class E> template <class E>
static static
E const & E const &
set( E const & x, throw_file && y ) set( E const & x, throw_file && y )
{ {
x.throw_file_=y.v_; x.throw_file_=y.v_;
return x; return x;
} }
}; };
template <> template <>
class class
set_info_rv<throw_line> set_info_rv<throw_line>
{ {
template <class E,class Tag1,class T1> template <class E,class Tag1,class T1>
friend E const & set_info( E const &, error_info<Tag1,T1> && ); friend E const & set_info( E const &, error_info<Tag1,T1> && );
template <class E> template <class E>
static static
E const & E const &
set( E const & x, throw_line && y ) set( E const & x, throw_line && y )
{ {
x.throw_line_=y.v_; x.throw_line_=y.v_;
return x; return x;
} }
}; };
template <class E,class Tag,class T> template <class E,class Tag,class T>
inline inline
E const & E const &
set_info( E const & x, error_info<Tag,T> && v ) set_info( E const & x, error_info<Tag,T> && v )
{ {
return set_info_rv<error_info<Tag,T> >::template set<E>(x,std::move(v)); return set_info_rv<error_info<Tag,T> >::template set<E>(x,std::move(v));
} }
#endif #endif

View File

@ -37,7 +37,7 @@ main()
throw my_exception(); throw my_exception();
} }
catch( catch(
boost::exception & e ) boost::exception & e )
{ {
e.set<tag1>(42); e.set<tag1>(42);
e.set<tag2>("42"); e.set<tag2>("42");

View File

@ -7,7 +7,7 @@
template <class E,class I> template <class E,class I>
E const & E const &
add_info( E const & e, I const & i ) add_info( E const & e, I const & i )
{ {
return e << i; return e << i;
} }
#include "error_info_test.hpp" #include "error_info_test.hpp"

View File

@ -7,7 +7,7 @@
template <class E,class I> template <class E,class I>
E const & E const &
add_info( E const & e, I i ) add_info( E const & e, I i )
{ {
return e << i; return e << i;
} }
#include "error_info_test.hpp" #include "error_info_test.hpp"

View File

@ -8,21 +8,21 @@
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
int int
main() main()
{ {
return 0; return 0;
} }
#else #else
template <class I> template <class I>
I const I const
rv_const( I i ) rv_const( I i )
{ {
return i; return i;
} }
template <class E,class I> template <class E,class I>
E const & E const &
add_info( E const & e, I i ) add_info( E const & e, I i )
{ {
return e << rv_const(i); return e << rv_const(i);
} }
#include "error_info_test.hpp" #include "error_info_test.hpp"
#endif #endif

View File

@ -8,15 +8,15 @@
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
int int
main() main()
{ {
return 0; return 0;
} }
#else #else
template <class E,class I> template <class E,class I>
E const & E const &
add_info( E const & e, I i ) add_info( E const & e, I i )
{ {
return e << std::move(i); return e << std::move(i);
} }
#include "error_info_test.hpp" #include "error_info_test.hpp"
#endif #endif