mirror of
https://github.com/boostorg/exception.git
synced 2025-07-16 14:02:12 +02:00
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:
@ -20,7 +20,7 @@ boost
|
||||
struct
|
||||
strwrap
|
||||
{
|
||||
std::string str;
|
||||
std::string str;
|
||||
char const * ptr;
|
||||
|
||||
explicit
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user