Boost C++ Libraries: Ticket #8729: Library Submission, working with pointer containers https://svn.boost.org/trac10/ticket/8729 <p> Hey All, </p> <p> I don't even know if this is the right place to submit this, but the website seems to indicate it is. </p> <p> I was reading a book which seems to suggest that working with pointers in containers is harder then it should be. A couple of templates can make it much easier. For instance, to work with pointers(this template assumes that T is derived from unary_function, as std::set Compare types are, and long typenames are there to be an example to make this more understandable, final form could cut back: </p> <p> template &lt;typename T&gt; struct dereference { </p> <blockquote> <p> typename T::result_type operator()(const typename T::first_argument_type* arg1, const typename T::second_argument_type* arg2) const { </p> <blockquote> <p> return T()(*arg1, *arg2); </p> </blockquote> <p> } </p> </blockquote> <p> }; </p> <p> e.x.: std::set&lt;string*, Dereference&lt;std::less&lt;string&gt; &gt; &gt; myset; </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/8729 Trac 1.4.3 viboes Thu, 30 Jan 2014 17:58:04 GMT owner, component changed https://svn.boost.org/trac10/ticket/8729#comment:1 https://svn.boost.org/trac10/ticket/8729#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Douglas Gregor</span> to <span class="trac-author">No-Maintainer</span> </li> <li><strong>component</strong> <span class="trac-field-old">function</span> → <span class="trac-field-new">functional</span> </li> </ul> <p> Moved to functional in case this request has more sens. Otherwise, please move it to None. </p> Ticket