Implemented support for custom to_string overloads for converting boost::error_info objects to string by the boost::diagnostic_information function.

[SVN r50507]
This commit is contained in:
Emil Dotchevski
2009-01-08 01:26:15 +00:00
parent b52e6c7d6b
commit f28285c073
4 changed files with 60 additions and 16 deletions

View File

@ -20,7 +20,7 @@ boost
struct
strwrap
{
std::string str;
std::string str;
char const * ptr;
explicit

View File

@ -15,6 +15,14 @@
namespace
boost
{
template <class Tag,class T>
inline
typename enable_if<has_to_string<T>,std::string>::type
to_string( error_info<Tag,T> const & x )
{
return to_string(x.value());
}
template <class Tag,class T>
inline
error_info<Tag,T>::
@ -45,7 +53,7 @@ boost
error_info<Tag,T>::
value_as_string() const
{
return to_string_stub(value_);
return to_string_stub(*this);
}
namespace