This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by mpark on Jun 12 2017, 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

Event Timeline

mpark created this revision.Jun 12 2017, 12:07 PM
mpark edited the summary of this revision. (Show Details)Jun 12 2017, 12:08 PM
mpark updated this revision to Diff 102223.Jun 12 2017, 12:11 PM

Add tests.

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

LGTM.

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