
Hi, Shouldn't this just work? Comparing two boost::iterator_range<const char*> works fine. #include <boost/range/iterator_range.hpp> class str_ref : public boost::iterator_range<const char*> { }; int main() { boost::iterator_range<const char*> 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<const char*>::unspecified_bool_type {aka const char* boost::iterator_range<const char*>::*}, boost::iterator_range<const char*>::unspecified_bool_type {aka const char* boost::iterator_range<const char*>::*}) <built-in> /usr/include/boost/range/iterator_range_core.hpp:438:21: note: bool boost::operator==(const boost::iterator_range<IteratorT>&, const ForwardRange&) [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<IteratorT>&, const boost::iterator_range<Iterator2T>&) [with Iterator1T = const char*, Iterator2T = const char*] /usr/include/boost/range/iterator_range_core.hpp:387:21: note: bool boost::operator==(const ForwardRange&, const boost::iterator_range<IteratorT>&) [with IteratorT = const char*, ForwardRange = str_ref] -- Olaf