forked from boostorg/exception
Replacing the use of <iomanip> with <boost/detail/iomanip.hpp> across Boost.
On Linux, GNU's libstdc++, which is the default stdlib for icc and clang, cannot parse the <iomanip> header in version 4.5+ (which thankfully neither compiler advises the use of yet), as it's original C++98-friendly implementation has been replaced with a gnu++0x implementation. <boost/detail/iomanip.hpp> is a portable implementation of <iomanip>, providing boost::detail::setfill, boost::detail::setbase, boost::detail::setw, boost::detail::setprecision, boost::detail::setiosflags and boost::detail::resetiosflags. [SVN r68140]
This commit is contained in:
@ -13,7 +13,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/exception/detail/type_info.hpp>
|
#include <boost/exception/detail/type_info.hpp>
|
||||||
#include <iomanip>
|
#include <boost/detail/iomanip.hpp>
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -36,9 +36,9 @@ boost
|
|||||||
s.fill('0');
|
s.fill('0');
|
||||||
s.width(2);
|
s.width(2);
|
||||||
unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);
|
unsigned char const * b=reinterpret_cast<unsigned char const *>(&x);
|
||||||
s << std::setw(2) << std::hex << (unsigned int)*b;
|
s << boost::detail::setw(2) << std::hex << (unsigned int)*b;
|
||||||
for( unsigned char const * e=b+n; ++b!=e; )
|
for( unsigned char const * e=b+n; ++b!=e; )
|
||||||
s << " " << std::setw(2) << std::hex << (unsigned int)*b;
|
s << " " << boost::detail::setw(2) << std::hex << (unsigned int)*b;
|
||||||
return s.str();
|
return s.str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,10 @@ may_throw_on_copy
|
|||||||
throw T();
|
throw T();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~may_throw_on_copy() throw() {}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool throw_;
|
bool throw_;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,6 +63,9 @@ struct
|
|||||||
derives_std_exception:
|
derives_std_exception:
|
||||||
std::exception
|
std::exception
|
||||||
{
|
{
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~derives_std_exception() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct
|
struct
|
||||||
@ -77,12 +84,19 @@ derives_std_boost_exception:
|
|||||||
{
|
{
|
||||||
return wh_;
|
return wh_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~derives_std_boost_exception() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct
|
struct
|
||||||
derives_boost_exception:
|
derives_boost_exception:
|
||||||
boost::exception
|
boost::exception
|
||||||
{
|
{
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~derives_boost_exception() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
@ -30,6 +30,10 @@ error1:
|
|||||||
std::exception,
|
std::exception,
|
||||||
boost::exception
|
boost::exception
|
||||||
{
|
{
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~error1() throw() {}
|
||||||
|
#endif
|
||||||
|
|
||||||
char const *
|
char const *
|
||||||
what() const throw()
|
what() const throw()
|
||||||
{
|
{
|
||||||
@ -41,6 +45,9 @@ struct
|
|||||||
error2:
|
error2:
|
||||||
boost::exception
|
boost::exception
|
||||||
{
|
{
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~error2() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct
|
struct
|
||||||
@ -52,6 +59,9 @@ error3:
|
|||||||
{
|
{
|
||||||
return "error3";
|
return "error3";
|
||||||
}
|
}
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~error3() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct
|
struct
|
||||||
@ -64,6 +74,9 @@ error4:
|
|||||||
{
|
{
|
||||||
return diagnostic_information_what(*this);
|
return diagnostic_information_what(*this);
|
||||||
}
|
}
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~error4() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -22,6 +22,9 @@ test_exception:
|
|||||||
virtual boost::exception,
|
virtual boost::exception,
|
||||||
virtual std::exception
|
virtual std::exception
|
||||||
{
|
{
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~test_exception() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -21,6 +21,9 @@ my_exception:
|
|||||||
{
|
{
|
||||||
return "my_exception";
|
return "my_exception";
|
||||||
}
|
}
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~my_exception() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef boost::error_info<struct my_tag,int> my_int;
|
typedef boost::error_info<struct my_tag,int> my_int;
|
||||||
|
@ -15,6 +15,9 @@ struct
|
|||||||
exception1:
|
exception1:
|
||||||
std::exception
|
std::exception
|
||||||
{
|
{
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~exception1() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
struct
|
struct
|
||||||
@ -22,6 +25,9 @@ exception2:
|
|||||||
std::exception,
|
std::exception,
|
||||||
boost::exception
|
boost::exception
|
||||||
{
|
{
|
||||||
|
#if defined(__PATHSCALE__)
|
||||||
|
~exception2() throw() {}
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Reference in New Issue
Block a user