Function unwrap_or

Summary

#include <toml/result.hpp>

(1) value_type & unwrap_or(value_type &opt) &

(2) value_type const  & unwrap_or(value_type const &opt) const &

(3) value_type unwrap_or(value_type opt) &&

Function overload

Synopsis

#include <toml/result.hpp>

value_type & unwrap_or(value_type &opt) &

Description

No description yet.

Mentioned in

Source

Lines 419-423 in toml/result.hpp.

value_type&       unwrap_or(value_type& opt) &
{
    if(is_err()) {return opt;}
    return this->succ.value;
}

Synopsis

#include <toml/result.hpp>

value_type const  & unwrap_or(value_type const &opt) const &

Description

No description yet.

Mentioned in

Source

Lines 424-428 in toml/result.hpp.

value_type const& unwrap_or(value_type const& opt) const&
{
    if(is_err()) {return opt;}
    return this->succ.value;
}

Synopsis

#include <toml/result.hpp>

value_type unwrap_or(value_type opt) &&

Description

No description yet.

Mentioned in

Source

Lines 429-433 in toml/result.hpp.

value_type        unwrap_or(value_type opt) &&
{
    if(is_err()) {return opt;}
    return this->succ.value;
}





Add Discussion as Guest

Log in