title: Creating map entry using a user-defined conversion
body: <p>I'm got a map of key type <code>std::pair&lt;Foo,Bar&gt;</code> and value <code>in</code> which I would like to insert into a map by passing the pair <code>std::pair&lt;std::pair&lt;Foo,Bar&gt; , int&gt;</code> to the insert function like so (<a href="http://rextester.com/XPEDIS38152" rel="nofollow">online source</a>)</p>
  
  <pre><code>struct Foo{};
  struct Bar{};
  
  typedef std::pair&lt;Foo,Bar&gt;        FooBar;
  typedef std::pair&lt;FooBar,int&gt;     FooBarPair;
  typedef std::map&lt;FooBar,int&gt;      FooBarMap;
  
  
  struct FooBarData
  {    
      operator const FooBarPair() const
      {
          return std::make_pair( std::make_pair( m_foo , m_bar ) , m_num );
      }
  
  private:
      int     m_num;
      Foo     m_foo;
      Bar     m_bar;
  };
  
  int main()
  {
      FooBarData  fbd;
      FooBarMap   fbm;
  
      fbm.insert( fbd );
  }
  </code></pre>
  
  <p>clang error message</p>
  
  <pre><code>/usr/include/c++/v1/map:1041:9: note: candidate function not viable: no known conversion from 'FooBarData' to 'const value_type' (aka 'const pair&lt;const key_type, mapped_type&gt;') for 1st argument
      insert(const value_type&amp; __v) {return __tree_.__insert_unique(__v);}
      ^
  /usr/include/c++/v1/map:1050:14: note: candidate function template not viable: requires 2 arguments, but 1 was provided
      void insert(_InputIterator __f, _InputIterator __l)
           ^
  /usr/include/c++/v1/map:1045:9: note: candidate function not viable: requires 2 arguments, but 1 was provided
      insert(const_iterator __p, const value_type&amp; __v)
  </code></pre>
  
  <p>Is there any fix along these lines?</p>