diff --git a/docs/index.md b/docs/index.md index aeaf9a2..57b57e1 100644 --- a/docs/index.md +++ b/docs/index.md @@ -264,7 +264,7 @@ public: using unexpected_type = unexpected<E>; template <class F> - 'hidden' and_then(F&& f) &; + constexpr auto and_then(F &&f) &; template <class F> constexpr auto and_then(F &&f) &&; template <class F> @@ -386,7 +386,7 @@ An `expected` object is an object that contains the storage for another ob ### Function template `tl::expected::and_then`
(1)  template <class F>
-     'hidden' and_then(F&& f) &;
+     constexpr auto and_then(F &&f) &;
 
 (2)  template <class F>
      constexpr auto and_then(F &&f) &&;
@@ -397,7 +397,7 @@ An `expected` object is an object that contains the storage for another ob
 (4)  template <class F>
      constexpr auto and_then(F &&f) const &&;
-Carries out some operation which returns an expected on the stored object if there is one. \\requires `std::invoke(std::forward(f), value())` returns a `std::expected` for some `U`. \\returns Let `U` be the result of `std::invoke(std::forward(f), value())`. Returns a `std::expected`. The return value is empty if `*this` is empty, otherwise the return value of `std::invoke(std::forward(f), value())` is returned. \\group and\_then \\synopsis template \\\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), value())` returns a `std::expected` for some `U`. \\returns Let `U` be the result of `std::invoke(std::forward(f), value())`. Returns a `std::expected`. The return value is empty if `*this` is empty, otherwise the return value of `std::invoke(std::forward(f), value())` is returned. ### Function template `tl::expected::map` diff --git a/expected.hpp b/expected.hpp index ebafc33..61b567c 100644 --- a/expected.hpp +++ b/expected.hpp @@ -911,8 +911,8 @@ public: /// of `std::invoke(std::forward(f), value())`. Returns a /// `std::expected`. The return value is empty if `*this` is empty, /// otherwise the return value of `std::invoke(std::forward(f), value())` - /// is returned. \group and_then \synopsis template \nconstexpr auto - /// and_then(F &&f) &; + /// is returned. + /// \synopsis template \nconstexpr auto and_then(F &&f) &; template TL_EXPECTED_11_CONSTEXPR auto and_then(F &&f) & { using result = detail::invoke_result_t; static_assert(detail::is_expected::value, @@ -965,8 +965,8 @@ public: /// of `std::invoke(std::forward(f), value())`. Returns a /// `std::expected`. The return value is empty if `*this` is empty, /// otherwise the return value of `std::invoke(std::forward(f), value())` - /// is returned. \group and_then \synopsis template \nconstexpr auto - /// and_then(F &&f) &; + /// is returned. + /// \synopsis template \nconstexpr auto and_then(F &&f) &; template TL_EXPECTED_11_CONSTEXPR detail::invoke_result_t and_then(F &&f) & { using result = detail::invoke_result_t;