forked from boostorg/exception
Tweaks to try to defeat g++4.6.3
This commit is contained in:
@ -44,37 +44,44 @@ boost
|
||||
public exception_detail::error_info_base
|
||||
{
|
||||
public:
|
||||
|
||||
typedef T value_type;
|
||||
|
||||
error_info( value_type const & v );
|
||||
error_info( value_type const & v ):
|
||||
v_(v)
|
||||
{
|
||||
}
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
error_info( error_info const & );
|
||||
error_info( value_type && v ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(v))));
|
||||
error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.v_))));
|
||||
error_info( error_info const & x ):
|
||||
v_(x.v_)
|
||||
{
|
||||
}
|
||||
error_info( value_type && v ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(v)))):
|
||||
v_(std::move(v))
|
||||
{
|
||||
}
|
||||
error_info( error_info && x ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(x.v_)))):
|
||||
v_(std::move(x.v_))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
~error_info() throw();
|
||||
|
||||
~error_info() throw()
|
||||
{
|
||||
}
|
||||
value_type const &
|
||||
value() const
|
||||
{
|
||||
return v_;
|
||||
}
|
||||
|
||||
value_type &
|
||||
value()
|
||||
{
|
||||
return v_;
|
||||
}
|
||||
|
||||
private:
|
||||
error_info & operator=( error_info const & );
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
error_info & operator=( error_info && x );
|
||||
#endif
|
||||
|
||||
std::string name_value_string() const;
|
||||
|
||||
value_type v_;
|
||||
};
|
||||
}
|
||||
|
@ -38,45 +38,6 @@ boost
|
||||
return '[' + error_info_name(x) + "] = " + to_string_stub(x.value()) + '\n';
|
||||
}
|
||||
|
||||
template <class Tag,class T>
|
||||
inline
|
||||
error_info<Tag,T>::
|
||||
error_info( value_type const & v ):
|
||||
v_(v)
|
||||
{
|
||||
}
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template <class Tag,class T>
|
||||
inline
|
||||
error_info<Tag,T>::
|
||||
error_info( error_info const & x ):
|
||||
v_(x.v_)
|
||||
{
|
||||
}
|
||||
template <class Tag,class T>
|
||||
inline
|
||||
error_info<Tag,T>::
|
||||
error_info( value_type && v ) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(value_type(std::move(v)))):
|
||||
v_(std::move(v))
|
||||
{
|
||||
}
|
||||
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.v_)))):
|
||||
v_(std::move(x.v_))
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
template <class Tag,class T>
|
||||
inline
|
||||
error_info<Tag,T>::
|
||||
~error_info() throw()
|
||||
{
|
||||
}
|
||||
|
||||
template <class Tag,class T>
|
||||
inline
|
||||
std::string
|
||||
|
@ -16,14 +16,14 @@ typedef boost::error_info<struct error_info_string_, std::string> error_info_str
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
try
|
||||
{
|
||||
throw my_exception() << error_info_string("doh");
|
||||
}
|
||||
catch( my_exception & e )
|
||||
{
|
||||
BOOST_TEST(boost::get_error_info<error_info_string>(e) && !strcmp(boost::get_error_info<error_info_string>(e)->c_str(),"doh"));
|
||||
}
|
||||
{
|
||||
try
|
||||
{
|
||||
throw my_exception() << error_info_string("doh");
|
||||
}
|
||||
catch( my_exception & e )
|
||||
{
|
||||
BOOST_TEST(boost::get_error_info<error_info_string>(e) && !strcmp(boost::get_error_info<error_info_string>(e)->c_str(),"doh"));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user