[libcxx-commits] [libcxx] [libc++] Implement a libc++ private version of isascii (PR #122361)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 9 13:47:18 PST 2025


================
@@ -516,6 +516,8 @@ protected:
 };
 #endif // _LIBCPP_HAS_WIDE_CHARACTERS
 
+inline _LIBCPP_HIDE_FROM_ABI int __libcpp_isascii(int __c) { return (__c & ~0x7F) == 0; }
----------------
ldionne wrote:

I could do that, but `isascii` typically returns `int` on platforms that implement it. It's a common extension. WDYT?

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


More information about the libcxx-commits mailing list