title: error C2678: binary '==' : no operator found which takes a left-hand operand of type (or there is no acceptable conversion)
body: <p>I'm trying to compile the following code:
  </p>
  
  <pre><code>#include &lt;boost/geometry/geometries/point_xy.hpp&gt;
  
  #include &lt;iostream&gt;
  #include &lt;utility&gt;
  
  typedef boost::geometry::model::d2::point_xy&lt;long&gt; Point;
  typedef std::pair&lt;Point, Point&gt; Vector;
  
  bool operator==(const Point&amp; p1, const Point&amp; p2) {
    return p1.x() == p2.x() &amp;&amp; p1.y() == p2.y();
  }
  
  int main() {
      Vector vec1(Point(0,0), Point(1,1));
      Vector vec2(Point(0,0), Point(1,2));
      std::cout &lt;&lt; ((vec1 == vec2) == false) &lt;&lt; std::endl;
      std::cout &lt;&lt; ((vec1 == vec1) == true) &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>VS2012 C++ compiler returns the following compilation error:</p>
  
  <blockquote>
    <p>...VC\include\utility(219): error C2678: binary '==' : no operator found which takes a left-hand
    operand of type 'const Point' (or there is no acceptable conversion)</p>
  </blockquote>
  
  <p>GCC C++ compiler returns the following compilation error:</p>
  
  <blockquote>
    <p>/usr/include/c++/4.8/bits/stl_pair.h:</p>
    
    <p>In instantiation of ‘bool std::operator==(const std::pair&lt;_T1, _T2>&amp;, const std::pair&lt;_T1, _T2>&amp;) [with _T1 = boost::geometry::model::d2::point_xy; _T2 = boost::geometry::model::d2::point_xy]’:</p>
    
    <p>test.cpp:22:28:   required from here
    /usr/include/c++/4.8/bits/stl_pair.h:215:51: error:</p>
    
    <p>no match for ‘operator==’ (operand types are ‘const boost::geometry::model::d2::point_xy’ and ‘const boost::geometry::model::d2::point_xy’)
         { return __x.first == __y.first &amp;&amp; __x.second == __y.second; }</p>
  </blockquote>
  
  <p>Error disappears if I overload == operator for Vector:</p>
  
  <pre><code>bool operator==(const Vector&amp; v1, const Vector&amp; v2) {
      return v1.first == v2.first &amp;&amp; v1.second == v2.second;
  }
  </code></pre>