title: boost::multi_index error "template argument 'x' is invalid"
body: <p>So I made some kind of database with boost_multi_index like this:</p>
  
  <pre><code>#include &lt;boost\multi_index_container.hpp&gt;
  #include &lt;boost\multi_index\ordered_index.hpp&gt;
  #include &lt;boost\multi_index\member.hpp&gt;
  using namespace boost::multi_index;
  using namespace std;
  
  struct list_entry{
      int id;
      string name;
      string* data;
  };
  
  typedef multi_index_container&lt;list_entry,
      indexed_by&lt;
          ordered_unique&lt; tag&lt;int&gt;, member&lt;list_entry, int, &amp;list_entry::id&gt;&gt;,                // unique id
          ordered_unique&lt; tag&lt;string&gt;, member&lt;list_entry, string, &amp;list_entry::name&gt;&gt;,        // unique name
          ordered_non_unique&lt; tag&lt;string*&gt;, member&lt;list_entry, string*, &amp;list_entry::data&gt;&gt;   // some data associated with the id/name
      &gt;
  &gt;table;
  
  class Database
  {
      private:    
          table music, names;
          typedef table::index&lt;int&gt;::type list_id;
          typedef table::index&lt;string&gt;::type list_string;
  
      //some more code here
  };
  </code></pre>
  
  <p>and it compiles fine with Visual Studio 2010.</p>
  
  <p>However I wanted to switch my project over to Code::Blocks with MinGW and it seems like he's not so happy with that, this is the compile log:</p>
  
  <pre><code>.\source\db.h|19|error: template argument 3 is invalid|
  .\source\db.h|15|error: template argument 2 is invalid|
  .\source\db.h|15|error: template argument 1 is invalid|
  .\source\db.h|14|error: template argument 2 is invalid|
  .\source\db.h|13|warning: 'typedef' was ignored in this declaration [enabled by default]|
  .\source\db.h|24|error: 'table' does not name a type|
  .\source\db.h|25|error: 'table' does not name a type|
  .\source\db.h|26|error: 'table' does not name a type|
  C:\Program Files\boost_1_54_0\boost\system\error_code.hpp|222|warning: 'boost::system::posix_category' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\system\error_code.hpp|223|warning: 'boost::system::errno_ecat' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\system\error_code.hpp|224|warning: 'boost::system::native_ecat' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\asio\error.hpp|244|warning: 'boost::asio::error::system_category' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\asio\error.hpp|246|warning: 'boost::asio::error::netdb_category' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\asio\error.hpp|248|warning: 'boost::asio::error::addrinfo_category' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\asio\error.hpp|250|warning: 'boost::asio::error::misc_category' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\asio\ssl\error.hpp|34|warning: 'boost::asio::error::ssl_category' defined but not used [-Wunused-variable]|
  C:\Program Files\boost_1_54_0\boost\asio\detail\winsock_init.hpp|116|warning: 'boost::asio::detail::winsock_init_instance' defined but not used [-Wunused-variable]|
  ||=== Build finished: 7 errors, 10 warnings (0 minutes, 15 seconds) ===|
  </code></pre>
  
  <p>I'm completely clueless since the error is not any more specific than that and I couldn't find any related problem.</p>
  
  <p>So I hope someone can give me an answer here, if more information is required I will edit it in afterwards.</p>