mirror of
https://github.com/TartanLlama/expected.git
synced 2025-08-04 19:34:30 +02:00
Update docs
This commit is contained in:
@@ -264,7 +264,7 @@ public:
|
|||||||
using <a href='doc_expected.html#tl::expected-T,E-'>unexpected_type</a> = <a href='doc_expected.html#tl::unexpected-E-'>unexpected<E></a>;
|
using <a href='doc_expected.html#tl::expected-T,E-'>unexpected_type</a> = <a href='doc_expected.html#tl::unexpected-E-'>unexpected<E></a>;
|
||||||
|
|
||||||
template <class F>
|
template <class F>
|
||||||
'hidden' <a href='doc_expected.html#tl::expected-T,E-::and_then(F&&)&'>and_then</a>(F&& f) &;
|
constexpr auto and_then(F &&f) &;
|
||||||
template <class F>
|
template <class F>
|
||||||
constexpr auto and_then(F &&f) &&;
|
constexpr auto and_then(F &&f) &&;
|
||||||
template <class F>
|
template <class F>
|
||||||
@@ -386,7 +386,7 @@ An `expected<T, E>` object is an object that contains the storage for another ob
|
|||||||
### Function template `tl::expected::and_then`<a id="tl::expected-T,E-::and_then(F&&)&"></a>
|
### Function template `tl::expected::and_then`<a id="tl::expected-T,E-::and_then(F&&)&"></a>
|
||||||
|
|
||||||
<pre><code class="language-cpp">(1) template <class F>
|
<pre><code class="language-cpp">(1) template <class F>
|
||||||
'hidden' and_then(F&& f) &;
|
constexpr auto and_then(F &&f) &;
|
||||||
|
|
||||||
(2) template <class F>
|
(2) template <class F>
|
||||||
constexpr auto and_then(F &&f) &&;
|
constexpr auto and_then(F &&f) &&;
|
||||||
@@ -397,7 +397,7 @@ An `expected<T, E>` object is an object that contains the storage for another ob
|
|||||||
(4) template <class F>
|
(4) template <class F>
|
||||||
constexpr auto and_then(F &&f) const &&;</code></pre>
|
constexpr auto and_then(F &&f) const &&;</code></pre>
|
||||||
|
|
||||||
Carries out some operation which returns an expected on the stored object if there is one. \\requires `std::invoke(std::forward<F>(f), value())` returns a `std::expected<U>` for some `U`. \\returns Let `U` be the result of `std::invoke(std::forward<F>(f), value())`. Returns a `std::expected<U>`. The return value is empty if `*this` is empty, otherwise the return value of `std::invoke(std::forward<F>(f), value())` is returned. \\group and\_then \\synopsis template \<class F\>\\nconstexpr auto and\_then(F &\&f) &;
|
Carries out some operation which returns an expected on the stored object if there is one. \\requires `std::invoke(std::forward<F>(f), value())` returns a `std::expected<U>` for some `U`. \\returns Let `U` be the result of `std::invoke(std::forward<F>(f), value())`. Returns a `std::expected<U>`. The return value is empty if `*this` is empty, otherwise the return value of `std::invoke(std::forward<F>(f), value())` is returned.
|
||||||
|
|
||||||
### Function template `tl::expected::map`<a id="tl::expected-T,E-::map(F&&)&"></a>
|
### Function template `tl::expected::map`<a id="tl::expected-T,E-::map(F&&)&"></a>
|
||||||
|
|
||||||
|
@@ -911,8 +911,8 @@ public:
|
|||||||
/// of `std::invoke(std::forward<F>(f), value())`. Returns a
|
/// of `std::invoke(std::forward<F>(f), value())`. Returns a
|
||||||
/// `std::expected<U>`. The return value is empty if `*this` is empty,
|
/// `std::expected<U>`. The return value is empty if `*this` is empty,
|
||||||
/// otherwise the return value of `std::invoke(std::forward<F>(f), value())`
|
/// otherwise the return value of `std::invoke(std::forward<F>(f), value())`
|
||||||
/// is returned. \group and_then \synopsis template <class F>\nconstexpr auto
|
/// is returned.
|
||||||
/// and_then(F &&f) &;
|
/// \synopsis template <class F>\nconstexpr auto and_then(F &&f) &;
|
||||||
template <class F> TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & {
|
template <class F> TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & {
|
||||||
using result = detail::invoke_result_t<F, T &>;
|
using result = detail::invoke_result_t<F, T &>;
|
||||||
static_assert(detail::is_expected<result>::value,
|
static_assert(detail::is_expected<result>::value,
|
||||||
@@ -965,8 +965,8 @@ public:
|
|||||||
/// of `std::invoke(std::forward<F>(f), value())`. Returns a
|
/// of `std::invoke(std::forward<F>(f), value())`. Returns a
|
||||||
/// `std::expected<U>`. The return value is empty if `*this` is empty,
|
/// `std::expected<U>`. The return value is empty if `*this` is empty,
|
||||||
/// otherwise the return value of `std::invoke(std::forward<F>(f), value())`
|
/// otherwise the return value of `std::invoke(std::forward<F>(f), value())`
|
||||||
/// is returned. \group and_then \synopsis template <class F>\nconstexpr auto
|
/// is returned.
|
||||||
/// and_then(F &&f) &;
|
/// \synopsis template <class F>\nconstexpr auto and_then(F &&f) &;
|
||||||
template <class F>
|
template <class F>
|
||||||
TL_EXPECTED_11_CONSTEXPR detail::invoke_result_t<F, T &> and_then(F &&f) & {
|
TL_EXPECTED_11_CONSTEXPR detail::invoke_result_t<F, T &> and_then(F &&f) & {
|
||||||
using result = detail::invoke_result_t<F, T &>;
|
using result = detail::invoke_result_t<F, T &>;
|
||||||
|
Reference in New Issue
Block a user