llvm-project
84db4da2 - [libc] Fix character converter in C++20 (#177421)

Commit
88 days ago
[libc] Fix character converter in C++20 (#177421) Internally character converter uses char8_t to represent a character. Before C++20 we provide a typedef for it, but since C++20 it's a keyword. The keyword version isn't listed in our is_integral, causing countl to reject it as an invalid type. This patch just casts from char8_t to int8_t to sidestep the issue, but in future we may want to add char8_t, char16_t, and char32_t to our is_integral.
Parents
Loading