Boost C++ Libraries: Ticket #6693: tribool.hpp causes warnings under -Wshadow on gcc https://svn.boost.org/trac10/ticket/6693 <p> boost::logic::tribool's constructor accepts an argument "value", and it also has a data member named "value". This causes warnings under -Wshadow on gcc. I have attached a patch to fix this problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6693 Trac 1.4.3 Ben Craig <ben.craig@…> Fri, 16 Mar 2012 18:32:39 GMT attachment set https://svn.boost.org/trac10/ticket/6693 https://svn.boost.org/trac10/ticket/6693 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">shadow.patch</span> </li> </ul> <p> Patch to tribool shadowing issue </p> Ticket Ben Craig <ben.craig@…> Fri, 16 Mar 2012 18:39:04 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6693#comment:1 https://svn.boost.org/trac10/ticket/6693#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Douglas Gregor</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">logic</span> </li> </ul> Ticket Marshall Clow Fri, 16 Mar 2012 20:11:01 GMT owner, status changed https://svn.boost.org/trac10/ticket/6693#comment:2 https://svn.boost.org/trac10/ticket/6693#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Douglas Gregor</span> to <span class="trac-author">Marshall Clow</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> <p> Here's what I see in that file (both on trunk and release): </p> <pre class="wiki"> * \throws nothrow */ tribool(bool initial_value) : value(initial_value? true_value : false_value) {} </pre><p> It appears to me that this was fixed back in 2009. </p> <pre class="wiki">------------------------------------------------------------------------ r53429 | vladimir_prus | 2009-05-29 23:36:18 -0700 (Fri, 29 May 2009) | 4 lines Fix gcc -Wshadow warnings in tribool. </pre><p> Are you sure that you are using version 1.49? </p> Ticket Ben Craig <ben.craig@…> Fri, 16 Mar 2012 20:18:15 GMT <link>https://svn.boost.org/trac10/ticket/6693#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6693#comment:3</guid> <description> <p> Arg! sorry about that. We use 1.46.1 internally, where we locally patched this problem, and two similar ones in the random library. When setting this patch up, I saw that everything in random had been cleared up, but I managed to forget / mess up this comparison. </p> <p> This can be closed / rejected. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Fri, 16 Mar 2012 20:48:59 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6693#comment:4 https://svn.boost.org/trac10/ticket/6693#comment:4 <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">invalid</span> </li> </ul> Ticket