Add a missing SFINAE condition to the `variant`'s converting constructor.
ClosedPublic

Authored by mpark on Mon, Jun 12, 12:07 PM.

Details

Summary

Remarks: This function shall not participate in overload resolution unless is_­same_­v<decay_­t<T>, variant> is false, unless decay_­t<T> is neither a specialization of in_­place_­type_­t nor a specialization of in_­place_­index_­t, unless is_­constructible_­v<Tj, T> is true, and unless the expression FUN(​std​::​forward<T>(t)) (with FUN being the above-mentioned set of imaginary functions) is well formed.

Depends on D34111.

Diff Detail

Repository
rL LLVM
mpark created this revision.Mon, Jun 12, 12:07 PM
mpark updated this revision to Diff 102223.Mon, Jun 12, 12:11 PM

Add tests.

EricWF accepted this revision.Sat, Jun 17, 2:38 PM

LGTM.

This revision is now accepted and ready to land.Sat, Jun 17, 2:38 PM
This revision was automatically updated to reflect the committed changes.