Skip to content

feat(libc): implement collate<wchar_t>::_Getcat - #2333

Closed
Darkeox34 wants to merge 1 commit into
boykopovar:mainfrom
Darkeox34:feat/libc-collate-wchar-getcat
Closed

Darkeox34 wants to merge 1 commit into
boykopovar:mainfrom
Darkeox34:feat/libc-collate-wchar-getcat

Conversation

@Darkeox34

Copy link
Copy Markdown

What

Implements collate<wchar_t>::_Getcat
(_ZNSt7collateIwE7_GetcatEPPKNSt6locale5facetEPKS1__nid_postfix) in libc:

  • Implements the wide-character collation facet collate<wchar_t> for the classic C locale.
  • Adds WideString and WideCollateVtable supporting comparison, string transformation (with
    7-element inline capacity) and 64-bit FNV-1a hashing over 16-bit guest wide characters.
  • Expands unit tests in GuestCollate.cpp to verify facet initialization, comparison,
    transformation, hashing, and reference counting lifecycle.
  • Documents collate<wchar_t>::_Getcat in TechnicalDebt.md.

Tested

  • Validated with python tools/check_conventions.py --base upstream/main.
  • Verified progress report with python tools/progress.py.
  • Covered by GuestCollate test suite.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in
    TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#2185 docs/dev/TechnicalDebt.md L351

@Kikoarl

Kikoarl commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Tested on Linux (CachyOS x86_64, Intel RPL-S iGPU / Mesa 26.3.0-devel / Vulkan 1.4.363, GCC 16.2.1) at c49df772:

  • Build: Built cleanly in RAM (/tmp/anyps5_build) with zero warnings/errors.
  • Conventions: python3 tools/check_conventions.py --base origin/main --head HEAD -> PASS (0 errors).
  • Verification: Verified GuestCollate.cpp test suite. Correctly implements wide-character collation categorization for libc++ runtime.

LGTM!

@popcoder565

Copy link
Copy Markdown
Contributor

Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head c49df772, merged onto main f8c2f07 in one build with 9 other PRs that had no Windows run.

No title was run.

🤖 Addressed by Claude Code

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is shown to reach collate<wchar_t>::_Getcat on main. Reopen with the title ID and the log line where it stops if one does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants