File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -107,10 +107,23 @@ struct direct_type<T>
107
107
108
108
#if __cpp_lib_logical_traits >= 201510L
109
109
110
+ using std::conjunction;
110
111
using std::disjunction;
111
112
112
113
#else
113
114
115
+ template <typename ...>
116
+ struct conjunction : std::true_type {};
117
+
118
+ template <typename B1>
119
+ struct conjunction <B1> : B1 {};
120
+
121
+ template <typename B1, typename B2>
122
+ struct conjunction <B1, B2> : std::conditional<B1::value, B2, B1>::type {};
123
+
124
+ template <typename B1, typename ... Bs>
125
+ struct conjunction <B1, Bs...> : std::conditional<B1::value, conjunction<Bs...>, B1>::type {};
126
+
114
127
template <typename ...>
115
128
struct disjunction : std::false_type {};
116
129
@@ -595,7 +608,8 @@ class variant
595
608
helper_type::copy (old.type_index , &old.data , &data);
596
609
}
597
610
598
- VARIANT_INLINE variant (variant<Types...>&& old) noexcept (std::is_nothrow_move_constructible<types>::value)
611
+ VARIANT_INLINE variant (variant<Types...>&& old)
612
+ noexcept (detail::conjunction<std::is_nothrow_move_constructible<Types>...>::value)
599
613
: type_index(old.type_index)
600
614
{
601
615
helper_type::move (old.type_index , &old.data , &data);
You can’t perform that action at this time.
0 commit comments