File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,16 @@ namespace Aws
178
178
VariantDetail::Checker::HasType<typename std::decay<OtherT>::type, Ts...>::value,
179
179
int >::type;
180
180
181
+ using FirstAlternative = typename ThisVariantAlternative<0 >::type;
182
+
183
+ static constexpr bool isFirstAlternativeNothrowDefaultConstructible =
184
+ std::is_nothrow_default_constructible<FirstAlternative>::value;
185
+
181
186
public:
182
187
using IndexT = VariantDetail::Index::VariantIndex;
183
188
static constexpr std::size_t AlternativeCount = sizeof ...(Ts);
184
189
185
- VariantImpl ()
190
+ VariantImpl () noexcept (isFirstAlternativeNothrowDefaultConstructible)
186
191
{
187
192
using FirstAlternative = typename ThisVariantAlternative<0 >::type;
188
193
new (m_storage) FirstAlternative ();
@@ -669,16 +674,11 @@ namespace Aws
669
674
using EnableIfOtherIsThisVariantAlternative = typename std::
670
675
enable_if<VariantDetail::Checker::HasType<typename std::decay<OtherT>::type, Ts...>::value, int >::type;
671
676
672
- using FirstAlternative = typename ThisVariantAlternative<0 >::type;
673
-
674
- static constexpr bool isFirstAlternativeNothrowDefaultConstructible =
675
- std::is_nothrow_default_constructible<FirstAlternative>::value;
676
-
677
677
public:
678
678
using IndexT = VariantDetail::Index::VariantIndex;
679
679
static constexpr std::size_t AlternativeCount = sizeof ...(Ts);
680
680
681
- Variant () noexcept (isFirstAlternativeNothrowDefaultConstructible) = default ;
681
+ Variant () = default ;
682
682
683
683
template <typename T, EnableIfOtherIsThisVariantAlternative<T> = 1 > Variant (const T &val) : m_variant(val)
684
684
{
You can’t perform that action at this time.
0 commit comments