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

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jan 18 14:09:59 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)
----------------
H-G-Hristov wrote:

Maybe something like:

```c++
#  if _LIBCPP_STD_VER >= 26 && (defined(__cpp_explicit_this_parameter) || !defined(_LIBCPP_COMPILER_CLANG_BASED) || _LIBCPP_CLANG_VER >= 1800)
...
#endif
```
or 

```c++
#if defined(__cpp_explicit_this_parameter) || !defined(_LIBCPP_COMPILER_CLANG_BASED) || _LIBCPP_CLANG_VER >= 1800
#define _LIBCPP_EXPLICIT_THIS_PARAMETER
#endif
```

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


More information about the libcxx-commits mailing list