@@ -612,20 +612,18 @@ class _LIBCPP_DECLSPEC_EMPTY_BASES optional
612
612
private __optional_sfinae_assign_base_t <_Tp> {
613
613
using __base _LIBCPP_NODEBUG = __optional_move_assign_base<_Tp>;
614
614
615
- # if _LIBCPP_STD_VER >= 26
616
- using pointer = std::add_pointer_t <_Tp>;
617
- using const_pointer = std::add_pointer_t <const _Tp>;
618
- # endif
615
+ using __pointer _LIBCPP_NODEBUG = std::add_pointer_t <_Tp>;
616
+ using __const_pointer _LIBCPP_NODEBUG = std::add_pointer_t <const _Tp>;
619
617
620
618
public:
621
619
using value_type = _Tp;
622
620
# if _LIBCPP_STD_VER >= 26
623
621
# ifdef _LIBCPP_ABI_BOUNDED_ITERATORS_IN_OPTIONAL
624
- using iterator = __bounded_iter<__wrap_iter<pointer >>;
625
- using const_iterator = __bounded_iter<__wrap_iter<const_pointer >>;
622
+ using iterator = __bounded_iter<__wrap_iter<__pointer >>;
623
+ using const_iterator = __bounded_iter<__wrap_iter<__const_pointer >>;
626
624
# else
627
- using iterator = __wrap_iter<pointer >;
628
- using const_iterator = __wrap_iter<const_pointer >;
625
+ using iterator = __wrap_iter<__pointer >;
626
+ using const_iterator = __wrap_iter<__const_pointer >;
629
627
# endif
630
628
# endif
631
629
@@ -837,9 +835,9 @@ public:
837
835
_LIBCPP_HIDE_FROM_ABI constexpr iterator begin () noexcept {
838
836
# ifdef _LIBCPP_ABI_BOUNDED_ITERATORS_IN_OPTIONAL
839
837
return std::__make_bounded_iter (
840
- std::__wrap_iter<pointer >(std::addressof (this ->__get ())),
841
- std::__wrap_iter<pointer >(std::addressof (this ->__get ())),
842
- std::__wrap_iter<pointer >(std::addressof (this ->__get ()) + (this ->has_value () ? 1 : 0 )));
838
+ std::__wrap_iter<__pointer >(std::addressof (this ->__get ())),
839
+ std::__wrap_iter<__pointer >(std::addressof (this ->__get ())),
840
+ std::__wrap_iter<__pointer >(std::addressof (this ->__get ()) + (this ->has_value () ? 1 : 0 )));
843
841
# else
844
842
return iterator (std::addressof (this ->__get ()));
845
843
# endif
@@ -848,9 +846,9 @@ public:
848
846
_LIBCPP_HIDE_FROM_ABI constexpr const_iterator begin () const noexcept {
849
847
# ifdef _LIBCPP_ABI_BOUNDED_ITERATORS_IN_OPTIONAL
850
848
return std::__make_bounded_iter (
851
- std::__wrap_iter<const_pointer >(std::addressof (this ->__get ())),
852
- std::__wrap_iter<const_pointer >(std::addressof (this ->__get ())),
853
- std::__wrap_iter<const_pointer >(std::addressof (this ->__get ()) + (this ->has_value () ? 1 : 0 )));
849
+ std::__wrap_iter<__const_pointer >(std::addressof (this ->__get ())),
850
+ std::__wrap_iter<__const_pointer >(std::addressof (this ->__get ())),
851
+ std::__wrap_iter<__const_pointer >(std::addressof (this ->__get ()) + (this ->has_value () ? 1 : 0 )));
854
852
# else
855
853
return const_iterator (std::addressof (this ->__get ()));
856
854
# endif
0 commit comments