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

    <tr>
        <th>Summary</th>
        <td>
            [libc++] `variant` hasn't implemented P1957R2
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            bug,
            libc++,
            rejects-valid
      </td>
    </tr>

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

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

<pre>
    As witnessed by failure to compile [this TU](https://godbolt.org/z/sTaqn1vdW) which assigns `std::true_type` to a `variant<bool>`. P1957R2 "Converting from `T*` to `bool` should be considered narrowing" was a C++20 core language change with minor library impact. Clang has implemented it (according to cppreference, anyway) I suspect libc++ maintainers didn't realize the CWG paper had changes to library wording as well.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxdUktv3CAQ_jX4gmLZsH4dfNg4bdVbVaXKscIwXlOx4AJey_n1HTabZhUJBAzMfI9hdGrvj4FuOloIARQddzoJbVYPNDoq3XnRBiipHuOsA33-Raonwto5xiUQfiTsK46TU6MzMXf-hKdXnOFZ_LXlRb0Q1tFt1nKmIgR9soGSughRpVx-jH6F33FfAIMJTqTbi_Ba2Ej4MDpnCP-CsZz-KLuq-ckoYWxw9gI-anuik3fnlPNM2PFWA5drHp7C7FaDkgB12KAVeBRohfduw2SsRDcREHQg7BEHK_Ad6jbCnlZxwqwZd5DMmelZW-ep0aMXfqf6vAgZczqkt3TGKhgxcAYbEUJHpNkKidVUYpmMXBYPExKwEggbqLD7Jvbkznca1rCAjKm4fGNCz0LbiBN8oEorS1gTqQdh9Cv2ZQY6vHyji1jAI7i6EQ0J6J3hdsNGahsYk2fQl3VdHMoD44dM9Vx1vBNZ1NFAj-39AMcO37cBfUR9bwzuRd4akq3e9J--A_q1jjn-HTwYc3lfHhbv_qBQPOoQVgi4qZqSd9ncH2RTT5MsuYSuaKGppRor1RZNNZaNHHlmxAgmJKbYt3FN3Us-4nLH_H_MQwIKDxd0TKVw9ZTpnhWMFW3Jy7YsOM_lJOquaTvZ1oeRsYkcCkDjTZ7Ips-c-f7KG-ECXhodYvi4fPvQcHUv1RdrnJ3vBxFgH4SP4LOrzP6q8R86eBkx">