title: Get index by type in std::variant
body: <p>Is there a utility in the standard library to get the <em>index</em> of a given <em>type</em> in <code>std::variant</code>? Or should I make one for myself? That is, I want to get the index of <code>B</code> in <code>std::variant&lt;A, B, C&gt;</code> and have that return <code>1</code>.</p>
  
  <p>There is <code>std::variant_alternative</code> for the opposite operation. Of course, there could be many same types on <code>std::variant</code>'s list, so this operation is not a bijection, but it isn't a problem for me (I can have first occurrence of type on list, or unique types on <code>std::variant</code> list).</p>