
On Thu, Nov 8, 2012 at 2:17 PM, Gennadiy Rozental <rogeeff@gmail.com> wrote:
Jeffrey Lee Hellrung, Jr. <jeffrey.hellrung <at> gmail.com> writes:
Is your type a range?
No.
How does its semantics differ from the operator== above?
I am building an expression template structure to delay operator== evaluation.
Sounds like hackery :)
Presumably if you want to specifically address boost::iterator_range, then
template< class I > inline bool operator==(my_type, iterator_range<I>);
should be a preferable overload.
Unfortunately it is not. I am getting ambiguity errors.
Works for me (MSVC9): #include <boost/range/iterator_range.hpp> struct my_type { }; template< class I > inline bool operator==(my_type, boost::iterator_range<I>) { return false; } int main(int argc, char* argv[]) { my_type x; boost::iterator_range< int* > i; x == i; return 0; } - Jeff