title: Errors 2676 and 2784 (...could not deduce template argument for...) when inserting vector of structs into set
body: <p>I am getting the following build errors when I try to run my program (in VS):</p>
  
  <pre class="lang-none prettyprint-override"><code>Error   10  error C2676: binary '&lt;' : 'const move' does not define this operator or a conversion to a type acceptable to the predefined operator
  Error   4   error C2784: 'bool std::operator &lt;(const _Elem *,const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;)' : could not deduce template argument for 'const _Elem *' from 'const move'
  Error   8   error C2784: 'bool std::operator &lt;(const std::_Revranit&lt;_RanIt,_Base&gt; &amp;,const std::_Revranit&lt;_RanIt2,_Base2&gt; &amp;)' : could not deduce template argument for 'const std::_Revranit&lt;_RanIt,_Base&gt; &amp;' from 'const move'
  Error   1   error C2784: 'bool std::operator &lt;(const std::_Tree&lt;_Traits&gt; &amp;,const std::_Tree&lt;_Traits&gt; &amp;)' : could not deduce template argument for 'const std::_Tree&lt;_Traits&gt; &amp;' from 'const move'
  Error   3   error C2784: 'bool std::operator &lt;(const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;,const _Elem *)' : could not deduce template argument for 'const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;' from 'const move'
  Error   5   error C2784: 'bool std::operator &lt;(const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;,const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;)' : could not deduce template argument for 'const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;' from 'const move'
  Error   6   error C2784: 'bool std::operator &lt;(const std::move_iterator&lt;_RanIt&gt; &amp;,const std::move_iterator&lt;_RanIt2&gt; &amp;)' : could not deduce template argument for 'const std::move_iterator&lt;_RanIt&gt; &amp;' from 'const move'
  Error   9   error C2784: 'bool std::operator &lt;(const std::pair&lt;_Ty1,_Ty2&gt; &amp;,const std::pair&lt;_Ty1,_Ty2&gt; &amp;)' : could not deduce template argument for 'const std::pair&lt;_Ty1,_Ty2&gt; &amp;' from 'const move'
  Error   7   error C2784: 'bool std::operator &lt;(const std::reverse_iterator&lt;_RanIt&gt; &amp;,const std::reverse_iterator&lt;_RanIt2&gt; &amp;)' : could not deduce template argument for 'const std::reverse_iterator&lt;_RanIt&gt; &amp;' from 'const move'
  Error   2   error C2784: 'bool std::operator &lt;(const std::vector&lt;_Ty,_Alloc&gt; &amp;,const std::vector&lt;_Ty,_Alloc&gt; &amp;)' : could not deduce template argument for 'const std::vector&lt;_Ty,_Alloc&gt; &amp;' from 'const move'
  </code></pre>
  
  <p>I have no idea why they are occurring, as I haven't defined any operators in my <code>move</code> struct (see below), nor are there any operators in the part of my code that causes it.</p>
  
  <p>They seem to be caused by this function (which is never called):</p>
  
  <pre><code>std::set&lt;solution&gt; solve(grid board, solution prev) {
      std::set&lt;solution&gt; ret = {};
      ret.insert(prev);    
      return ret;
  }
  </code></pre>
  
  <p>My typedefs/structs that are used above:</p>
  
  <pre><code>struct move {
  public:
      move(unsigned startX, unsigned startY, unsigned endX, unsigned endY) {
          x0 = startX;
          y0 = startY;
          x1 = endX;
          y1 = endY;
      }
      unsigned x0 : 4, y0 : 4, x1 : 4, y1 : 4;
  };
  
  typedef std::vector&lt;std::vector&lt;__int8&gt;&gt; grid;
  typedef std::pair&lt;__int8, __int8&gt; point;
  typedef std::vector&lt;move&gt; solution;
  </code></pre>
  
  <p>Can anyone tell me why this is happening, and what I can do to fix it?</p>
  
  <p>Thanks in advance!</p>