[libcxx-commits] [PATCH] D134031: [libc++][test] Adds format string helper.

Victor Zverovich via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Sep 17 08:17:07 PDT 2022


vitaut added a comment.

One minor comment inline otherwise looks great. Much more readable than `template operator()`!



================
Comment at: libcxx/test/std/time/time.syn/formatter_tests.h:33-35
+inline constexpr auto check =
+    []<class CharT, class... Args>(
+        std::basic_string_view<CharT> expected, test_format_string<CharT, Args...> fmt, Args&&... args) constexpr {
----------------
Why is this a lambda and not a normal function? If it was the latter you could have a locale overload without inventing a new name.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134031



More information about the libcxx-commits mailing list