https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md
-
Unsurprisingly char8_t is banned
-
Unsurprisingly char8_t is banned
Use char and unprefixed character literals. Non-UTF-8 encodings are rare enough in Chromium that the value of distinguishing them at the type level is low, and char8_t* is not interconvertible with char* (what ~all Chromium, STL, and platform-specific APIs use), so using u8 prefixes would obligate us to insert casts everywhere. If you want to declare at a type level that a block of data is string-like and not an arbitrary binary blob, prefer std::string[_view] over char*.
-
Use char and unprefixed character literals. Non-UTF-8 encodings are rare enough in Chromium that the value of distinguishing them at the type level is low, and char8_t* is not interconvertible with char* (what ~all Chromium, STL, and platform-specific APIs use), so using u8 prefixes would obligate us to insert casts everywhere. If you want to declare at a type level that a block of data is string-like and not an arbitrary binary blob, prefer std::string[_view] over char*.
This makes so much sense and applies to pretty much all codebases I've seen.
-
Use char and unprefixed character literals. Non-UTF-8 encodings are rare enough in Chromium that the value of distinguishing them at the type level is low, and char8_t* is not interconvertible with char* (what ~all Chromium, STL, and platform-specific APIs use), so using u8 prefixes would obligate us to insert casts everywhere. If you want to declare at a type level that a block of data is string-like and not an arbitrary binary blob, prefer std::string[_view] over char*.
@vitaut But the document also banned UDL, so you can't use "text"sv
-
This makes so much sense and applies to pretty much all codebases I've seen.
@vitaut even me who is pro “existing code must rebuild unmodified , no changes means no changes” and “fopen and main must agree which prevents making fopen take utf-8 by default” agrees with this.
-
@vitaut they got them fancy 🧀 swiss maps
-
@vitaut But the document also banned UDL, so you can't use "text"sv
@lichray that’s fine
-
undefined oblomov@sociale.network shared this topic on