下面的代码按预期工作与提升1.57。第一个gcc错误信息是:问题与升压日志,版本1.59
error: no match for ‘operator<<’ (operand types are ‘boost::log::v2s_mt_posix::basic_record_ostream’ and ‘Foo’)
文档和发行说明都未记录需要更改的内容。
下面的代码按预期工作与提升1.57。第一个gcc错误信息是:问题与升压日志,版本1.59
error: no match for ‘operator<<’ (operand types are ‘boost::log::v2s_mt_posix::basic_record_ostream’ and ‘Foo’)
文档和发行说明都未记录需要更改的内容。
Live version 看起来像问题在enable_if_formatting_ostream
结构。它被添加到this commit。貌似
template< typename StreamT, typename R >
struct enable_if_formatting_ostream {};
template< typename CharT, typename TraitsT, typename AllocatorT, typename R >
struct enable_if_formatting_ostream< basic_formatting_ostream< CharT, TraitsT, AllocatorT >, R > { typedef R type; };
现在operator <<
是
template< typename StreamT, typename T >
inline typename boost::log::aux::enable_if_formatting_ostream< StreamT, StreamT& >::type
operator<< (StreamT& strm, T const& value)
之前,它是
template< typename CharT, typename TraitsT, typename AllocatorT, typename T >
inline basic_formatting_ostream< CharT, TraitsT, AllocatorT >&
operator<< (basic_formatting_ostream< CharT, TraitsT, AllocatorT >& strm, T const& value)
,自record_ostream
从formatting_ostream
编译器导出可以找到过载,但现在不是,因为SFINAE是仅当使用formatting_ostream
时,使用和结构将具有type
typedef。而this可以解决这种情况。
查看boost trac后,记录并修复了这个错误:https://svn.boost.org/trac/boost/ticket/11549 –
究竟是如何通过回归测试? –
直播版本:http://melpon.org/wandbox/permlink/Xn1hDoe7Zg7cynRX看起来'enable_if_formatting_ostream'坏了。 – ForEveR