title: Struggling to create a Boost-Bimap containing std::bitset
body: <p>I have a number of strings and their bitset equivalents. I need to be able to look up equivalents in both directions, i.e. "<em>str to bitset</em>" and "<em>bitset to str</em>". I believe boost-bimap would be the right container for this job.</p>
  
  <p>I managed to get this to work with strings and integers but my string / bitset bimap does not compile. I am using VS2019 with the latest boost release.</p>
  
  <h2>Integer example works:</h2>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;boost/bimap.hpp&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  
  int main()
  {
      typedef boost::bimap&lt;std::string, int&gt; bimap_str_int_t;
  
      bimap_str_int_t bimap1;
      bimap1.insert(bimap_str_int_t::value_type("A", 1));
      std::cout &lt;&lt; bimap1.left.at("A") &lt;&lt; '\n';  //prints 1
      std::cout &lt;&lt; bimap1.right.at(1) &lt;&lt; '\n';   // prints A
  }
  </code></pre>
  
  <h2>Bitset example fails to compile:</h2>
  
  <pre class="lang-cpp prettyprint-override"><code>#include &lt;boost/bimap.hpp&gt;
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;bitset&gt;
  
  int main()
  {
      typedef std::bitset&lt;3&gt; bitset_t;
      typedef boost::bimap&lt;std::string, bitset_t&gt; bimap_str_bitset_t;
  
      bimap_str_bitset_t bimap2;
      bitset_t bits{ "010" };
  
      bimap2.insert(bimap_str_bitset_t::value_type("A", bits));
      std::cout &lt;&lt; bimap2.left.at("A") &lt;&lt; '\n';
      std::cout &lt;&lt; bimap2.right.at(bits) &lt;&lt; '\n';
  }
  </code></pre>
  
  <p>The bitset example creates the following compiler error:</p>
  
  <blockquote>
    <p>boost_test.cpp(20): message : see reference to class template instantiation 'boost::bimaps::bimap' being compiled</p>
  </blockquote>
  
  <p>I am not sure how to fix this and would greatly appreciate any hints.</p>