|
7896 | 7896 | template<class T, class E> requires is_void_v<T>
|
7897 | 7897 | class expected<T, E> {
|
7898 | 7898 | public:
|
7899 |
| - using @\libmember{value_type}{expected}@ = T; |
7900 |
| - using @\libmember{error_type}{expected}@ = E; |
7901 |
| - using @\libmember{unexpected_type}{expected}@ = unexpected<E>; |
| 7899 | + using @\libmember{value_type}{expected<void>}@ = T; |
| 7900 | + using @\libmember{error_type}{expected<void>}@ = E; |
| 7901 | + using @\libmember{unexpected_type}{expected<void>}@ = unexpected<E>; |
7902 | 7902 |
|
7903 | 7903 | template<class U>
|
7904 |
| - using @\libmember{rebind}{expected}@ = expected<U, error_type>; |
| 7904 | + using @\libmember{rebind}{expected<void>}@ = expected<U, error_type>; |
7905 | 7905 |
|
7906 | 7906 | // \ref{expected.void.ctor}, constructors
|
7907 | 7907 | constexpr expected() noexcept;
|
|
7971 | 7971 |
|
7972 | 7972 | \rSec3[expected.void.ctor]{Constructors}
|
7973 | 7973 |
|
7974 |
| -\indexlibraryctor{expected}% |
| 7974 | +\indexlibraryctor{expected<void>}% |
7975 | 7975 | \begin{itemdecl}
|
7976 | 7976 | constexpr expected() noexcept;
|
7977 | 7977 | \end{itemdecl}
|
|
7982 | 7982 | \tcode{has_value()} is \tcode{true}.
|
7983 | 7983 | \end{itemdescr}
|
7984 | 7984 |
|
7985 |
| -\indexlibraryctor{expected}% |
| 7985 | +\indexlibraryctor{expected<void>}% |
7986 | 7986 | \begin{itemdecl}
|
7987 | 7987 | constexpr expected(const expected& rhs);
|
7988 | 7988 | \end{itemdecl}
|
|
8011 | 8011 | if \tcode{is_trivially_copy_constructible_v<E>} is \tcode{true}.
|
8012 | 8012 | \end{itemdescr}
|
8013 | 8013 |
|
8014 |
| -\indexlibraryctor{expected}% |
| 8014 | +\indexlibraryctor{expected<void>}% |
8015 | 8015 | \begin{itemdecl}
|
8016 | 8016 | constexpr expected(expected&& rhs) noexcept(is_nothrow_move_constructible_v<E>);
|
8017 | 8017 | \end{itemdecl}
|
|
8041 | 8041 | if \tcode{is_trivially_move_constructible_v<E>} is \tcode{true}.
|
8042 | 8042 | \end{itemdescr}
|
8043 | 8043 |
|
8044 |
| -\indexlibraryctor{expected}% |
| 8044 | +\indexlibraryctor{expected<void>}% |
8045 | 8045 | \begin{itemdecl}
|
8046 | 8046 | template<class U, class G>
|
8047 | 8047 | constexpr explicit(!is_convertible_v<const G&, E>) expected(const expected<U, G>& rhs);
|
|
8091 | 8091 | Any exception thrown by the initialization of \exposid{unex}.
|
8092 | 8092 | \end{itemdescr}
|
8093 | 8093 |
|
8094 |
| -\indexlibraryctor{expected}% |
| 8094 | +\indexlibraryctor{expected<void>}% |
8095 | 8095 | \begin{itemdecl}
|
8096 | 8096 | template<class G>
|
8097 | 8097 | constexpr explicit(!is_convertible_v<const G&, E>) expected(const unexpected<G>& e);
|
|
8122 | 8122 | Any exception thrown by the initialization of \exposid{unex}.
|
8123 | 8123 | \end{itemdescr}
|
8124 | 8124 |
|
8125 |
| -\indexlibraryctor{expected}% |
| 8125 | +\indexlibraryctor{expected<void>}% |
8126 | 8126 | \begin{itemdecl}
|
8127 | 8127 | constexpr explicit expected(in_place_t) noexcept;
|
8128 | 8128 | \end{itemdecl}
|
|
8133 | 8133 | \tcode{has_value()} is \tcode{true}.
|
8134 | 8134 | \end{itemdescr}
|
8135 | 8135 |
|
8136 |
| -\indexlibraryctor{expected}% |
| 8136 | +\indexlibraryctor{expected<void>}% |
8137 | 8137 | \begin{itemdecl}
|
8138 | 8138 | template<class... Args>
|
8139 | 8139 | constexpr explicit expected(unexpect_t, Args&&... args);
|
|
8158 | 8158 | Any exception thrown by the initialization of \exposid{unex}.
|
8159 | 8159 | \end{itemdescr}
|
8160 | 8160 |
|
8161 |
| -\indexlibraryctor{expected}% |
| 8161 | +\indexlibraryctor{expected<void>}% |
8162 | 8162 | \begin{itemdecl}
|
8163 | 8163 | template<class U, class... Args>
|
8164 | 8164 | constexpr explicit expected(unexpect_t, initializer_list<U> il, Args&&... args);
|
|
8185 | 8185 |
|
8186 | 8186 | \rSec3[expected.void.dtor]{Destructor}
|
8187 | 8187 |
|
8188 |
| -\indexlibrarydtor{expected}% |
| 8188 | +\indexlibrarydtor{expected<void>}% |
8189 | 8189 | \begin{itemdecl}
|
8190 | 8190 | constexpr ~expected();
|
8191 | 8191 | \end{itemdecl}
|
|
8203 | 8203 |
|
8204 | 8204 | \rSec3[expected.void.assign]{Assignment}
|
8205 | 8205 |
|
8206 |
| -\indexlibrarymember{operator=}{expected}% |
| 8206 | +\indexlibrarymember{operator=}{expected<void>}% |
8207 | 8207 | \begin{itemdecl}
|
8208 | 8208 | constexpr expected& operator=(const expected& rhs);
|
8209 | 8209 | \end{itemdecl}
|
|
8235 | 8235 | \tcode{is_copy_constructible_v<E>} is \tcode{true}.
|
8236 | 8236 | \end{itemdescr}
|
8237 | 8237 |
|
8238 |
| -\indexlibrarymember{operator=}{expected}% |
| 8238 | +\indexlibrarymember{operator=}{expected<void>}% |
8239 | 8239 | \begin{itemdecl}
|
8240 | 8240 | constexpr expected& operator=(expected&& rhs) noexcept(@\seebelow@);
|
8241 | 8241 | \end{itemdecl}
|
|
8274 | 8274 | \tcode{is_move_assignable_v<E>} is \tcode{true}.
|
8275 | 8275 | \end{itemdescr}
|
8276 | 8276 |
|
8277 |
| -\indexlibrarymember{operator=}{expected}% |
| 8277 | +\indexlibrarymember{operator=}{expected<void>}% |
8278 | 8278 | \begin{itemdecl}
|
8279 | 8279 | template<class G>
|
8280 | 8280 | constexpr expected& operator=(const unexpected<G>& e);
|
|
8311 | 8311 | \tcode{*this}.
|
8312 | 8312 | \end{itemdescr}
|
8313 | 8313 |
|
8314 |
| -\indexlibrarymember{emplace}{expected}% |
| 8314 | +\indexlibrarymember{emplace}{expected<void>}% |
8315 | 8315 | \begin{itemdecl}
|
8316 | 8316 | constexpr void emplace() noexcept;
|
8317 | 8317 | \end{itemdecl}
|
|
8325 | 8325 |
|
8326 | 8326 | \rSec3[expected.void.swap]{Swap}
|
8327 | 8327 |
|
8328 |
| -\indexlibrarymember{swap}{expected}% |
| 8328 | +\indexlibrarymember{swap}{expected<void>}% |
8329 | 8329 | \begin{itemdecl}
|
8330 | 8330 | constexpr void swap(expected& rhs) noexcept(@\seebelow@);
|
8331 | 8331 | \end{itemdecl}
|
|
8371 | 8371 | \tcode{is_nothrow_move_constructible_v<E> \&\& is_nothrow_swappable_v<E>}.
|
8372 | 8372 | \end{itemdescr}
|
8373 | 8373 |
|
8374 |
| -\indexlibrarymember{swap}{expected}% |
| 8374 | +\indexlibrarymember{swap}{expected<void>}% |
8375 | 8375 | \begin{itemdecl}
|
8376 | 8376 | friend constexpr void swap(expected& x, expected& y) noexcept(noexcept(x.swap(y)));
|
8377 | 8377 | \end{itemdecl}
|
|
8384 | 8384 |
|
8385 | 8385 | \rSec3[expected.void.obs]{Observers}
|
8386 | 8386 |
|
8387 |
| -\indexlibrarymember{operator bool}{expected}% |
8388 |
| -\indexlibrarymember{has_value}{expected}% |
| 8387 | +\indexlibrarymember{operator bool}{expected<void>}% |
| 8388 | +\indexlibrarymember{has_value}{expected<void>}% |
8389 | 8389 | \begin{itemdecl}
|
8390 | 8390 | constexpr explicit operator bool() const noexcept;
|
8391 | 8391 | constexpr bool has_value() const noexcept;
|
|
8397 | 8397 | \exposid{has_val}.
|
8398 | 8398 | \end{itemdescr}
|
8399 | 8399 |
|
8400 |
| -\indexlibrarymember{operator*}{expected}% |
| 8400 | +\indexlibrarymember{operator*}{expected<void>}% |
8401 | 8401 | \begin{itemdecl}
|
8402 | 8402 | constexpr void operator*() const noexcept;
|
8403 | 8403 | \end{itemdecl}
|
|
8419 | 8419 | \tcode{bad_expected_access(error())} if \tcode{has_value()} is \tcode{false}.
|
8420 | 8420 | \end{itemdescr}
|
8421 | 8421 |
|
8422 |
| -\indexlibrarymember{value}{expected}% |
| 8422 | +\indexlibrarymember{value}{expected<void>}% |
8423 | 8423 | \begin{itemdecl}
|
8424 | 8424 | constexpr void value() &&;
|
8425 | 8425 | \end{itemdecl}
|
|
8431 | 8431 | if \tcode{has_value()} is \tcode{false}.
|
8432 | 8432 | \end{itemdescr}
|
8433 | 8433 |
|
8434 |
| -\indexlibrarymember{error}{expected}% |
| 8434 | +\indexlibrarymember{error}{expected<void>}% |
8435 | 8435 | \begin{itemdecl}
|
8436 | 8436 | constexpr const E& error() const&;
|
8437 | 8437 | constexpr E& error() &;
|
|
8447 | 8447 | \exposid{unex}.
|
8448 | 8448 | \end{itemdescr}
|
8449 | 8449 |
|
8450 |
| -\indexlibrarymember{error}{expected}% |
| 8450 | +\indexlibrarymember{error}{expected<void>}% |
8451 | 8451 | \begin{itemdecl}
|
8452 | 8452 | constexpr E&& error() &&;
|
8453 | 8453 | constexpr const E&& error() const&&;
|
|
8465 | 8465 |
|
8466 | 8466 | \rSec3[expected.void.eq]{Equality operators}
|
8467 | 8467 |
|
8468 |
| -\indexlibrarymember{operator==}{expected}% |
| 8468 | +\indexlibrarymember{operator==}{expected<void>}% |
8469 | 8469 | \begin{itemdecl}
|
8470 | 8470 | template<class T2, class E2> requires is_void_v<T2>
|
8471 | 8471 | friend constexpr bool operator==(const expected& x, const expected<T2, E2>& y);
|
|
8483 | 8483 | otherwise \tcode{x.has_value() || static_cast<bool>(x.error() == y.error())}.
|
8484 | 8484 | \end{itemdescr}
|
8485 | 8485 |
|
8486 |
| -\indexlibrarymember{operator==}{expected}% |
| 8486 | +\indexlibrarymember{operator==}{expected<void>}% |
8487 | 8487 | \begin{itemdecl}
|
8488 | 8488 | template<class E2>
|
8489 | 8489 | constexpr bool operator==(const expected& x, const unexpected<E2>& e);
|
|
0 commit comments