[libcxx-commits] [PATCH] D85420: [libcxx/variant] Introduce `switch`-based mechanism for `std::visit`.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 1 08:01:16 PDT 2020


ldionne added inline comments.


================
Comment at: libcxx/include/variant:877
   static _Tp& __construct_alt(__alt<_Ip, _Tp>& __a, _Args&&... __args) {
-    ::new ((void*)_VSTD::addressof(__a))
+    auto* result = ::new ((void*)_VSTD::addressof(__a))
         __alt<_Ip, _Tp>(in_place, _VSTD::forward<_Args>(__args)...);
----------------
dblaikie wrote:
> This surprises me a bit - doesn't `result` need to be mangled (as `__result`, for instance) as in other places, like `__make_vtable_impl`?
This was fixed in https://reviews.llvm.org/D86827.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85420/new/

https://reviews.llvm.org/D85420



More information about the libcxx-commits mailing list