@@ -247,7 +247,7 @@ _LIBCPP_PUSH_MACROS
247
247
namespace std // purposefully not using versioning namespace
248
248
{
249
249
250
- class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access : public exception {
250
+ class _LIBCPP_EXPORTED_FROM_ABI bad_optional_access : public exception {
251
251
public:
252
252
_LIBCPP_HIDE_FROM_ABI bad_optional_access () _NOEXCEPT = default;
253
253
_LIBCPP_HIDE_FROM_ABI bad_optional_access (const bad_optional_access&) _NOEXCEPT = default;
@@ -263,8 +263,7 @@ public:
263
263
264
264
_LIBCPP_BEGIN_NAMESPACE_STD
265
265
266
- [[noreturn]] inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS void
267
- __throw_bad_optional_access () {
266
+ [[noreturn]] inline _LIBCPP_HIDE_FROM_ABI void __throw_bad_optional_access () {
268
267
# if _LIBCPP_HAS_EXCEPTIONS
269
268
throw bad_optional_access ();
270
269
# else
@@ -827,25 +826,25 @@ public:
827
826
using __base::__get;
828
827
using __base::has_value;
829
828
830
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr value_type const & value () const & {
829
+ _LIBCPP_HIDE_FROM_ABI constexpr value_type const & value () const & {
831
830
if (!this ->has_value ())
832
831
std::__throw_bad_optional_access ();
833
832
return this ->__get ();
834
833
}
835
834
836
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr value_type& value () & {
835
+ _LIBCPP_HIDE_FROM_ABI constexpr value_type& value () & {
837
836
if (!this ->has_value ())
838
837
std::__throw_bad_optional_access ();
839
838
return this ->__get ();
840
839
}
841
840
842
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr value_type&& value() && {
841
+ _LIBCPP_HIDE_FROM_ABI constexpr value_type&& value() && {
843
842
if (!this ->has_value ())
844
843
std::__throw_bad_optional_access ();
845
844
return std::move (this ->__get ());
846
845
}
847
846
848
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr value_type const && value() const && {
847
+ _LIBCPP_HIDE_FROM_ABI constexpr value_type const && value() const && {
849
848
if (!this ->has_value ())
850
849
std::__throw_bad_optional_access ();
851
850
return std::move (this ->__get ());
@@ -867,7 +866,7 @@ public:
867
866
868
867
# if _LIBCPP_STD_VER >= 23
869
868
template <class _Func >
870
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr auto and_then (_Func&& __f) & {
869
+ _LIBCPP_HIDE_FROM_ABI constexpr auto and_then (_Func&& __f) & {
871
870
using _Up = invoke_result_t <_Func, value_type&>;
872
871
static_assert (__is_std_optional<remove_cvref_t <_Up>>::value,
873
872
" Result of f(value()) must be a specialization of std::optional" );
@@ -877,7 +876,7 @@ public:
877
876
}
878
877
879
878
template <class _Func >
880
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr auto and_then (_Func&& __f) const & {
879
+ _LIBCPP_HIDE_FROM_ABI constexpr auto and_then (_Func&& __f) const & {
881
880
using _Up = invoke_result_t <_Func, const value_type&>;
882
881
static_assert (__is_std_optional<remove_cvref_t <_Up>>::value,
883
882
" Result of f(value()) must be a specialization of std::optional" );
@@ -887,7 +886,7 @@ public:
887
886
}
888
887
889
888
template <class _Func >
890
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr auto and_then (_Func&& __f) && {
889
+ _LIBCPP_HIDE_FROM_ABI constexpr auto and_then (_Func&& __f) && {
891
890
using _Up = invoke_result_t <_Func, value_type&&>;
892
891
static_assert (__is_std_optional<remove_cvref_t <_Up>>::value,
893
892
" Result of f(std::move(value())) must be a specialization of std::optional" );
@@ -907,7 +906,7 @@ public:
907
906
}
908
907
909
908
template <class _Func >
910
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr auto transform (_Func&& __f) & {
909
+ _LIBCPP_HIDE_FROM_ABI constexpr auto transform (_Func&& __f) & {
911
910
using _Up = remove_cv_t <invoke_result_t <_Func, value_type&>>;
912
911
static_assert (!is_array_v<_Up>, " Result of f(value()) should not be an Array" );
913
912
static_assert (!is_same_v<_Up, in_place_t >, " Result of f(value()) should not be std::in_place_t" );
@@ -919,7 +918,7 @@ public:
919
918
}
920
919
921
920
template <class _Func >
922
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr auto transform (_Func&& __f) const & {
921
+ _LIBCPP_HIDE_FROM_ABI constexpr auto transform (_Func&& __f) const & {
923
922
using _Up = remove_cv_t <invoke_result_t <_Func, const value_type&>>;
924
923
static_assert (!is_array_v<_Up>, " Result of f(value()) should not be an Array" );
925
924
static_assert (!is_same_v<_Up, in_place_t >, " Result of f(value()) should not be std::in_place_t" );
@@ -931,7 +930,7 @@ public:
931
930
}
932
931
933
932
template <class _Func >
934
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr auto transform (_Func&& __f) && {
933
+ _LIBCPP_HIDE_FROM_ABI constexpr auto transform (_Func&& __f) && {
935
934
using _Up = remove_cv_t <invoke_result_t <_Func, value_type&&>>;
936
935
static_assert (!is_array_v<_Up>, " Result of f(std::move(value())) should not be an Array" );
937
936
static_assert (!is_same_v<_Up, in_place_t >, " Result of f(std::move(value())) should not be std::in_place_t" );
@@ -943,7 +942,7 @@ public:
943
942
}
944
943
945
944
template <class _Func >
946
- _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS constexpr auto transform (_Func&& __f) const && {
945
+ _LIBCPP_HIDE_FROM_ABI constexpr auto transform (_Func&& __f) const && {
947
946
using _Up = remove_cvref_t <invoke_result_t <_Func, const value_type&&>>;
948
947
static_assert (!is_array_v<_Up>, " Result of f(std::move(value())) should not be an Array" );
949
948
static_assert (!is_same_v<_Up, in_place_t >, " Result of f(std::move(value())) should not be std::in_place_t" );
0 commit comments