Dereference operators

Synopses

Declared in <bslstl_optional.h>

Return a reference providing modifiable access to the underlying t_TYPE object.

t_TYPE&
operator*() &;

Return an rvalue reference to the contained value.

t_TYPE&&
operator*() &&;

Return a reference providing non‐modifiable access to the underlying t_TYPE object.

t_TYPE const&
operator*() const &;

Same as the operator* overload taking const &.

t_TYPE const&&
operator*() const &&;

Return Value

  • reference providing modifiable access to the contained value

  • rvalue reference providing modifiable access to the contained value

  • reference providing non‐modifiable access to the contained value

  • rvalue reference providing non‐modifiable access to the contained value

Created with MrDocs