@@ -672,44 +672,41 @@ public:
672672 _LIBCPP_HIDE_FROM_ABI constexpr optional (optional&&) = default;
673673 _LIBCPP_HIDE_FROM_ABI constexpr optional (nullopt_t ) noexcept {}
674674
675- template <
676- class _InPlaceT ,
677- class ... _Args,
678- class = enable_if_t < _And< _IsSame<_InPlaceT, in_place_t >, is_constructible<value_type, _Args...> >::value > >
675+ template <class _InPlaceT ,
676+ class ... _Args,
677+ enable_if_t <_And<_IsSame<_InPlaceT, in_place_t >, is_constructible<value_type, _Args...>>::value, int > = 0 >
679678 _LIBCPP_HIDE_FROM_ABI constexpr explicit optional (_InPlaceT, _Args&&... __args)
680679 : __base(in_place, std::forward<_Args>(__args)...) {}
681680
682681 template <class _Up ,
683682 class ... _Args,
684- class = enable_if_t < is_constructible_v<value_type, initializer_list<_Up>&, _Args...>> >
683+ enable_if_t <is_constructible_v<value_type, initializer_list<_Up>&, _Args...>, int > = 0 >
685684 _LIBCPP_HIDE_FROM_ABI constexpr explicit optional (in_place_t , initializer_list<_Up> __il, _Args&&... __args)
686685 : __base(in_place, __il, std::forward<_Args>(__args)...) {}
687686
688- template <class _Up = value_type,
689- enable_if_t < _CheckOptionalArgsCtor<_Up>::template __enable_implicit<_Up>(), int > = 0 >
687+ template <class _Up = value_type,
688+ enable_if_t <_CheckOptionalArgsCtor<_Up>::template __enable_implicit<_Up>(), int > = 0 >
690689 _LIBCPP_HIDE_FROM_ABI constexpr optional (_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
691690
692- template <class _Up , enable_if_t < _CheckOptionalArgsCtor<_Up>::template __enable_explicit<_Up>(), int > = 0 >
691+ template <class _Up , enable_if_t <_CheckOptionalArgsCtor<_Up>::template __enable_explicit<_Up>(), int > = 0 >
693692 _LIBCPP_HIDE_FROM_ABI constexpr explicit optional (_Up&& __v) : __base(in_place, std::forward<_Up>(__v)) {}
694693
695694 // LWG2756: conditionally explicit conversion from const optional<_Up>&
696- template <class _Up ,
697- enable_if_t < _CheckOptionalLikeCtor<_Up, _Up const &>::template __enable_implicit<_Up>(), int > = 0 >
695+ template <class _Up , enable_if_t <_CheckOptionalLikeCtor<_Up, _Up const &>::template __enable_implicit<_Up>(), int > = 0 >
698696 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional (const optional<_Up>& __v) {
699697 this ->__construct_from (__v);
700698 }
701- template <class _Up ,
702- enable_if_t < _CheckOptionalLikeCtor<_Up, _Up const &>::template __enable_explicit<_Up>(), int > = 0 >
699+ template <class _Up , enable_if_t <_CheckOptionalLikeCtor<_Up, _Up const &>::template __enable_explicit<_Up>(), int > = 0 >
703700 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional (const optional<_Up>& __v) {
704701 this ->__construct_from (__v);
705702 }
706703
707704 // LWG2756: conditionally explicit conversion from optional<_Up>&&
708- template <class _Up , enable_if_t < _CheckOptionalLikeCtor<_Up, _Up&&>::template __enable_implicit<_Up>(), int > = 0 >
705+ template <class _Up , enable_if_t <_CheckOptionalLikeCtor<_Up, _Up&&>::template __enable_implicit<_Up>(), int > = 0 >
709706 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional (optional<_Up>&& __v) {
710707 this ->__construct_from (std::move (__v));
711708 }
712- template <class _Up , enable_if_t < _CheckOptionalLikeCtor<_Up, _Up&&>::template __enable_explicit<_Up>(), int > = 0 >
709+ template <class _Up , enable_if_t <_CheckOptionalLikeCtor<_Up, _Up&&>::template __enable_explicit<_Up>(), int > = 0 >
713710 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 explicit optional (optional<_Up>&& __v) {
714711 this ->__construct_from (std::move (__v));
715712 }
@@ -718,7 +715,7 @@ public:
718715 template <class _Tag ,
719716 class _Fp ,
720717 class ... _Args,
721- __enable_if_t <_IsSame<_Tag, __optional_construct_from_invoke_tag>::value, int > = 0 >
718+ enable_if_t <_IsSame<_Tag, __optional_construct_from_invoke_tag>::value, int > = 0 >
722719 _LIBCPP_HIDE_FROM_ABI constexpr explicit optional (_Tag, _Fp&& __f, _Args&&... __args)
723720 : __base(__optional_construct_from_invoke_tag{}, std::forward<_Fp>(__f), std::forward<_Args>(__args)...) {}
724721# endif
@@ -732,12 +729,12 @@ public:
732729 _LIBCPP_HIDE_FROM_ABI constexpr optional& operator =(optional&&) = default ;
733730
734731 // LWG2756
735- template <
736- class _Up = value_type ,
737- class = enable_if_t < _And< _IsNotSame<__remove_cvref_t <_Up>, optional >,
738- _Or< _IsNotSame< __remove_cvref_t <_Up>, value_type>, _Not<is_scalar<value_type>> >,
739- is_constructible <value_type, _Up>,
740- is_assignable<value_type&, _Up> >::value> >
732+ template <class _Up = value_type,
733+ enable_if_t <_And<_IsNotSame< __remove_cvref_t <_Up>, optional> ,
734+ _Or< _IsNotSame<__remove_cvref_t <_Up>, value_type>, _Not<is_scalar<value_type>> >,
735+ is_constructible< value_type, _Up >,
736+ is_assignable <value_type& , _Up>>::value ,
737+ int > = 0 >
741738 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& operator =(_Up&& __v) {
742739 if (this ->has_value ())
743740 this ->__get () = std::forward<_Up>(__v);
@@ -747,21 +744,20 @@ public:
747744 }
748745
749746 // LWG2756
750- template <class _Up ,
751- enable_if_t < _CheckOptionalLikeAssign<_Up, _Up const &>::template __enable_assign<_Up>(), int > = 0 >
747+ template <class _Up , enable_if_t <_CheckOptionalLikeAssign<_Up, _Up const &>::template __enable_assign<_Up>(), int > = 0 >
752748 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& operator =(const optional<_Up>& __v) {
753749 this ->__assign_from (__v);
754750 return *this ;
755751 }
756752
757753 // LWG2756
758- template <class _Up , enable_if_t < _CheckOptionalLikeCtor<_Up, _Up&&>::template __enable_assign<_Up>(), int > = 0 >
754+ template <class _Up , enable_if_t <_CheckOptionalLikeCtor<_Up, _Up&&>::template __enable_assign<_Up>(), int > = 0 >
759755 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 optional& operator =(optional<_Up>&& __v) {
760756 this ->__assign_from (std::move (__v));
761757 return *this ;
762758 }
763759
764- template <class ... _Args, class = enable_if_t < is_constructible_v<value_type, _Args...> > >
760+ template <class ... _Args, enable_if_t <is_constructible_v<value_type, _Args...>, int > = 0 >
765761 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& emplace (_Args&&... __args) {
766762 reset ();
767763 this ->__construct (std::forward<_Args>(__args)...);
@@ -770,7 +766,7 @@ public:
770766
771767 template <class _Up ,
772768 class ... _Args,
773- class = enable_if_t < is_constructible_v<value_type, initializer_list<_Up>&, _Args...> > >
769+ enable_if_t <is_constructible_v<value_type, initializer_list<_Up>&, _Args...>, int > = 0 >
774770 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp& emplace (initializer_list<_Up> __il, _Args&&... __args) {
775771 reset ();
776772 this ->__construct (__il, std::forward<_Args>(__args)...);
@@ -982,77 +978,75 @@ public:
982978 using __base::reset;
983979};
984980
985- # if _LIBCPP_STD_VER >= 17
986981template <class _Tp >
987982optional (_Tp) -> optional<_Tp>;
988- # endif
989983
990984// Comparisons between optionals
991- template <class _Tp , class _Up >
992- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
993- is_convertible_v< decltype (std::declval< const _Tp&>() == std::declval< const _Up&>()), bool > ,
994- bool >
995- operator ==(const optional<_Tp>& __x, const optional<_Up>& __y) {
985+ template <
986+ class _Tp ,
987+ class _Up ,
988+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() == std::declval< const _Up&>()), bool >, int > = 0 >
989+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator ==(const optional<_Tp>& __x, const optional<_Up>& __y) {
996990 if (static_cast <bool >(__x) != static_cast <bool >(__y))
997991 return false ;
998992 if (!static_cast <bool >(__x))
999993 return true ;
1000994 return *__x == *__y;
1001995}
1002996
1003- template <class _Tp , class _Up >
1004- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1005- is_convertible_v< decltype (std::declval< const _Tp&>() != std::declval< const _Up&>()), bool > ,
1006- bool >
1007- operator !=(const optional<_Tp>& __x, const optional<_Up>& __y) {
997+ template <
998+ class _Tp ,
999+ class _Up ,
1000+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() != std::declval< const _Up&>()), bool >, int > = 0 >
1001+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator !=(const optional<_Tp>& __x, const optional<_Up>& __y) {
10081002 if (static_cast <bool >(__x) != static_cast <bool >(__y))
10091003 return true ;
10101004 if (!static_cast <bool >(__x))
10111005 return false ;
10121006 return *__x != *__y;
10131007}
10141008
1015- template <class _Tp , class _Up >
1016- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1017- is_convertible_v< decltype (std::declval< const _Tp&>() < std::declval< const _Up&>()), bool > ,
1018- bool >
1019- operator <(const optional<_Tp>& __x, const optional<_Up>& __y) {
1009+ template <
1010+ class _Tp ,
1011+ class _Up ,
1012+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() < std::declval< const _Up&>()), bool >, int > = 0 >
1013+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator <(const optional<_Tp>& __x, const optional<_Up>& __y) {
10201014 if (!static_cast <bool >(__y))
10211015 return false ;
10221016 if (!static_cast <bool >(__x))
10231017 return true ;
10241018 return *__x < *__y;
10251019}
10261020
1027- template <class _Tp , class _Up >
1028- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1029- is_convertible_v< decltype (std::declval< const _Tp&>() > std::declval< const _Up&>()), bool > ,
1030- bool >
1031- operator >(const optional<_Tp>& __x, const optional<_Up>& __y) {
1021+ template <
1022+ class _Tp ,
1023+ class _Up ,
1024+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() > std::declval< const _Up&>()), bool >, int > = 0 >
1025+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator >(const optional<_Tp>& __x, const optional<_Up>& __y) {
10321026 if (!static_cast <bool >(__x))
10331027 return false ;
10341028 if (!static_cast <bool >(__y))
10351029 return true ;
10361030 return *__x > *__y;
10371031}
10381032
1039- template <class _Tp , class _Up >
1040- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1041- is_convertible_v< decltype (std::declval< const _Tp&>() <= std::declval< const _Up&>()), bool > ,
1042- bool >
1043- operator <=(const optional<_Tp>& __x, const optional<_Up>& __y) {
1033+ template <
1034+ class _Tp ,
1035+ class _Up ,
1036+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() <= std::declval< const _Up&>()), bool >, int > = 0 >
1037+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator <=(const optional<_Tp>& __x, const optional<_Up>& __y) {
10441038 if (!static_cast <bool >(__x))
10451039 return true ;
10461040 if (!static_cast <bool >(__y))
10471041 return false ;
10481042 return *__x <= *__y;
10491043}
10501044
1051- template <class _Tp , class _Up >
1052- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1053- is_convertible_v< decltype (std::declval< const _Tp&>() >= std::declval< const _Up&>()), bool > ,
1054- bool >
1055- operator >=(const optional<_Tp>& __x, const optional<_Up>& __y) {
1045+ template <
1046+ class _Tp ,
1047+ class _Up ,
1048+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() >= std::declval< const _Up&>()), bool >, int > = 0 >
1049+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator >=(const optional<_Tp>& __x, const optional<_Up>& __y) {
10561050 if (!static_cast <bool >(__y))
10571051 return true ;
10581052 if (!static_cast <bool >(__x))
@@ -1145,99 +1139,99 @@ _LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const optional<_Tp>&
11451139# endif // _LIBCPP_STD_VER <= 17
11461140
11471141// Comparisons with T
1148- template <class _Tp , class _Up >
1149- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1150- is_convertible_v< decltype (std::declval< const _Tp&>() == std::declval< const _Up&>()), bool > ,
1151- bool >
1152- operator ==(const optional<_Tp>& __x, const _Up& __v) {
1142+ template <
1143+ class _Tp ,
1144+ class _Up ,
1145+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() == std::declval< const _Up&>()), bool >, int > = 0 >
1146+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator ==(const optional<_Tp>& __x, const _Up& __v) {
11531147 return static_cast <bool >(__x) ? *__x == __v : false ;
11541148}
11551149
1156- template <class _Tp , class _Up >
1157- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1158- is_convertible_v< decltype (std::declval< const _Tp&>() == std::declval< const _Up&>()), bool > ,
1159- bool >
1160- operator ==(const _Tp& __v, const optional<_Up>& __x) {
1150+ template <
1151+ class _Tp ,
1152+ class _Up ,
1153+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() == std::declval< const _Up&>()), bool >, int > = 0 >
1154+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator ==(const _Tp& __v, const optional<_Up>& __x) {
11611155 return static_cast <bool >(__x) ? __v == *__x : false ;
11621156}
11631157
1164- template <class _Tp , class _Up >
1165- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1166- is_convertible_v< decltype (std::declval< const _Tp&>() != std::declval< const _Up&>()), bool > ,
1167- bool >
1168- operator !=(const optional<_Tp>& __x, const _Up& __v) {
1158+ template <
1159+ class _Tp ,
1160+ class _Up ,
1161+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() != std::declval< const _Up&>()), bool >, int > = 0 >
1162+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator !=(const optional<_Tp>& __x, const _Up& __v) {
11691163 return static_cast <bool >(__x) ? *__x != __v : true ;
11701164}
11711165
1172- template <class _Tp , class _Up >
1173- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1174- is_convertible_v< decltype (std::declval< const _Tp&>() != std::declval< const _Up&>()), bool > ,
1175- bool >
1176- operator !=(const _Tp& __v, const optional<_Up>& __x) {
1166+ template <
1167+ class _Tp ,
1168+ class _Up ,
1169+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() != std::declval< const _Up&>()), bool >, int > = 0 >
1170+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator !=(const _Tp& __v, const optional<_Up>& __x) {
11771171 return static_cast <bool >(__x) ? __v != *__x : true ;
11781172}
11791173
1180- template <class _Tp , class _Up >
1181- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1182- is_convertible_v< decltype (std::declval< const _Tp&>() < std::declval< const _Up&>()), bool > ,
1183- bool >
1184- operator <(const optional<_Tp>& __x, const _Up& __v) {
1174+ template <
1175+ class _Tp ,
1176+ class _Up ,
1177+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() < std::declval< const _Up&>()), bool >, int > = 0 >
1178+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator <(const optional<_Tp>& __x, const _Up& __v) {
11851179 return static_cast <bool >(__x) ? *__x < __v : true ;
11861180}
11871181
1188- template <class _Tp , class _Up >
1189- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1190- is_convertible_v< decltype (std::declval< const _Tp&>() < std::declval< const _Up&>()), bool > ,
1191- bool >
1192- operator <(const _Tp& __v, const optional<_Up>& __x) {
1182+ template <
1183+ class _Tp ,
1184+ class _Up ,
1185+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() < std::declval< const _Up&>()), bool >, int > = 0 >
1186+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator <(const _Tp& __v, const optional<_Up>& __x) {
11931187 return static_cast <bool >(__x) ? __v < *__x : false ;
11941188}
11951189
1196- template <class _Tp , class _Up >
1197- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1198- is_convertible_v< decltype (std::declval< const _Tp&>() <= std::declval< const _Up&>()), bool > ,
1199- bool >
1200- operator <=(const optional<_Tp>& __x, const _Up& __v) {
1190+ template <
1191+ class _Tp ,
1192+ class _Up ,
1193+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() <= std::declval< const _Up&>()), bool >, int > = 0 >
1194+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator <=(const optional<_Tp>& __x, const _Up& __v) {
12011195 return static_cast <bool >(__x) ? *__x <= __v : true ;
12021196}
12031197
1204- template <class _Tp , class _Up >
1205- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1206- is_convertible_v< decltype (std::declval< const _Tp&>() <= std::declval< const _Up&>()), bool > ,
1207- bool >
1208- operator <=(const _Tp& __v, const optional<_Up>& __x) {
1198+ template <
1199+ class _Tp ,
1200+ class _Up ,
1201+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() <= std::declval< const _Up&>()), bool >, int > = 0 >
1202+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator <=(const _Tp& __v, const optional<_Up>& __x) {
12091203 return static_cast <bool >(__x) ? __v <= *__x : false ;
12101204}
12111205
1212- template <class _Tp , class _Up >
1213- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1214- is_convertible_v< decltype (std::declval< const _Tp&>() > std::declval< const _Up&>()), bool > ,
1215- bool >
1216- operator >(const optional<_Tp>& __x, const _Up& __v) {
1206+ template <
1207+ class _Tp ,
1208+ class _Up ,
1209+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() > std::declval< const _Up&>()), bool >, int > = 0 >
1210+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator >(const optional<_Tp>& __x, const _Up& __v) {
12171211 return static_cast <bool >(__x) ? *__x > __v : false ;
12181212}
12191213
1220- template <class _Tp , class _Up >
1221- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1222- is_convertible_v< decltype (std::declval< const _Tp&>() > std::declval< const _Up&>()), bool > ,
1223- bool >
1224- operator >(const _Tp& __v, const optional<_Up>& __x) {
1214+ template <
1215+ class _Tp ,
1216+ class _Up ,
1217+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() > std::declval< const _Up&>()), bool >, int > = 0 >
1218+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator >(const _Tp& __v, const optional<_Up>& __x) {
12251219 return static_cast <bool >(__x) ? __v > *__x : true ;
12261220}
12271221
1228- template <class _Tp , class _Up >
1229- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1230- is_convertible_v< decltype (std::declval< const _Tp&>() >= std::declval< const _Up&>()), bool > ,
1231- bool >
1232- operator >=(const optional<_Tp>& __x, const _Up& __v) {
1222+ template <
1223+ class _Tp ,
1224+ class _Up ,
1225+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() >= std::declval< const _Up&>()), bool >, int > = 0 >
1226+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator >=(const optional<_Tp>& __x, const _Up& __v) {
12331227 return static_cast <bool >(__x) ? *__x >= __v : false ;
12341228}
12351229
1236- template <class _Tp , class _Up >
1237- _LIBCPP_HIDE_FROM_ABI constexpr enable_if_t <
1238- is_convertible_v< decltype (std::declval< const _Tp&>() >= std::declval< const _Up&>()), bool > ,
1239- bool >
1240- operator >=(const _Tp& __v, const optional<_Up>& __x) {
1230+ template <
1231+ class _Tp ,
1232+ class _Up ,
1233+ enable_if_t <is_convertible_v< decltype (std::declval< const _Tp&>() >= std::declval< const _Up&>()), bool >, int > = 0 >
1234+ _LIBCPP_HIDE_FROM_ABI constexpr bool operator >=(const _Tp& __v, const optional<_Up>& __x) {
12411235 return static_cast <bool >(__x) ? __v >= *__x : true ;
12421236}
12431237
@@ -1252,9 +1246,8 @@ operator<=>(const optional<_Tp>& __x, const _Up& __v) {
12521246
12531247# endif // _LIBCPP_STD_VER >= 20
12541248
1255- template <class _Tp >
1256- inline _LIBCPP_HIDE_FROM_ABI
1257- _LIBCPP_CONSTEXPR_SINCE_CXX20 enable_if_t < is_move_constructible_v<_Tp> && is_swappable_v<_Tp>, void >
1249+ template <class _Tp , enable_if_t < is_move_constructible_v<_Tp> && is_swappable_v<_Tp>, int > = 0 >
1250+ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
12581251swap (optional<_Tp>& __x, optional<_Tp>& __y) noexcept (noexcept (__x.swap(__y))) {
12591252 __x.swap (__y);
12601253}
0 commit comments