[flang-commits] [libc] [clang] [clang-tools-extra] [libcxx] [compiler-rt] [lldb] [llvm] [flang] [libc++][variant] P2637R3: Member `visit` (`std::variant`) (PR #76447)

Mark de Wever via flang-commits flang-commits at lists.llvm.org
Sat Dec 30 04:10:45 PST 2023


================
@@ -69,6 +69,12 @@ namespace std {
 
     // 20.7.2.6, swap
     void swap(variant&) noexcept(see below);
+
+    // [variant.visit], visitation
+    template<class Self, class Visitor>
+      constexpr decltype(auto) visit(this Self&&, Visitor&&);
+    template<class R, class Self, class Visitor>
+      constexpr R visit(this Self&&, Visitor&&);
----------------
mordante wrote:

```suggestion
    template<class Self, class Visitor>
      constexpr decltype(auto) visit(this Self&&, Visitor&&);    // Since C++26
    template<class R, class Self, class Visitor>
      constexpr R visit(this Self&&, Visitor&&);                 // Since C++26
```

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


More information about the flang-commits mailing list