class right

Declaration

template <class T>
class right { /* full declaration omitted */ };

Description

Helper class to construct a right-handed either monad

Declared at: libreglisse/either.hpp:137

Member Variables

private reglisse::right::value_type m_value

Method Overview

Methods

constexpr auto borrow() const& noexcept
    -> const reglisse::right::value_type&

Description

Borrow the value stored within the class

Declared at: libreglisse/either.hpp:161

Returns

An immutable reference to the value stored within the class.

constexpr auto borrow() & noexcept
    -> reglisse::right::value_type&

Description

Borrow the value stored within the class

Declared at: libreglisse/either.hpp:167

Returns

A mutable reference to the value stored within the class.

constexpr right<T>(
    const reglisse::right::value_type& value)

Description

Construct a right by copying a value_type

Declared at: libreglisse/either.hpp:148

Parameters

const reglisse::right::value_type& value
The value to be stored.

constexpr right<T>(
    reglisse::right::value_type&& value)

Description

Construct a right by moving a value_type

Declared at: libreglisse/either.hpp:154

Parameters

reglisse::right::value_type&& value
The value to be stored.

constexpr auto take() const&& noexcept
    -> const reglisse::right::value_type

Description

Take the value stored within the class. This operation leaves the class in an undefined state.

Declared at: libreglisse/either.hpp:174

Returns

The value stored within the class

constexpr auto take() && noexcept
    -> reglisse::right::value_type

Description

Take the value stored within the class. This operation leaves the class in an undefined state.

Declared at: libreglisse/either.hpp:181

Returns

The value stored within the class