std::common_type with references to type_info
<p>I'm perplexed: upon upgrading to GCC 6 (RC1) some template code using <code>std::common_type</code> that worked before failed. I tried on clang, and that also fails...so I must be doing something wrong!</p>

<p>The code amounts to:</p>

<pre><code>#include &lt;type_traits&gt;
#include &lt;typeinfo&gt;

using namespace std;

// common_type of two const type_info&amp; is ok (compiles ok)
common_type&lt;const type_info&amp;, const type_info&amp;&gt;::type func1();

// common_type of three type_info&amp; is bad...(fails to compile)
common_type&lt;const type_info&amp;, const type_info&amp;, const type_info&amp;&gt;::type func2();

// common_type of two const int&amp; is ok
common_type&lt;const int&amp;, const int&amp;&gt;::type func3();

// common_type of three const int&amp; is ok too!
common_type&lt;const int&amp;, const int&amp;, const int&amp;&gt;::type func4();
</code></pre>

<p>The second <code>common_type</code> with three parameters of type <code>std::type_info const &amp;</code> fails to compile. clang cryptically suggests I use a two-argument <code>std::common_type</code>, but this is in a template expansion where I can't control the inputs!</p>

<p>This seems very odd: why would the <code>const type_info&amp;</code> case with 3 fail but not any of the other seemingly-equivalent type fail?</p>

<p>See here: <a href="https://godbolt.org/g/Ob4y0x" rel="noreferrer">https://godbolt.org/g/Ob4y0x</a> </p>