Commit 2fe880d
committed
fix: GCC 16 / C++20 build failure with u8 string literals (#1684)
In C++20, the `u8""` string literal prefix was changed to evaluate to `const char8_t[]` instead of `const char[]`. This caused compilation errors when these literals were implicitly converted to `std::string` or passed to functions expecting `const char*`.
This commit adds `reinterpret_cast<const char*>` around the `u8` string literals in the test suite to resolve the build errors while maintaining the intended UTF-8 semantics.
Additionally, this adds C++20 to the GitHub Actions CMake test matrix to ensure we don't regress on newer standards.
Fixes #16841 parent 755d0a6 commit 2fe880d
2 files changed
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1993 | 1993 | | |
1994 | 1994 | | |
1995 | 1995 | | |
1996 | | - | |
| 1996 | + | |
1997 | 1997 | | |
1998 | 1998 | | |
1999 | 1999 | | |
| |||
3109 | 3109 | | |
3110 | 3110 | | |
3111 | 3111 | | |
3112 | | - | |
| 3112 | + | |
3113 | 3113 | | |
3114 | | - | |
| 3114 | + | |
3115 | 3115 | | |
3116 | 3116 | | |
3117 | 3117 | | |
| |||
3223 | 3223 | | |
3224 | 3224 | | |
3225 | 3225 | | |
3226 | | - | |
| 3226 | + | |
3227 | 3227 | | |
3228 | 3228 | | |
3229 | 3229 | | |
| |||
0 commit comments