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

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


================
@@ -267,7 +366,8 @@ class _LIBCPP_TEMPLATE_VIS basic_format_arg<_Context>::handle {
 // This function is user facing, so it must wrap the non-standard types of
 // the "variant" in a handle to stay conforming. See __arg_t for more details.
 template <class _Visitor, class _Context>
-_LIBCPP_HIDE_FROM_ABI decltype(auto) visit_format_arg(_Visitor&& __vis, basic_format_arg<_Context> __arg) {
+_LIBCPP_DEPRECATED_IN_CXX26 _LIBCPP_HIDE_FROM_ABI decltype(auto)
----------------
mordante wrote:

let's not show a deprecated message when the replacement can't be used by the user's compiler.
```suggestion
#ifdef __cpp_explicit_this_parameter
_LIBCPP_DEPRECATED_IN_CXX26 
#endif
_LIBCPP_HIDE_FROM_ABI decltype(auto)
```

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


More information about the libc-commits mailing list