Boost C++ Libraries: Ticket #7294: boost::hash does not compile with ranges https://svn.boost.org/trac10/ticket/7294 <p> boost::hash from boost 1.51 does not compile with iterator_range&lt;const char*&gt;. With boost 1.50 all compiles and works fine. Test program attached. gcc version 4.6.3 (<a class="missing wiki">Ubuntu/Linaro</a> 4.6.3-1ubuntu5) </p> <pre class="wiki">hash_range.cc:15:50: instantiated from here /opt/boost_1_51_0/include/boost/functional/hash/extensions.hpp:257:34: error: no matching function for call to ‘hash_value(const boost::iterator_range&lt;const char*&gt;&amp;)’ </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7294 Trac 1.4.3 Gennady Proskurin <gpr@…> Mon, 27 Aug 2012 08:30:26 GMT attachment set https://svn.boost.org/trac10/ticket/7294 https://svn.boost.org/trac10/ticket/7294 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">hash_range.cc</span> </li> </ul> Ticket Gennady Proskurin <gpr@…> Mon, 27 Aug 2012 08:31:23 GMT <link>https://svn.boost.org/trac10/ticket/7294#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7294#comment:1</guid> <description> <pre class="wiki">c++ -v Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) </pre> </description> <category>Ticket</category> </item> <item> <author>Gennady Proskurin <gpr@…></author> <pubDate>Mon, 27 Aug 2012 08:32:30 GMT</pubDate> <title>summary changed https://svn.boost.org/trac10/ticket/7294#comment:2 https://svn.boost.org/trac10/ticket/7294#comment:2 <ul> <li><strong>summary</strong> <span class="trac-field-old">boost::hash does not compiles with ranges</span> → <span class="trac-field-new">boost::hash does not compile with ranges</span> </li> </ul> Ticket Daniel James Mon, 27 Aug 2012 08:52:24 GMT owner, type, component changed https://svn.boost.org/trac10/ticket/7294#comment:3 https://svn.boost.org/trac10/ticket/7294#comment:3 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Daniel James</span> to <span class="trac-author">Neil Groves</span> </li> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Feature Requests</span> </li> <li><strong>component</strong> <span class="trac-field-old">hash</span> → <span class="trac-field-new">range</span> </li> </ul> <p> That's a bug fix, iterator_range has an implicit conversion to bool, which is why is was hashing - you really don't want that because it will only hash to 0 or 1. So it might have worked, but you get terrible performance for more than a few items. </p> <p> If you want hashing support for <code>iterator_range</code> it will need to be added to that library. For an example of how to do that, open boost/array.hpp and search for 'hash'. It shouldn't be too hard to implement. </p> Ticket Daniel James Mon, 27 Aug 2012 11:46:56 GMT cc set https://svn.boost.org/trac10/ticket/7294#comment:4 https://svn.boost.org/trac10/ticket/7294#comment:4 <ul> <li><strong>cc</strong> <span class="trac-author">dnljms@…</span> added </li> </ul> Ticket Neil Groves Sat, 08 Mar 2014 22:40:29 GMT status, milestone changed https://svn.boost.org/trac10/ticket/7294#comment:5 https://svn.boost.org/trac10/ticket/7294#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.56.0</span> </li> </ul> <p> Implemented and committed to the develop branch. </p> Ticket Neil Groves Sun, 09 Mar 2014 07:40:07 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7294#comment:6 https://svn.boost.org/trac10/ticket/7294#comment:6 <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