[Lldb-commits] [compiler-rt] [lldb] [libc] [clang-tools-extra] [mlir] [llvm] [clang] [flang] [lld] [libcxx] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

Mark de Wever via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 18 11:35:52 PST 2024


================
@@ -19,19 +19,25 @@
 #include "test_macros.h"
 #include "make_string.h"
 
+#if _LIBCPP_STD_VER >= 26
+TEST_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
+#endif
+
 template <class Context, class To, class From>
 void test(From value) {
   auto store = std::make_format_args<Context>(value);
   const std::basic_format_args<Context> format_args{store};
 
-  std::visit_format_arg(
-      [v = To(value)](auto a) {
-        if constexpr (std::is_same_v<To, decltype(a)>)
-          assert(v == a);
-        else
-          assert(false);
-      },
-      format_args.get(0));
+  auto visitor = [v = To(value)](auto a) {
+    if constexpr (std::is_same_v<To, decltype(a)>)
+      assert(v == a);
+    else
+      assert(false);
+  };
+#if _LIBCPP_STD_VER >= 26
----------------
mordante wrote:

This needs to test for the FTM too.

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


More information about the lldb-commits mailing list