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

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 25 09:32:24 PDT 2021


curdeius added inline comments.


================
Comment at: libcxx/include/variant:1680
+    class _Visitor, class... _Vs,
+    typename = void_t<decltype(_VSTD::__as_variant(_VSTD::declval<_Vs>()))...> >
 inline _LIBCPP_INLINE_VISIBILITY
----------------
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`?


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