title: std::vector<std::pair<int,std::pair<Bone,std::string> > > not sorting by int?
body: <p>I have a <code>std::vector&lt;std::pair&lt;int,std::pair&lt;Bone,std::string&gt; &gt; &gt; </code></p>
  <p>I'm trying to sort it with std sort, with the expectation that it is sorted by int, but instead I get 21 errors related to the sort call.</p>
  <p>What could be wrong?</p>
  <p>Code:</p>
  <pre><code>std::vector&lt;std::pair&lt;int,std::pair&lt;Bone,std::string&gt; &gt; &gt; tempBones;
  std::sort(tempBones.begin(),tempBones.end());
  </code></pre>
  <p>Errors:</p>
  <blockquote>
  <p>Error  1   error C2784: <code>'bool std::operator &lt;(const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;,const _Elem *)'</code> : could not deduce template argument for <code>'const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;'</code> from <code>'const skl::Bone'</code>  c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  2   error C2784: <code>'bool std::operator &lt;(const _Elem *,const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;)'</code> : could not deduce template argument for <code>'const _Elem *'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  3   error C2784: <code>'bool std::operator &lt;(const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;,const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  4   error C2784: <code>'bool std::operator &lt;(const std::_Tree&lt;_Traits&gt; &amp;,const std::_Tree&lt;_Traits&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::_Tree&lt;_Traits&gt; &amp;'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  5   error C2784: <code>'bool std::operator &lt;(const std::vector&lt;_Ty,_Alloc&gt; &amp;,const std::vector&lt;_Ty,_Alloc&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::vector&lt;_Ty,_Alloc&gt; &amp;'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  6   error C2784: <code>'bool std::operator &lt;(const std::list&lt;_Ty,_Ax&gt; &amp;,const std::list&lt;_Ty,_Ax&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::list&lt;_Ty,_Ax&gt; &amp;'</code> from <code>'const skl::Bone'</code>   c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  7   error C2784: <code>'bool std::operator &lt;(const std::reverse_iterator&lt;_RanIt&gt; &amp;,const std::reverse_iterator&lt;_RanIt2&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::reverse_iterator&lt;_RanIt&gt; &amp;'</code> from <code>'const skl::Bone'</code> c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  8   error C2784: <code>'bool std::operator &lt;(const std::_Revranit&lt;_RanIt,_Base&gt; &amp;,const std::_Revranit&lt;_RanIt2,_Base2&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::_Revranit&lt;_RanIt,_Base&gt; &amp;'</code> from <code>'const skl::Bone'</code>   c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  9   error C2784: <code>'bool std::operator &lt;(const std::pair&lt;_Ty1,_Ty2&gt; &amp;,const std::pair&lt;_Ty1,_Ty2&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::pair&lt;_Ty1,_Ty2&gt; &amp;'</code> from <code>'const skl::Bone'</code> c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 102</p>
  <p>Error  10  error C2676: binary <code>'&lt;'</code> : <code>'const skl::Bone'</code> does not define this operator or a conversion to a type acceptable to the predefined operator   c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 10</p>
  <p>Error  11  error C2784: <code>'bool std::operator &lt;(const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;,const _Elem *)'</code> : could not deduce template argument for <code>'const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;'</code> from <code>'const skl::Bone'</code>  c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  12  error C2784: <code>'bool std::operator &lt;(const _Elem *,const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;)'</code> : could not deduce template argument for <code>'const _Elem *'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  13  error C2784: <code>'bool std::operator &lt;(const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;,const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  14  error C2784: <code>'bool std::operator &lt;(const std::_Tree&lt;_Traits&gt; &amp;,const std::_Tree&lt;_Traits&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::_Tree&lt;_Traits&gt; &amp;'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  15  error C2784: <code>'bool std::operator &lt;(const std::vector&lt;_Ty,_Alloc&gt; &amp;,const std::vector&lt;_Ty,_Alloc&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::vector&lt;_Ty,_Alloc&gt; &amp;'</code> from <code>'const skl::Bone'</code>    c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  16  error C2784: <code>'bool std::operator &lt;(const std::list&lt;_Ty,_Ax&gt; &amp;,const std::list&lt;_Ty,_Ax&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::list&lt;_Ty,_Ax&gt; &amp;'</code> from <code>'const skl::Bone'</code>   c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  17  error C2784: <code>'bool std::operator &lt;(const std::reverse_iterator&lt;_RanIt&gt; &amp;,const std::reverse_iterator&lt;_RanIt2&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::reverse_iterator&lt;_RanIt&gt; &amp;'</code> from <code>'const skl::Bone'</code> c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  18  error C2784: <code>'bool std::operator &lt;(const std::_Revranit&lt;_RanIt,_Base&gt; &amp;,const std::_Revranit&lt;_RanIt2,_Base2&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::_Revranit&lt;_RanIt,_Base&gt; &amp;'</code> from <code>'const skl::Bone'</code>   c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  19  error C2784: <code>'bool std::operator &lt;(const std::pair&lt;_Ty1,_Ty2&gt; &amp;,const std::pair&lt;_Ty1,_Ty2&gt; &amp;)'</code> : could not deduce template argument for <code>'const std::pair&lt;_Ty1,_Ty2&gt; &amp;'</code> from <code>'const skl::Bone'</code> c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  <p>Error  20  error C2676: binary <code>'&lt;'</code> : <code>'const skl::Bone'</code> does not define this operator or a conversion to a type acceptable to the predefined operator   c:\Program Files\Microsoft Visual Studio 9.0\VC\include\utility 103</p>
  </blockquote>