Boost C++ Libraries: Ticket #6792: hash_value() for iterator_range https://svn.boost.org/trac10/ticket/6792 <p> "hash_value(boost::iterator_range&lt;const char*&gt;());" uses "operator unspecified_bool_type() const" which is not right. </p> <p> Could you support hash_value() properly? Could you remove operator bool()? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6792 Trac 1.4.3 Daniel James Sat, 14 Apr 2012 21:22:48 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6792#comment:1 https://svn.boost.org/trac10/ticket/6792#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Neil Groves</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">range</span> </li> </ul> <p> <code>hash_value</code> would be nice for iterator range. See <a class="changeset" href="https://svn.boost.org/trac10/changeset/77976" title="Added support for Boost.Hash to Boost.Array; fixes #6791">[77976]</a> for how an example of how to support it, <code>hash_value</code> is picked up by ADL. </p> <p> The problem with operator bool is really a design flaw in Boost.Hash. It should be possible to turn it into an error by defining the macro <code>BOOST_HASH_NO_IMPLICIT_CASTS</code>, although that isn't defined by default because it might break valid code. </p> Ticket Neil Groves Sun, 15 Apr 2012 12:05:47 GMT status, type, milestone changed https://svn.boost.org/trac10/ticket/6792#comment:2 https://svn.boost.org/trac10/ticket/6792#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.50.0</span> </li> </ul> <p> I'll attempt to implement the additional hash_value support by release 1.50. It looks simple enough. I will not remove the conversion to bool since this is a documented part of the public interface, and is not in error. </p> Ticket Neil Groves Tue, 04 Mar 2014 13:03:14 GMT milestone changed https://svn.boost.org/trac10/ticket/6792#comment:3 https://svn.boost.org/trac10/ticket/6792#comment:3 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.50.0</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> Ticket Neil Groves Sat, 08 Mar 2014 22:49:00 GMT <link>https://svn.boost.org/trac10/ticket/6792#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6792#comment:4</guid> <description> <p> Implemented and committed on the develop branch. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Neil Groves</dc:creator> <pubDate>Sun, 09 Mar 2014 07:39:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6792#comment:5 https://svn.boost.org/trac10/ticket/6792#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