Skip to content

Commit

Permalink
Documentation update for result<T>::value_type
Browse files Browse the repository at this point in the history
  • Loading branch information
zajo committed Nov 6, 2023
1 parent c497786 commit 30a6e2a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions doc/leaf.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2422,6 +2422,8 @@ namespace boost { namespace leaf {
{
public:
using value_type = T;
result() noexcept;
result( T && v ) noexcept;
result( T const & v );
Expand Down Expand Up @@ -2474,6 +2476,8 @@ namespace boost { namespace leaf {
{
public:
using value_type = void;
result() noexcept;
result( error_id err ) noexcept;
Expand Down Expand Up @@ -4408,6 +4412,8 @@ namespace boost { namespace leaf {
{
public:
using value_type = T;
result() noexcept;
result( T && v ) noexcept;
result( T const & v );
Expand Down Expand Up @@ -4457,6 +4463,8 @@ namespace boost { namespace leaf {
{
public:
using value_type = void;
result() noexcept;
result( error_id err ) noexcept;
Expand Down Expand Up @@ -4735,6 +4743,15 @@ namespace boost { namespace leaf {
} }
----

'''

[[result::value_type]]
==== `value_type`

A member type of `result<T>`, defined as a synonim for `T`.

'''

[[result::bad_result]]
Effects: :: If `*this` is in <<result,value state>>, returns a reference to the stored value, otherwise throws `bad_result`.

Expand Down

0 comments on commit 30a6e2a

Please sign in to comment.