[libcxx-commits] [PATCH] D92044: Implement P0655R1 visit<R>: Explicit Return Type for visit

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jan 11 16:55:58 PST 2021


zoecarver accepted this revision.
zoecarver added a comment.

Didn't read it too carefully, but this looks good to me.



================
Comment at: libcxx/include/variant:631
+      if constexpr (is_void_v<_Rp>) {
+        _VSTD::__invoke_constexpr(_VSTD::forward<_Visitor>(__visitor),
+                                  _VSTD::forward<_Alts>(__alts).__value...);
----------------
Nit: these can simply be `invoke` now that D93815 landed.


================
Comment at: libcxx/test/std/utilities/variant/variant.visit/visit_return_type.pass.cpp:335
+      return true;
+    } catch (...) {
+    }
----------------
Is there a chance this will throw anything other than bad variant access?


================
Comment at: libcxx/test/support/variant_test_helpers.h:15
 #include <cassert>
+#include <variant>
 
----------------
Is this header needed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92044



More information about the libcxx-commits mailing list