diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2024-08-25 10:56:24 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2024-08-25 10:56:24 +0000 |
| commit | adf62863f35c84e4c5708f3dc5a1589ce958a238 (patch) | |
| tree | 924e88089bbec100de08015b4e496261eb6f2d66 /libcxx/include/optional | |
| parent | 9b9503334fa856ed4ed6823d35b6f52546296f77 (diff) | |
Vendor import of llvm-project branch release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8.vendor/llvm-project/llvmorg-19.1.0-rc3-0-g437434df21d8
Diffstat (limited to 'libcxx/include/optional')
| -rw-r--r-- | libcxx/include/optional | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libcxx/include/optional b/libcxx/include/optional index f9cbcbfa595d..41d7515a2b68 100644 --- a/libcxx/include/optional +++ b/libcxx/include/optional @@ -301,7 +301,7 @@ struct __optional_destruct_base<_Tp, false> { # if _LIBCPP_STD_VER >= 23 template <class _Fp, class... _Args> - _LIBCPP_HIDE_FROM_ABI constexpr __optional_destruct_base( + _LIBCPP_HIDE_FROM_ABI constexpr explicit __optional_destruct_base( __optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args) : __val_(std::invoke(std::forward<_Fp>(__f), std::forward<_Args>(__args)...)), __engaged_(true) {} # endif @@ -707,8 +707,11 @@ public: } # if _LIBCPP_STD_VER >= 23 - template <class _Fp, class... _Args> - _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args) + template <class _Tag, + class _Fp, + class... _Args, + __enable_if_t<_IsSame<_Tag, __optional_construct_from_invoke_tag>::value, int> = 0> + _LIBCPP_HIDE_FROM_ABI constexpr explicit optional(_Tag, _Fp&& __f, _Args&&... __args) : __base(__optional_construct_from_invoke_tag{}, std::forward<_Fp>(__f), std::forward<_Args>(__args)...) {} # endif |
