Issue |
152270
|
Summary |
Clang18.1.3 compiles libcxx error
|
Labels |
libc++
|
Assignees |
|
Reporter |
W-M-R
|
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.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs