title: map.insert: "Invalid arguments" error with pair<enum,vector<*>>
body: <p><em>EDIT 4: Ok, I narrowed the problem down to a small cpp file giving the same error message which everyone can reproduce:</em></p>
  
  <pre><code>#include&lt;vector&gt;
  #include&lt;map&gt;
  using namespace std;
  
  namespace{enum class Colors{Black,White};}
  
  class dummyClass{};
  
  class MapTest
  {
      vector&lt;dummyClass*&gt; Dummys;
      map&lt;Colors,vector&lt;dummyClass*&gt;&gt; dummyMap;
  public:
      MapTest()
      {
          Dummys.push_back(new dummyClass);
          Dummys.push_back(new dummyClass);
          dummyMap.insert(make_pair(Colors::White,Dummys));
      }
      ~MapTest()
      {
          for(unsigned int i=0;i&lt;Dummys.size();++i)
          {
              delete Dummys[i];
          }
          Dummys.clear();
          dummyMap.clear();
      }
  
  };
  
  int main()
  {
      MapTest m;
  }
  </code></pre>
  
  <p><em>EDIT 3: In case anyone wonders. I delete all Pointers in the destructor. Didn't post it since I figured it's not relevant to the problem</em></p>
  
  <p><em>EDIT 2: Added more details in the .cpp file. The classes "Bauer" and "Position" shouldn't be of any relevance.</em></p>
  
  <p>My header file match.h:</p>
  
  <pre><code>#include &lt;map&gt;
  #include"Bauer.h"
  class Match
  {
      int counter{0};
      std::vector&lt;Figuren*&gt; allFiguresWhite;
      std::vector&lt;Figuren*&gt; allFiguresBlack;
      std::map&lt;Farben,std::vector&lt;Figuren*&gt;&gt; samePlayerFig;
      std::map&lt;Farben,std::vector&lt;Figuren*&gt;&gt; otherPlayerFig;
     //more code...
  }
  </code></pre>
  
  <p>"Farben" is just a enum : <code>enum class Farben{black, white};</code> 
  In my match.cpp I try at one point to insert a par into the map:</p>
  
  <pre><code>#include "match.h"
  using namespace std;
  
  Match::Match()
  {
      cout&lt;&lt;"Let the games begin\n";
      InitGame();
  }
  
  void Match::InitGame()
  {
      for(int i=1;i&lt;9;i++)
      {
          allFiguresWhite.push_back(new Bauer(Position{2,i},Farben::white, counter++));
          allFiguresBlack.push_back(new Bauer(Position{7,i},Farben::black,counter++));
      }
      samePlayerFig.insert(make_pair(Farben::white,allFiguresWhite));
      //more code...
  }
  </code></pre>
  
  <p>Unfortunately I get the compiler error "Invalid arguments' " in this line with "insert" beeing underlined in red.
  Any idea what I did wrong? </p>
  
  <p>EDIT:
  Here is the complete error message</p>
  
  <blockquote>
    <p>Invalid arguments ' Candidates are:
    std::pair>>>,bool>
    insert(const std::pair>> &amp;) std::pair>>>,bool>
    insert(#10000 &amp;&amp;) void insert(std::initializer_list>>>)
    std::_Rb_tree_iterator>>> insert(std::_Rb_tree_const_iterator>>>, const
    std::pair>> &amp;) std::_Rb_tree_iterator>>> insert(std::_Rb_tree_const_iterator>>>, #10000 &amp;&amp;)
    void insert(#10000, #10000) ' match.cpp   /chessGame  line 17 Semantic
    Error</p>
  </blockquote>