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

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


================
@@ -144,7 +144,8 @@ _LIBCPP_HIDE_FROM_ABI decltype(auto) __visit_format_arg(_Visitor&& __vis, basic_
   __libcpp_unreachable();
 }
 
-#  if _LIBCPP_STD_VER >= 26
+#  if _LIBCPP_STD_VER >= 26 && (!defined(_LIBCPP_COMPILER_CLANG_BASED) || _LIBCPP_CLANG_VER >= 1800)
----------------
mordante wrote:

Actually let's make this more portable. This macro is introduced by https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p0847r7.html
```suggestion
#  if _LIBCPP_STD_VER >= 26 && defined(__cpp_explicit_this_parameter)
```

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


More information about the cfe-commits mailing list