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

Mark de Wever via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 20 11:21:58 PST 2024


================
@@ -1273,6 +1293,24 @@ public:
     __impl_.__swap(__that.__impl_);
   }
 
+#  if _LIBCPP_STD_VER >= 26 && defined(_LIBCPP_HAS_EXPLICIT_THIS_PARAMETER)
+  struct __variant_visit_barrier_tag { // unnamable when using standard library modules
----------------
mordante wrote:

I'm not sure what you try to say with the comment. I think it means you use an ugly name to avoid the std modules to fail. Is that correct? If this comment is not to useful. All ugly names are not exported.

Maybe instead add a comment like
```
// Helper class to implement [variant.visit]/10
//   Constraints: The call to visit does not use an explicit template-argument-list
//   that begins with a type template-argument.
```

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


More information about the cfe-commits mailing list