Boost C++ Libraries: Ticket #12765: Provide heterogeneous lookup methods using the container's hasher and/or comparator functions https://svn.boost.org/trac10/ticket/12765 <p> Boost intrusive containers have heterogeneous lookup methods taking a key of an arbitrary type. All these methods also require to pass a hasher and/or a comparison function dealing with this key type. But what if the hasher/comparator embedded in the container itself can already deal with these key type? I'd like to avoid passing to these methods a function that the container already knows about. </p> <p> Consider adding heterogeneous lookup methods using the hasher and/or comparator already stored in the container. </p> <p> Like std::set or std::map, you might want to enable these methods only if the hasher and comparator declare a <code>is_transparent</code> nested type. See <a class="ext-link" href="http://en.cppreference.com/w/cpp/container/map/find"><span class="icon">​</span>http://en.cppreference.com/w/cpp/container/map/find</a>. </p> <p> Something like: </p> <pre class="wiki">template &lt;typename T, class... Options&gt; class set { public: ... template &lt;typename K, typename = key_compare::is_transparent&gt; iterator find(const K&amp; key) { return find(key, key_comp()); } ... }; </pre><p> That would make these heterogeneous lookup methods more convenient to use. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12765 Trac 1.4.3 fdegros@… Mon, 27 Feb 2017 05:37:30 GMT <link>https://svn.boost.org/trac10/ticket/12765#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12765#comment:1</guid> <description> <p> Ping? Any idea or progress on this topic? </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Tue, 28 Feb 2017 21:00:04 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12765#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12765#comment:2</guid> <description> <p> It seems a good idea, written in the to-do list. </p> </description> <category>Ticket</category> </item> <item> <author>fdegros@…</author> <pubDate>Wed, 26 Jul 2017 00:19:43 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/12765#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12765#comment:3</guid> <description> <p> Ping? Any idea or progress on this topic? </p> </description> <category>Ticket</category> </item> </channel> </rss>