title: Boost variant of references and equality comparison
body: <p>The following program aborts:</p>
  
  <pre><code>#include &lt;boost/variant.hpp&gt;
  
  using variant_type = boost::variant&lt; int&amp;, std::string&amp; &gt;;
  
  int main () {
      int a, b;
  
      variant_type v (a), u (b);
      v == u;
  
      return 0;
  }
  </code></pre>
  
  <p>with:</p>
  
  <pre><code>$ g++ -std=c++14 t.cpp &amp;&amp; ./a.out 
  a.out: /opt/boost/default/include/boost/variant/detail/forced_return.hpp:39: T boost::detail::variant::forced_return() [with T = const int&amp;]: Assertion `false' failed.
  Aborted (core dumped)
  </code></pre>
  
  <p>AFAICT you can't compare for equality between variants of non-const references because of a wrong overload of operator function-call being selected in class known_get. known_get is instantiated for const T in the comparer visitor instead of what seems should have been T (variant.hpp:905 in v1.59.0).</p>
  
  <p>Am I missing something?</p>