Boost C++ Libraries: Ticket #12767: Make value-initialized iterators of intrusive containers comparable https://svn.boost.org/trac10/ticket/12767 <p> Can value-initialized iterators of intrusive containers be compared? </p> <p> For example, is the following code valid and well-defined? </p> <pre class="wiki">using MyList = boost::intrusive::list&lt;MyNode&gt;; using It = MyList::iterator; It a = It(); It b = It(); assert(a == b); </pre><p> This property is useful when it comes to returning empty ranges without having to create a dummy empty container. </p> <p> If intrusive containers already support this property, then it would be good to explicitly mention it in the documentation. If not, I would like to add it as a feature request. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12767 Trac 1.4.3 Ion Gaztañaga Mon, 06 Feb 2017 11:35:39 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/12767#comment:1 https://svn.boost.org/trac10/ticket/12767#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the ticket. Boost.Intrusive supports comparison of value-initialized iterators. Documentation was missing, so I've done the following commit: </p> <p> <a class="ext-link" href="https://github.com/boostorg/intrusive/commit/47c8a19cfded4e31d03cd758a8663389d837b8be"><span class="icon">​</span>https://github.com/boostorg/intrusive/commit/47c8a19cfded4e31d03cd758a8663389d837b8be</a> </p> Ticket fdegros@… Mon, 06 Feb 2017 22:38:14 GMT <link>https://svn.boost.org/trac10/ticket/12767#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12767#comment:2</guid> <description> <p> Excellent. </p> </description> <category>Ticket</category> </item> </channel> </rss>