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

David Blaikie via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Aug 27 15:58:55 PDT 2020


dblaikie 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)...);
----------------
This surprises me a bit - doesn't `result` need to be mangled (as `__result`, for instance) as in other places, like `__make_vtable_impl`?


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