Boost C++ Libraries: Ticket #7950: Eliminate W4-warnings under VS2005 - warning C4913: user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used https://svn.boost.org/trac10/ticket/7950 <p> Try this code snippet: </p> <pre class="wiki">#include &lt;boost/circular_buffer.hpp&gt; #include &lt;boost/date_time.hpp&gt; // Including this causes the warnings void ProvokeWarnings(void) { boost::circular_buffer&lt;int&gt; Test(100); Test.set_capacity(500); // This provokes the warnings } </pre><p> Compiling this with /W4 in VS2005 will give you a couple of warnings directed towards overloaded coma-operators. Overloading the coma-operator is done in several other libraries and some of them get pulled in to circular_buffer by including date_time.hpp: </p> <pre class="wiki">\boost\circular_buffer\details.hpp(437) : warning C4913: user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used \boost\circular_buffer\base.hpp(863) : see reference to function template instantiation 'ForwardIterator boost::cb_details::uninitialized_copy_with_alloc&lt;boost::cb_details::iterator&lt;Buff,Traits&gt;,int*,std::allocator&lt;_Ty&gt;&gt;(InputIterator,InputIterator,ForwardIterator,Alloc &amp;)' being compiled \boost\circular_buffer\base.hpp(856) : while compiling class template member function 'void boost::circular_buffer&lt;T&gt;::set_capacity(__w64 unsigned int)' test.cpp(5) : see reference to class template instantiation 'boost::circular_buffer&lt;T&gt;' being compiled 1&gt; with 1&gt; [ 1&gt; T=int 1&gt; ] </pre><p> Attached a patch which silences these warnings (this is done similarly in other boost libraries fiddling with the coma-operator, circular_buffer is more or less a victim of these warnings here). </p> <p> Probably it would be better to exclude these (obviously very special) overloads of operator ',' from the ADL in circular_buffer, but this will require changes to the libraries who overload the operator. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7950 Trac 1.4.3 Peter Brockamp <p.brockamp@…> Tue, 29 Jan 2013 14:23:07 GMT attachment set https://svn.boost.org/trac10/ticket/7950 https://svn.boost.org/trac10/ticket/7950 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">details.hpp.diff</span> </li> </ul> <p> Silence warning C4913 under VS2005 </p> Ticket viboes Tue, 21 May 2013 18:47:22 GMT type changed https://svn.boost.org/trac10/ticket/7950#comment:1 https://svn.boost.org/trac10/ticket/7950#comment:1 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket viboes Sun, 09 Jun 2013 21:02:07 GMT owner, status changed https://svn.boost.org/trac10/ticket/7950#comment:2 https://svn.boost.org/trac10/ticket/7950#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Jan Gaspar</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket viboes Sun, 09 Jun 2013 21:08:40 GMT severity, summary changed https://svn.boost.org/trac10/ticket/7950#comment:3 https://svn.boost.org/trac10/ticket/7950#comment:3 <ul> <li><strong>severity</strong> <span class="trac-field-old">Optimization</span> → <span class="trac-field-new">Cosmetic</span> </li> <li><strong>summary</strong> <span class="trac-field-old">Eliminate W4-warnings under VS2005</span> → <span class="trac-field-new">Eliminate W4-warnings under VS2005 - warning C4913: user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used</span> </li> </ul> Ticket viboes Sun, 07 Jul 2013 13:02:04 GMT milestone changed https://svn.boost.org/trac10/ticket/7950#comment:4 https://svn.boost.org/trac10/ticket/7950#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.55.0</span> </li> </ul> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/84971" title="CircularBuffer: manage with #5362, #7025, #7050.">[84971]</a>. </p> Ticket viboes Tue, 10 Sep 2013 22:14:58 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7950#comment:5 https://svn.boost.org/trac10/ticket/7950#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket