Boost C++ Libraries: Ticket #11241: unused parameter warnings in operator<< in boost::optional with clang++ https://svn.boost.org/trac10/ticket/11241 <p> Trivial example program: </p> <pre class="wiki">#include &lt;boost/optional.hpp&gt; int main(int, char *[]) { boost::optional&lt;int&gt; i; } </pre><p> Compile with clang++: </p> <pre class="wiki">clang++ -Wall -Wextra -Wno-unused-local-typedefs \ -I$HOME/opt/boost/boost_1_58_0/include/ \ -L$HOME/opt/boost/boost_1_58_0/lib/ -o cpp2 cpp2.cpp </pre><p> Output: </p> <pre class="wiki">In file included from cpp2.cpp:1: In file included from /home/mosu/opt/boost/boost_1_58_0/include/boost/optional.hpp:15: /home/mosu/opt/boost/boost_1_58_0/include/boost/optional/optional.hpp:1254:53: warning: unused parameter 'out' [-Wunused-parameter] operator&lt;&lt;(std::basic_ostream&lt;CharType, CharTrait&gt;&amp; out, optional_detail::optional_tag const&amp; v) ^ /home/mosu/opt/boost/boost_1_58_0/include/boost/optional/optional.hpp:1254:95: warning: unused parameter 'v' [-Wunused-parameter] operator&lt;&lt;(std::basic_ostream&lt;CharType, CharTrait&gt;&amp; out, optional_detail::optional_tag const&amp; v) ^ 2 warnings generated. </pre><p> This is a regression from 1.57.0 where no such warnings were emitted. </p> <p> clang++ 3.6.0 emits warnings with 1.58.0 but not with 1.57.0. </p> <p> g++ 4.9.2 emits warnings with neither of those versions. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11241 Trac 1.4.3 akrzemi1 Tue, 20 Oct 2015 21:27:08 GMT owner, milestone changed https://svn.boost.org/trac10/ticket/11241#comment:1 https://svn.boost.org/trac10/ticket/11241#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Fernando Cacciola</span> to <span class="trac-author">akrzemi1</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.59.0</span> </li> </ul> Ticket akrzemi1 Tue, 20 Oct 2015 21:27:29 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11241#comment:2 https://svn.boost.org/trac10/ticket/11241#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">fixed</span> </li> </ul> Ticket