Commit 71d46ca
authored
fix: GCC 16 / C++20 build failure with u8 string literals (#1685)
* 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 #1684
* style: run clang-format1 parent 4f7d46f commit 71d46ca
2 files changed
Lines changed: 8 additions & 6 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 | 2000 | | |
| |||
3109 | 3110 | | |
3110 | 3111 | | |
3111 | 3112 | | |
3112 | | - | |
3113 | | - | |
3114 | | - | |
| 3113 | + | |
| 3114 | + | |
| 3115 | + | |
3115 | 3116 | | |
3116 | 3117 | | |
3117 | 3118 | | |
| |||
3223 | 3224 | | |
3224 | 3225 | | |
3225 | 3226 | | |
3226 | | - | |
| 3227 | + | |
| 3228 | + | |
3227 | 3229 | | |
3228 | 3230 | | |
3229 | 3231 | | |
| |||
0 commit comments