[libcxx-commits] [PATCH] D97394: [libc++] [C++2b] [P2162] Allow inheritance from std::variant.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 25 09:52:46 PDT 2021


ldionne added a comment.

Ship it!



================
Comment at: libcxx/include/variant:1680
+    class _Visitor, class... _Vs,
+    typename = void_t<decltype(_VSTD::__as_variant(_VSTD::declval<_Vs>()))...> >
 inline _LIBCPP_INLINE_VISIBILITY
----------------
curdeius wrote:
> ldionne wrote:
> > `void_t` here is not necessary. Just `typename = decltype(...)` should be sufficient for SFINAE. Same below.
> @ldionne, but... `_Vs` is a parameter pack. How can that be done without `void_t`?
My bad, I looked too quickly.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97394



More information about the libcxx-commits mailing list