Created
December 2, 2016 21:56
-
-
Save EricWF/75468beb4aec22cb8de4519234dd9030 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/include/variant b/include/variant | |
| index 6ecc193..8969790 100644 | |
| --- a/include/variant | |
| +++ b/include/variant | |
| @@ -1071,7 +1071,16 @@ using __best_match_t = typename result_of_t<__overload<_Types...>(_Tp&&)>::type; | |
| } // __variant_detail | |
| template <class... _Types> | |
| -class _LIBCPP_TYPE_VIS_ONLY variant { | |
| +class _LIBCPP_TYPE_VIS_ONLY variant : | |
| + private __sfinae_ctor_base< | |
| + __all<is_copy_constructible_v<_Types>...>::value, | |
| + __all<is_move_constructible_v<_Types>...>::value | |
| + >, | |
| + private __sfinae_assign_base< | |
| + __all<(is_copy_constructible_v<_Types> && is_move_constructible_v<_Types> | |
| + && is_copy_assignable_v<_Types>)...>::value, | |
| + __all<(is_move_constructible_v<_Types> && is_move_assignable_v<_Types>)...>::value | |
| + > { | |
| static_assert(0 < sizeof...(_Types), | |
| "variant must consist of at least one alternative."); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment