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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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