title: How do I insert into a Boost MPL map
body: <p>I manage to use Boost MPL vectors and lists just fine, but I just can't figure out maps. When I try to insert into one, I get "too few arguments" from clang 3.1 (gcc 4.7 says something similar). There is a version of insert where the second argument is POS, which is supposed to be ignored, so I tried inserting a dummy type (int) there, but that just gives a new and confusing error.</p>
  
  <pre><code>include &lt;iostream&gt;
  
  #include &lt;boost/mpl/key_type.hpp&gt;
  #include &lt;boost/mpl/map.hpp&gt;
  
  using namespace boost;
  using namespace mpl;
  
  int main(){
  
    typedef pair&lt;int_&lt;3&gt;, int_&lt;6&gt;&gt; obj;
  
    std::cout &lt;&lt; key_type&lt;map&lt;&gt;, obj &gt;::type::value &lt;&lt; std::endl; //works
  
    std::cout &lt;&lt; has_key&lt;insert&lt;map&lt;&gt;, obj&gt;::type, obj)::type::value &lt;&lt; std::endl; //complains on "too few template arguments for class template 'insert'
  
    std::cout &lt;&lt; has_key&lt;insert&lt;map&lt;&gt;, int, obj&gt;::type, obj)::type::value &lt;&lt; std::endl; // gives "implicit instantiation of undefined template 'boost::mpl::insert&lt;..."
  }
  </code></pre>
  
  <p>MPL errors aren't exactly helpful, even with clang, so I just don't understand what I am doing wrong here? I am sure it is something silly.</p>
  
  <p><a href="http://www.boost.org/doc/libs/1_51_0/libs/mpl/doc/refmanual/map.html" rel="nofollow">http://www.boost.org/doc/libs/1_51_0/libs/mpl/doc/refmanual/map.html</a></p>