beman::optional::optional<T&>

Synopsis

Declared in <beman/optional/optional.hpp>
template<class T>
class optional<T&>;

Types

Name Description
iterator The type of the iterator for the optional.
value_type The type of the value stored in the optional.

Member Functions

Name Description
optional [constructor]Constructors
~optional [destructor]Destructor.
operator= Assignment operators
and_then Applies a function to the stored value if there is one.
begin Returns an iterator to the beginning of the optional.
emplace Emplaces a new value in the optional, destroying the current one if
end Returns an iterator to the end of the optional.
has_value Checks if the optional has a value.
operator* Returns a reference to the stored value.
operator-> Returns a pointer to the stored value.
or_else Calls a function if the optional is empty.
reset Resets the optional to an empty state.
swap Swaps the contents of this optional with another.
transform Applies a function to the stored value if there is one.
value Returns the stored value if there is one, otherwise throws
value_or Returns the stored value if there is one, otherwise returns u.
operator bool Converts the optional to a boolean value.

Friends

|===
Name Description
optional

Created with MrDocs