class left
Declaration
template <class T>
class left { /* full declaration omitted */ };
Description
Helper class to construct a left-handed either monad
Declared at: libreglisse/either.hpp:70
Member Variables
- private reglisse::left::value_type m_value
Method Overview
- public constexpr auto borrow() const & noexcept -> const reglisse::left::value_type &
- public constexpr auto borrow() & noexcept -> reglisse::left::value_type &
- public constexpr left<T>(const reglisse::left::value_type & value)
- public constexpr left<T>(reglisse::left::value_type && value)
- public constexpr auto take() const && noexcept -> const reglisse::left::value_type
- public constexpr auto take() && noexcept -> reglisse::left::value_type
Methods
constexpr auto borrow() const& noexcept
-> const reglisse::left::value_type&
constexpr auto borrow() const& noexcept
-> const reglisse::left::value_type&
Description
Borrow the value stored within the class
Declared at: libreglisse/either.hpp:94
Returns
An immutable reference to the value stored within the class.
constexpr auto borrow() & noexcept
-> reglisse::left::value_type&
constexpr auto borrow() & noexcept
-> reglisse::left::value_type&
Description
Borrow the value stored within the class
Declared at: libreglisse/either.hpp:100
Returns
A mutable reference to the value stored within the class.
constexpr left<T>(
const reglisse::left::value_type& value)
constexpr left<T>(
const reglisse::left::value_type& value)
Description
Construct by copying a value_type
Declared at: libreglisse/either.hpp:81
Parameters
- const reglisse::left::value_type& value
- The value to be stored.
constexpr left<T>(
reglisse::left::value_type&& value)
constexpr left<T>(
reglisse::left::value_type&& value)
Description
Construct by moving a value_type.
Declared at: libreglisse/either.hpp:87
Parameters
- reglisse::left::value_type&& value
- The value to move into the class.
constexpr auto take() const&& noexcept
-> const reglisse::left::value_type
constexpr auto take() const&& noexcept
-> const reglisse::left::value_type
Description
Take the value stored within the class. This operation leaves the class in an undefined state.
Declared at: libreglisse/either.hpp:107
Returns
The value stored within the class
constexpr auto take() && noexcept
-> reglisse::left::value_type
constexpr auto take() && noexcept
-> reglisse::left::value_type
Description
Take the value stored within the class. This operation leaves the class in an undefined state.
Declared at: libreglisse/either.hpp:114
Returns
The value stored within the class