#include <userver/utils/optional_ref.hpp>
Class that behaves as a nullable reference. Main difference from the pointer - value comparison of pointed values.
Initializes from reference to a T or from optional<T>.
Once the reference is constructed it can not be changed to point to different address.
Definition at line 27 of file optional_ref.hpp.
Public Member Functions | |
| constexpr | OptionalRef (std::nullopt_t) noexcept | 
| constexpr | OptionalRef (const OptionalRef &) noexcept=default | 
| constexpr OptionalRef & | operator= (const OptionalRef &) noexcept=delete | 
| constexpr | OptionalRef (T &other) noexcept | 
| constexpr | OptionalRef (const T &&)=delete | 
| template<typename U > | |
| constexpr | OptionalRef (const std::optional< U > &other) noexcept | 
| template<typename U > | |
| constexpr | OptionalRef (std::optional< U > &other) noexcept | 
| template<typename U > | |
| constexpr | OptionalRef (const std::optional< U > &&) noexcept | 
| template<typename U > | |
| constexpr | OptionalRef (const boost::optional< U > &other) noexcept | 
| template<typename U > | |
| constexpr | OptionalRef (boost::optional< U > &other) noexcept | 
| template<typename U > | |
| constexpr | OptionalRef (const boost::optional< U > &&) noexcept | 
| constexpr bool | has_value () const noexcept | 
| constexpr | operator bool () const noexcept | 
| constexpr T * | operator-> () const | 
| constexpr T & | operator* () const | 
| constexpr T & | value () const | 
      
  | 
  inlineconstexprnoexcept | 
Definition at line 32 of file optional_ref.hpp.
      
  | 
  inlineconstexprnoexcept | 
Definition at line 36 of file optional_ref.hpp.
      
  | 
  inlineexplicitconstexprnoexcept | 
Definition at line 42 of file optional_ref.hpp.
      
  | 
  inlineexplicitconstexprnoexcept | 
Definition at line 46 of file optional_ref.hpp.
      
  | 
  inlineexplicitconstexprnoexcept | 
Definition at line 50 of file optional_ref.hpp.
      
  | 
  inlineexplicitconstexprnoexcept | 
Definition at line 55 of file optional_ref.hpp.
      
  | 
  inlineexplicitconstexprnoexcept | 
Definition at line 59 of file optional_ref.hpp.
      
  | 
  inlineexplicitconstexprnoexcept | 
Definition at line 63 of file optional_ref.hpp.
      
  | 
  inlineconstexprnoexcept | 
Definition at line 67 of file optional_ref.hpp.
      
  | 
  inlineexplicitconstexprnoexcept | 
Definition at line 68 of file optional_ref.hpp.
      
  | 
  inlineconstexpr | 
Definition at line 75 of file optional_ref.hpp.
      
  | 
  inlineconstexpr | 
Definition at line 70 of file optional_ref.hpp.
      
  | 
  inlineconstexpr | 
Definition at line 80 of file optional_ref.hpp.