Add a missing SFINAE condition to the variant's converting constructor.
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.
Reviewers: EricWF, K-ballo
Reviewed By: EricWF
Subscribers: fhahn
Differential Revision: https://reviews.llvm.org/D34112
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1116,6 +1116,8 @@ public:
|
||||
template <
|
||||
class _Arg,
|
||||
enable_if_t<!is_same_v<decay_t<_Arg>, variant>, int> = 0,
|
||||
enable_if_t<!__is_inplace_type<decay_t<_Arg>>::value, int> = 0,
|
||||
enable_if_t<!__is_inplace_index<decay_t<_Arg>>::value, int> = 0,
|
||||
class _Tp = __variant_detail::__best_match_t<_Arg, _Types...>,
|
||||
size_t _Ip =
|
||||
__find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
|
||||
|
||||
Reference in New Issue
Block a user