mirror of
https://github.com/boostorg/exception.git
synced 2025-07-29 03:57:18 +02:00
Improved to_string(std::pair) support.
[SVN r79252]
This commit is contained in:
@ -19,11 +19,16 @@
|
||||
namespace
|
||||
boost
|
||||
{
|
||||
template <class T,class U>
|
||||
std::string to_string( std::pair<T,U> const & );
|
||||
std::string to_string( std::exception const & );
|
||||
|
||||
namespace
|
||||
to_string_detail
|
||||
{
|
||||
template <class T>
|
||||
typename disable_if<is_output_streamable<T>,char>::type to_string( T const & );
|
||||
using boost::to_string;
|
||||
|
||||
template <class,bool IsOutputStreamable>
|
||||
struct has_to_string_impl;
|
||||
|
@ -101,6 +101,14 @@ boost
|
||||
{
|
||||
return exception_detail::to_string_dispatch::dispatch(x,s);
|
||||
}
|
||||
|
||||
template <class T,class U,class Stub>
|
||||
inline
|
||||
std::string
|
||||
to_string_stub( std::pair<T,U> const & x, Stub s )
|
||||
{
|
||||
return std::string("(") + to_string_stub(x.first,s) + ',' + to_string_stub(x.second,s) + ')';
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
|
||||
|
Reference in New Issue
Block a user