Boost C++ Libraries: Ticket #11579: boost.log version 1.59 stream operator failure for user types https://svn.boost.org/trac10/ticket/11579 <p> The following code works as expected with boost 1.57, but fails with boost 1.59: </p> <p> #include &lt;iostream&gt; #include &lt;boost/log/trivial.hpp&gt; </p> <p> struct Foo { </p> <blockquote> <p> int d=1; </p> </blockquote> <p> }; </p> <p> std::ostream&amp; operator&lt;&lt;(std::ostream&amp; out, const Foo&amp; foo) { </p> <blockquote> <p> out &lt;&lt; "Foo: " &lt;&lt; foo.d; return out; </p> </blockquote> <p> } </p> <p> int main() { </p> <blockquote> <p> BOOST_LOG_TRIVIAL(info) &lt;&lt; Foo(); return EXIT_SUCCESS; </p> </blockquote> <p> } </p> <p> I have also started a discussion in SO: </p> <blockquote> <p> <a class="ext-link" href="http://stackoverflow.com/questions/32185858/problems-with-boost-log-version-1-59/32187641#32187641"><span class="icon">​</span>http://stackoverflow.com/questions/32185858/problems-with-boost-log-version-1-59/32187641#32187641</a> </p> </blockquote> <p> and a workaround is suggested. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11579 Trac 1.4.3 Marios Visvardis <visvardis.marios@…> Tue, 25 Aug 2015 08:29:39 GMT cc set https://svn.boost.org/trac10/ticket/11579#comment:1 https://svn.boost.org/trac10/ticket/11579#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">visvardis.marios@…</span> added </li> </ul> Ticket Andrey Semashev Tue, 25 Aug 2015 08:35:22 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11579#comment:2 https://svn.boost.org/trac10/ticket/11579#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">duplicate</span> </li> </ul> <p> Duplicates <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/11549" title="#11549: Bugs: ostream&amp; operator&lt;&lt; overload no longer picked up by boost log (closed: fixed)">#11549</a>. </p> Ticket