[libc-commits] [libc] [libc][wctype] Upstream custom slice implementation from PtrHash-cc prototype to LLVM libc (PR #174779)

Marcell Leleszi via libc-commits libc-commits at lists.llvm.org
Fri Jan 9 06:21:27 PST 2026


https://github.com/mleleszi commented:

Not sure inheritance is the cleanest way to model this (and cpp::span doesn't have a virtual destructor anyways, which probably won't be an issue in your use case, but still), looks like this class doesn't provide much utility over cpp::span...Why not just implement contains and binary_search_by as freestanding functions that take in a cpp::span? Or better, why not just implement generic versions in libc/src/__support/CPP/algorithm.h?

https://github.com/llvm/llvm-project/pull/174779


More information about the libc-commits mailing list