title: trying to insert std::pair into std::set
body: <p>i can't understand what the error is in this code:</p>
  
  <pre><code>#include &lt;set&gt;
  #include &lt;utility&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  class A
  {
      public:
          A(unsigned int a) : _a(a) { }
          A() : _a(0) { }
          unsigned int a() const { return _a; }
      private:
          unsigned int _a;
  };
  
  class B
  {
      public:
          B(unsigned int b) : _b(b) { }
          B() : _b(0) { }
          unsigned int b() const { return _b; }
      private:
          unsigned int _b;
  };
  
  void display(const Point&amp; point)
  {
      //cout &lt;&lt; "A: " &lt;&lt; point.first.a() &lt;&lt; ", B: " &lt;&lt; point.second.b() &lt;&lt; endl;
  }
  
  typedef pair &lt;A, B&gt; Point;
  typedef set &lt;Point&gt; List;
  
  main()
  {
      A a(5);
      B b(9);
  
      List list;
      List::iterator it;
      Point point;
  
      point = make_pair(a, b);
  
      it = list.begin();
  
      list.insert(point); // &lt;--- error here
  
      //display(point);
  }
  </code></pre>
  
  <p>error is this:</p>
  
  <pre><code>In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_algobase.h:66,
                   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_tree.h:62,
                   from /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/set:60,
                   from test.cpp:1:
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_pair.h: In function ‘bool std::operator&lt;(const std::pair&lt;_T1, _T2&gt;&amp;, const std::pair&lt;_T1, _T2&gt;&amp;) [with _T1 = A, _T2 = B]’:
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_function.h:230:   instantiated from ‘bool std::less&lt;_Tp&gt;::operator()(const _Tp&amp;, const _Tp&amp;) const [with _Tp = std::pair&lt;A, B&gt;]’
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_tree.h:1170:   instantiated from ‘std::pair&lt;typename std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::iterator, bool&gt; std::_Rb_tree&lt;_Key, _Val, _KeyOfValue, _Compare, _Alloc&gt;::_M_insert_unique(const _Val&amp;) [with _Key = std::pair&lt;A, B&gt;, _Val = std::pair&lt;A, B&gt;, _KeyOfValue = std::_Identity&lt;std::pair&lt;A, B&gt; &gt;, _Compare = std::less&lt;std::pair&lt;A, B&gt; &gt;, _Alloc = std::allocator&lt;std::pair&lt;A, B&gt; &gt;]’
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_set.h:411:   instantiated from ‘std::pair&lt;typename std::_Rb_tree&lt;_Key, _Key, std::_Identity&lt;_Key&gt;, _Compare, typename _Alloc::rebind&lt;_Key&gt;::other&gt;::const_iterator, bool&gt; std::set&lt;_Key, _Compare, _Alloc&gt;::insert(const _Key&amp;) [with _Key = std::pair&lt;A, B&gt;, _Compare = std::less&lt;std::pair&lt;A, B&gt; &gt;, _Alloc = std::allocator&lt;std::pair&lt;A, B&gt; &gt;]’
  test.cpp:48:   instantiated from here
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_pair.h:154: error: no match for ‘operator&lt;’ in ‘__x-&gt;std::pair&lt;A, B&gt;::second &lt; __y-&gt;std::pair&lt;A, B&gt;::second’
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_pair.h:154: error: no match for ‘operator&lt;’ in ‘__y-&gt;std::pair&lt;A, B&gt;::first &lt; __x-&gt;std::pair&lt;A, B&gt;::first’
  /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/include/g++-v4/bits/stl_pair.h:154: error: no match for ‘operator&lt;’ in ‘__x-&gt;std::pair&lt;A, B&gt;::first &lt; __y-&gt;std::pair&lt;A, B&gt;::first’
  </code></pre>