Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unicode : avoid char32_t #7957

Merged
merged 1 commit into from
Jun 16, 2024
Merged

unicode : avoid char32_t #7957

merged 1 commit into from
Jun 16, 2024

Conversation

ggerganov
Copy link
Member

@ggerganov ggerganov commented Jun 16, 2024

Is there any reason to prefer char32_t over uint32_t? The latter seems more appropriate

@ggerganov ggerganov requested a review from jaime-m-p June 16, 2024 10:19
@ggerganov ggerganov merged commit 5239925 into master Jun 16, 2024
73 checks passed
@jaime-m-p
Copy link
Collaborator

jaime-m-p commented Jun 16, 2024

@ggerganov
I just think char32_t fits better the semantic of codepoint. Also I suggest the other way..
There is not really a reason (I think this is like code-style) so I have no problem.

UTF-32 is a fixed-length encoding, in contrast to all other Unicode transformation formats, which are variable-length encodings.
Each 32-bit value in UTF-32 represents one Unicode code point and is exactly equal to that code point's numerical value.

char32_t - type for UTF-32 character representation, required to be large enough to represent any UTF-32 code unit (32 bits). It has the same size, signedness, and alignment as std::uint_least32_t, but is a distinct type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants