class some

Declaration

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

Description

Helper class to construct a maybe monad with value.

Declared at: libreglisse/maybe.hpp:71

Member Variables

private reglisse::some::value_type m_value

Method Overview

Methods

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

Description

Borrow the value stored within the class

Declared at: libreglisse/maybe.hpp:95

Returns

An immutable reference to the value stored within the class.

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

Description

Borrow the value stored within the class

Declared at: libreglisse/maybe.hpp:101

Returns

An mutable reference to the value stored within the class.

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

Description

Construct by copying a value_type

Declared at: libreglisse/maybe.hpp:82

Parameters

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

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

Description

Construct by moving a value_type

Declared at: libreglisse/maybe.hpp:88

Parameters

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

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

Description

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

Declared at: libreglisse/maybe.hpp:108

Returns

The value stored within the class

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

Description

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

Declared at: libreglisse/maybe.hpp:115

Returns

The value stored within the class