Closed Od0VxibTqto6Hs closed 11 months ago
TDLib has multiple incompatibilities with C++20 and currently is supposed to be built with a C++14 compiler as specified in CMakeLists.txt.
C++20 doesn't have anymore a simple way to create UTF-8 encoded strings using character codes, so there is no good way to write this code in C++20.
TDLib has multiple incompatibilities with C++20 and currently is supposed to be built with a C++14 compiler as specified in CMakeLists.txt.
Thanks for your reply and provide the information.
Summary
Tdlib failed to build with
error C2440: 'initializing': cannot convert from 'const char8_t [4]' to 'const td::Slice'
on/std:c++20
option.In C++20 u8 string literals are based on the char8_t type.
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0482r6.html https://learn.microsoft.com/en-us/cpp/build/reference/zc-char8-t?view=msvc-170
Additional Option
Error Info
Related Code
https://github.com/tdlib/td/blob/a7f8ff6eefbb4951d62b9e29bc4f7b95a28a46f0/tdutils/td/utils/emoji.cpp#L188-L195