title: boost geometry distance() error in compile
body: <p>I just write a simply example given by boost (<a href="http://www.boost.org/doc/libs/1_52_0/libs/geometry/doc/html/geometry/quickstart.html" rel="nofollow">http://www.boost.org/doc/libs/1_52_0/libs/geometry/doc/html/geometry/quickstart.html</a>). There are some errors during compiling. I use eclipse and Mingw to compile it. Could someone tell me what's the problem?</p>
  
  <p>The test code is as follows:</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  #include &lt;boost/geometry.hpp&gt;
  #include &lt;boost/geometry/geometries/point_xy.hpp&gt;
  #include &lt;boost/geometry/geometries/polygon.hpp&gt;
  #include &lt;boost/geometry/algorithms/distance.hpp&gt;
  
  using namespace boost::geometry;
  
  int main() {
  cout &lt;&lt; "!!!Hello World!!!" &lt;&lt; endl; 
  model::d2::point_xy&lt;int&gt; p1(1, 1), p2(2, 2);
  cout &lt;&lt; "Distance p1-p2 is: " &lt;&lt; distance(p1, p2) &lt;&lt; endl;
  return 0;
  }
  </code></pre>
  
  <p>The error is as follows:</p>
  
  <pre><code>c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-  
  mingw32/4.7.1/include/c++/bits/stl_iterator_base_funcs.h:114:5:   
  required by substitution of 'template&lt;class _InputIterator&gt; 
  typename std::iterator_traits::difference_type 
  std::distance(_InputIterator, _InputIterator) [with _InputIterator 
  = boost::geometry::model::d2::point_xy&lt;int&gt;]'
  ..\src\test.cpp:22:50:   required from here
  c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-  
  mingw32/4.7.1/include/c++/bits/stl_iterator_base_types.h:166:53: 
  error: no type named 'iterator_category' in 'class 
  boost::geometry::model::d2::point_xy&lt;int&gt;'
  c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-
  mingw32/4.7.1/include/c++/bits/stl_iterator_base_types.h:167:53: 
  error: no type named 'value_type' in 'class   
  boost::geometry::model::d2::point_xy&lt;int&gt;'
  c:\program files\mingw64\bin\../lib/gcc/x86_64-w64- 
  mingw32/4.7.1/include/c++/bits/stl_iterator_base_types.h:168:53: 
  error: no type named 'difference_type' in 'class  
  boost::geometry::model::d2::point_xy&lt;int&gt;'
  c:\program files\mingw64\bin\../lib/gcc/x86_64-w64- 
  mingw32/4.7.1/include/c++/bits/stl_iterator_base_types.h:169:53: 
  error: no type named 'pointer' in 'class 
  boost::geometry::model::d2::point_xy&lt;int&gt;'
  c:\program files\mingw64\bin\../lib/gcc/x86_64-w64-  
  mingw32/4.7.1/include/c++/bits/stl_iterator_base_types.h:170:53: 
  error: no type named 'reference' in 'class 
  boost::geometry::model::d2::point_xy&lt;int&gt;'
  </code></pre>