下面的代碼按預期工作與提升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