Boost C++ Libraries: Ticket #13136: Regression: intrusive::unordered_set::rehash now requires T to be hashable https://svn.boost.org/trac10/ticket/13136 <p> It is possible to create an <code>intrusive::unordered_set&lt;T&gt;</code> where <code>T</code> is not hashable, so long as you never use methods that perform hashing (e.g. insertion is performed via <code>insert_check</code> and <code>insert_commit</code>, and lookup is performed with a caller-specified hasher). <code>rehash</code> is documented as not calling the hash function if <code>store_hash</code> is true, so it ought to be callable on a set with that option enabled, and as of Boost 1.60.0 it was. However, as of Boost 1.64.0 calls to <code>rehash</code> on such a set no longer compile, because the generated code now includes a call to the hash function (which will never actually be executed). </p> <p> Suggested fix: make <code>do_full_rehash</code> a non-type template parameter rather than a function parameter of <code>rehash_impl</code>, and encapsulate the <code>if(do_full_rehash)</code> logic behind a function template that takes <code>do_full_rehash</code> as a template argument (with the two branches as different specializations). That way the code that calls the hash function will not be generated unless the user actually calls <code>full_rehash</code>. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13136 Trac 1.4.3 François Degros <fdegros@…> Wed, 26 Jul 2017 01:13:16 GMT cc set https://svn.boost.org/trac10/ticket/13136#comment:1 https://svn.boost.org/trac10/ticket/13136#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">fdegros@…</span> added </li> </ul> Ticket