<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/64578>64578</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang++ fails to compile the code while Ok using g++
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zylthinking
      </td>
    </tr>
</table>

<pre>
    ```
#include <boost/variant/variant.hpp>
template<typename T> struct C {
    T one;
};

class A {};

struct B
{
    boost::variant<A, C<B>*> x;
};

int main() {
    return 0;
}

```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8ksFuozAQQL9muIwaGRtMcvCB0Oa6l_6AMQN4a2yETXezX78ioW2qlVZCMNjzZp7G1jHawRMpKM9QPmd6TWNY1J-rS6P1b9YPWRu6qwLJ9oc9A6uBC-uNWztCEE0bQkzAL-96sdo_RIdxnkG83JlE0-x0IhBNus7k9UT4CuIFY1pWk7BBqM73VETEVwyeQOwrUD1_xbe3cTpGrG_QP5t7yU_4oe5dVtQg6g9f0dTAG2xANOdNl9eb1u__NLc-4aStB34EfvouvlBaF4_sG_7Afo4y65ToTuKkM1K5POWyyGVVZqPKT7IzlOu8KPNWFEJWnenLqu95bo6y6DOrOOOCHXPGCl6V5UEWWuu-r6jPWSfLCgpGk7bu4Nz7dAjLkNkYV1KyKKtj5nRLLn4c-aK2pKd2HSIUzNmY4heWbHKkjNN-AH4GfsZeWxcxBTRhmq0jTCOhCR3hr3H7_fGGa7R-wB3I1sWpMaU5bkPnF-CXwaZxbQ8mTMAvW6v98zQv4SeZ7QLddCPwy834bwAAAP__rEPCrw">