Boost C++ Libraries: Ticket #6715: Derived from iterator_range and operator== https://svn.boost.org/trac10/ticket/6715 <p> Shouldn't this just work? Comparing two boost::iterator_range&lt;const char*&gt; works fine. </p> <pre class="wiki">#include &lt;boost/range/iterator_range.hpp&gt; class str_ref : public boost::iterator_range&lt;const char*&gt; { }; int main() { boost::iterator_range&lt;const char*&gt; a; a == a; str_ref b; b == b; // 12 } is.cpp: In function ‘int main()’: is.cpp:12:7: error: ambiguous overload for ‘operator==’ in ‘b == b’ is.cpp:12:7: note: candidates are: is.cpp:12:7: note: operator==(boost::iterator_range&lt;const char*&gt;::unspecified_bool_type {aka const char* boost::iterator_range&lt;const char*&gt;::*}, boost::iterator_range&lt;const char*&gt;::unspecified_bool_type {aka const char* boost::iterator_range&lt;const char*&gt;::*}) &lt;built-in&gt; /usr/include/boost/range/iterator_range_core.hpp:438:21: note: bool boost::operator==(const boost::iterator_range&lt;IteratorT&gt;&amp;, const ForwardRange&amp;) [with IteratorT = const char*, ForwardRange = str_ref] /usr/include/boost/range/iterator_range_core.hpp:431:21: note: bool boost::operator==(const boost::iterator_range&lt;IteratorT&gt;&amp;, const boost::iterator_range&lt;Iterator2T&gt;&amp;) [with Iterator1T = const char*, Iterator2T = const char*] /usr/include/boost/range/iterator_range_core.hpp:387:21: note: bool boost::operator==(const ForwardRange&amp;, const boost::iterator_range&lt;IteratorT&gt;&amp;) [with IteratorT = const char*, ForwardRange = str_ref] </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6715 Trac 1.4.3 Neil Groves Mon, 24 Feb 2014 15:19:38 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/6715#comment:1 https://svn.boost.org/trac10/ticket/6715#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> Yes it should! </p> Ticket