title: Problems with boost::multi_index, incomplete type, no matching function call, etc
body: <p>This is with Boost 1.72.0. What am I doing wrong? This is a simple example where I'm trying to create a struct named employee, which can be sorted by both id and name. I wanted to try this out before integrating multi_index into a larger more complex project, which requires a lot more indices. But I ran into errors using the code below. I compiled it using GCC 7.30. Since the error messages are complex and verbose, I left them off.</p>
  
  <p>Here is the full source of the minimal example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  #include &lt;boost/multi_index_container.hpp&gt;
  #include &lt;boost/multi_index/hashed_index.hpp&gt;
  #include &lt;boost/multi_index/member.hpp&gt;
  
  using namespace boost::multi_index;
  
  struct employee {
      employee(unsigned int id, std::string name)
          : id(id), name(name)
      {}
  
      unsigned int id;
      std::string name;
  
      bool operator&lt;(const employee&amp; other) const noexcept {
          return this-&gt;id &lt; other.id;
      }
  };
  
  struct indexedById {};
  struct indexedByName {};
  
  using EmployeeContainer = boost::multi_index_container
  &lt;
      employee,
      indexed_by&lt;
          ordered_unique&lt;tag&lt;indexedById&gt;, identity&lt;employee&gt;&gt;,
          hashed_non_unique&lt;tag&lt;indexedByName&gt;, member&lt;employee, std::string, &amp;employee::name&gt;&gt;
      &gt;
  &gt;;
  
  int main()
  {
      EmployeeContainer mi;
      auto&amp; inserter = mi.get&lt;indexedByName&gt;();
      inserter.emplace(0, "uber duber");
      inserter.emplace(1,  "gotcha");
      inserter.emplace(3, "dang");
  
      for(auto&amp; it : mi.get&lt;indexedById&gt;())
          std::cout &lt;&lt; it.id &lt;&lt; ": " &lt;&lt; it.name &lt;&lt; std::endl;
  
      std::cin.get();
      return 0;
  }
  </code></pre>