EricWF added inline comments.

================
Comment at: test/std/utilities/variant/variant.helpers/variant_size.pass.cpp:41
+{
+    test<std::variant<>, 0>();
+    test<std::variant<void*>, 1>();
----------------
CaseyCarter wrote:
> STL_MSFT wrote:
> > Hmm, is this cromulent now that empty variants are forbidden?
> It's not forbidden to *name* `variant<>`; it is forbidden to *instantiate* 
> it. The pertinent specialization of `variant_size`:
> ```
> template <class... Types>
> struct variant_size<variant<Types...>>
>   : integral_constant<size_t, sizeof...(Types)> { };
> ```
> is implicitly specified to not instantiate `variant<Types...>`.
Note that there is no similar requirement that `variant<void>` or `variant<T&>` 
can even be named.


https://reviews.llvm.org/D26903



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to