[libc-commits] [clang-tools-extra] [flang] [openmp] [llvm] [compiler-rt] [libc] [libcxx] [clang] [lld] [lldb] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)
Mark de Wever via libc-commits
libc-commits at lists.llvm.org
Sat Jan 20 11:21:55 PST 2024
================
@@ -1130,6 +1137,19 @@ using __best_match_t = typename invoke_result_t<_MakeOverloads<_Types...>, _Tp,
} // namespace __variant_detail
+template < class _Visitor, class... _Vs, typename = void_t<decltype(std::__as_variant(std::declval<_Vs>()))...> >
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr decltype(auto)
+visit(_Visitor&& __visitor, _Vs&&... __vs);
+
+# if _LIBCPP_STD_VER >= 20
+template < class _Rp,
----------------
mordante wrote:
```suggestion
template <class _Rp,
```
https://github.com/llvm/llvm-project/pull/76447
More information about the libc-commits
mailing list