title: bimap implementation in modern C++ without Boost
body: <p>This question has been asked before <a href="https://stackoverflow.com/questions/5647311/is-there-a-boost-bimap-alternative-in-c11">here</a> I admit, but it's now 4 years ago so I dare to ask for an update:</p>
  
  <p>I need a way to add a tuple/pair to a container and search for both - the left and the right element efficiently.</p>
  
  <p>Boost has <code>bimap</code> and <code>multi_index</code> which do exactly what I want but I wonder what's the recommended alternative in plain modern C++-11/14 in case you don't want to introduce a dependency to boost (for whatever reasons).</p>
  
  <p>One answer in the linked suggests that there's no need for s.th. like a bimap any more due to <em>transparent comparators</em>. The accepted answer suggests an implementation combining <code>std::map</code>s to both <code>key1</code> -> <code>key2</code> and <code>key2</code> -> <code>key1</code>.</p>
  
  <p>I don't really know how the transparent comparators help me here and I'm just curious whether there is some <em>this is how you should do it and why</em> - solution. Can you provide some hints/links?</p>