[libcxx-commits] [PATCH] D147850: [libc++] Implements isblank.

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Apr 8 06:37:35 PDT 2023


philnik accepted this revision.
philnik added a comment.
This revision is now accepted and ready to land.

Crazy that nobody complained about this in the past 10 years. LGTM.



================
Comment at: libcxx/include/__locale:930-937
+_LIBCPP_HIDE_FROM_ABI
+bool
+isblank(_CharT __c, const locale& __loc)
+{
+    return std::use_facet<ctype<_CharT> >(__loc).is(ctype_base::blank, __c);
+}
+
----------------
Maybe clang-format this?


================
Comment at: libcxx/test/std/localization/locales/locale.convenience/classification/isblank.pass.cpp:20
+  std::locale l;
+  assert(std::isblank(' ', l));
+  assert(!std::isblank('<', l));
----------------
Is `\t` also considered blank?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147850/new/

https://reviews.llvm.org/D147850



More information about the libcxx-commits mailing list