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

    <tr>
        <th>Summary</th>
        <td>
            Make `std::variant<>` a soft error (SFINAE friendly)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    https://godbolt.org/z/qqMz6x6xh
Simplified, without `<variant>` : https://godbolt.org/z/zb7TP9W3v
Proposed alternative, on simplified: https://godbolt.org/z/GTz39qrrb
So instead of the internal `static_assert()`, I suggest moving the condition into a constraint
The `static_assert()` in question: https://github.com/llvm/llvm-project/blob/main/libcxx/include/variant#L1164
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyMksFu2zwQhJ9mdSF-Q1zKsnjQwb8TFQGaIkAC9FhQIiVtS5M2STmOn76Q4jRA0SI9CdCC38zsjoqRBmdMDev_YX2TqSmNPtRk1UUF6rLW65d6TOkQQWwBG8Bm8Lr1Nq18GACbC2BzPN5fynN5HiG_gXz7SPuDpZ6MBtyxZ0qjnxKDMgexO6lAyiUQt1DmDMSWfQS_tJunB_lVnF7hD8EffDSaKZtMcCrRycwy3rH4rvsP3E9PFyGPIbRX056Ri8kozXzP0mgYuUXAzs5jUom6bypGExJgBSjnPLhjdyxOw2BiYnt_IjcsTzvvNCXyboZ4puYfMQVFLr2qPY3m71hGjh0nE2fAH5JQGqd21fk9YGPt6e3z3yH476ZLgE1rfQvY7BW5eUhtdz4DNuQ6O2kD2LxdAcVnzssi07XQUkiVmZpvsOKlXJeYjbXsql72yBXnPZdcdaLrtd5UalO1spdFRjXmWPA8X6PIyxxXebFpCymkKLBcoyqhyM1ekV3NFuftZxTjZGrOOZZVZlVrbFzKh-jMM1umgDh3MdRLrnYaIhS5pZjiOyZRsqa-Vz-ui5xvDmL7q1-7a8UUi75PzITgAwOsHpu7L9tb1gcyTtsXQJlNwf5e8Y93vBiNgM01yanGnwEAAP__aewMjg">