Function unwrap

Summary

#include <toml/result.hpp>

(1) value_type & unwrap() &

(2) value_type const  & unwrap() const &

(3) value_type && unwrap() &&

Function overload

Synopsis

#include <toml/result.hpp>

value_type & unwrap() &

Description

No description yet.

Mentioned in

Source

Lines 391-399 in toml/result.hpp.

value_type&       unwrap() &
{
    if(is_err())
    {
        throw std::runtime_error("toml::result: bad unwrap: " +
                                 format_error(this->as_err()));
    }
    return this->succ.value;
}

Synopsis

#include <toml/result.hpp>

value_type const  & unwrap() const &

Description

No description yet.

Mentioned in

Source

Lines 400-408 in toml/result.hpp.

value_type const& unwrap() const&
{
    if(is_err())
    {
        throw std::runtime_error("toml::result: bad unwrap: " +
                                 format_error(this->as_err()));
    }
    return this->succ.value;
}

Synopsis

#include <toml/result.hpp>

value_type && unwrap() &&

Description

No description yet.

Mentioned in

Source

Lines 409-417 in toml/result.hpp.

value_type&&      unwrap() &&
{
    if(is_err())
    {
        throw std::runtime_error("toml::result: bad unwrap: " +
                                 format_error(this->as_err()));
    }
    return std::move(this->succ.value);
}





Add Discussion as Guest

Log in