[libcxx-commits] [PATCH] D144326: [libc++][format] Addresses LWG3720.

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Mar 14 10:27:46 PDT 2023


Mordante marked an inline comment as done.
Mordante added inline comments.


================
Comment at: libcxx/test/std/utilities/format/format.string/format.string.std/lwg3720_arg_id_width_precision_allowed_types.verify.cpp:31
+void test_char_width() {
+  // expected-error-re@*:* {{call to consteval function {{.*}} is not a constant expression}}
+  TEST_IGNORE_NODISCARD std::format("{:{}}", 42, true);
----------------
ldionne wrote:
> Do we get some sort of note that explains the reason for the format failing to parse?
Unfortunately no. I know it can be done with template magic, but that seems non-trivial to do. I have considered adding a way to get better compile time errors in Clang. There is a recent paper by Barry (P2758) which proposes something like that, but even more powerful than I originally considered.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144326



More information about the libcxx-commits mailing list