[libcxx-commits] [PATCH] D134110: [libc++][format] Implements formattable concept.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 4 09:25:58 PDT 2022


ldionne accepted this revision.
ldionne added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libcxx/docs/Status/Cxx2bIssues.csv:184
 "`3713 <https://wg21.link/LWG3713>`__","Sorted with respect to comparator (only)","July 2022","",""
 "`3715 <https://wg21.link/LWG3715>`__","``view_interface::empty`` is overconstrained","July 2022","",""
 "`3719 <https://wg21.link/LWG3719>`__","Directory iterators should be usable with default sentinel","July 2022","",""
----------------
Commit message typo:

> has be written as-if LWG3636 is accepted and refers to that LWG issue.

should be

> has been written as-if LWG3636 is accepted and refers to that LWG issue.


================
Comment at: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp:8-12
 // UNSUPPORTED: c++03, c++11, c++14, c++17
+// The formattable concept is available in C++23.
+// In C++20 libc++ has the concept available as std::__formattable.
+// (This concept is used in the implementation of <format>.)
+// UNSUPPORTED: !stdlib=libc++ && c++20
----------------
As a general rule, we only test public APIs. If there's a problem with `__formattable` in C++20, we should have a C++20 test using public facing APIs that fails.


================
Comment at: libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp:58-62
+#if TEST_STD_VER > 20
+  static_assert(!std::formattable<T, CharT>);
+#else
   static_assert(!std::__formattable<T, CharT>);
+#endif
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134110



More information about the libcxx-commits mailing list