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

    <tr>
        <th>Summary</th>
        <td>
            Clang18.1.3 compiles libcxx error
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

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

    <tr>
      <th>Reporter</th>
      <td>
          W-M-R
      </td>
    </tr>
</table>

<pre>
    Clang18.1.3 compiles libcxx17.0.6, using -std=gnu++20, and reports the following error. What's the problem? How to solve it?
```
include/libcxx/string:4408:24: error: constexpr function's return type 'basic_string<char>' is not a literal type
 4408 |     basic_string<char> operator""s( const char *__str, size_t __len )
      |                        ^
include/libcxx/string:1095:10: note: 'basic_string<char>' is not literal because its destructor is not constexpr
 1095 |   inline ~basic_string() {
      | ^
include/libcxx/string:4423:27: error: constexpr function's return type 'basic_string<char8_t>' is not a literal type
 4423 | basic_string<char8_t> operator""s(const char8_t *__str, size_t __len)
 |                           ^
include/libcxx/string:1095:10: note: 'basic_string<char8_t>' is not literal because its destructor is not constexpr
 1095 |   inline ~basic_string() {
      | ^
include/libcxx/string:4430:28: error: constexpr function's return type 'basic_string<char16_t>' is not a literal type
 4430 | basic_string<char16_t> operator""s( const char16_t *__str, size_t __len )
 |                            ^
include/libcxx/string:1095:10: note: 'basic_string<char16_t>' is not literal because its destructor is not constexpr
 1095 |   inline ~basic_string() {
      | ^
include/libcxx/string:4436:28: error: constexpr function's return type 'basic_string<char32_t>' is not a literal type
 4436 | basic_string<char32_t> operator""s( const char32_t *__str, size_t __len )
 |                            ^
include/libcxx/string:1095:10: note: 'basic_string<char32_t>' is not literal because its destructor is not constexpr
 1095 |   inline ~basic_string() {
      |          ^
4 errors generated.
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMlk9v4zYQxT_N6EJYoIb6Qx90UJIVeumllz0alDSRWdCkQFLZbA_97AX9p9ttEicHYxHCAA1oRu-9-YEQVQh6tkQtVHdQPWRqjXvn26-b3zd_ZIObvrf3Rtm5kHmRCza6w6INBWb0MD4_F03O8xrwnq1B25ltQpxAPMx2BbwDvEOenik7MU-L8zGwuCf26Ixx31I9ee98zr7uVQRsTk8X7wZDBxA9-819Y9Gx4MwTMR1B9MA7qPn5xzttR7NOBNif_AD2IXptZxBdWXIJosMSRHcSSn9GZ0Ok58Wzx9WOUTt7FPYUV29Z_L4QA2wGFfS4u7zqftwrD-ILYMN0YNZFppjRkbwyxxbgHUtyDJp7ltbr_cwt5FV0HhABMQDKkx-WChhgt0s9aWRB_0W7yHY7Q5YBbpPCcV0UXllQfXlnJAXfVsctTcK6SGn_SNxL2IFGtYbEIrCJQvTrGJ2_VP072-Q2aZ3damu0Jfb3TzIoAbcMmrufor2foSxRJKzNbbDKXXyfLIqjuTfbXwH7g6vcxTfRnslegXprri_yfiq0IiVAeRu0Rf0RtoK_xfbcf_3UpqJ3T-51vrcF_DL15yJc35CwwA8Rrt8ifO6_TjgVfSrCL1P_MsL_C1SeGAY2k00TpCn_7wc6m1oxbcVWZdQWTVWWtWyKJtu3tXgcy2ZLhGNNpSxoK2QlJ8SSsFCTynSLHCsuec0lVkWTP9bbopJCjNMoqZIFlJwOSpvcmKdD7vyc6RBWaosKseGZUQOZcLzSIKZhn64jiW_1kPk2dW2GdQ5QcqNDDD_eE3U0dO3Oc8qcrd60-xiXAKID7AH7Wcf9OuSjOyTC5umybRbv_qQxAvZHkwGwP_t8avGfAAAA__9iuuvc">