Public Member Functions | Private Attributes | List of all members
cartographer::common::optional< T > Class Template Reference

#include <optional.h>

Public Member Functions

bool has_value () const
 
optional< T > & operator= (const T &other_value)
 
optional< T > & operator= (const optional< T > &other)
 
 optional ()
 
 optional (const optional &other)
 
 optional (const T &value)
 
const T & value () const
 

Private Attributes

std::unique_ptr< T > value_
 

Detailed Description

template<class T>
class cartographer::common::optional< T >

Definition at line 29 of file optional.h.

Constructor & Destructor Documentation

◆ optional() [1/3]

template<class T>
cartographer::common::optional< T >::optional ( )
inline

Definition at line 31 of file optional.h.

◆ optional() [2/3]

template<class T>
cartographer::common::optional< T >::optional ( const optional< T > &  other)
inline

Definition at line 33 of file optional.h.

◆ optional() [3/3]

template<class T>
cartographer::common::optional< T >::optional ( const T &  value)
inlineexplicit

Definition at line 39 of file optional.h.

Member Function Documentation

◆ has_value()

template<class T>
bool cartographer::common::optional< T >::has_value ( ) const
inline

Definition at line 41 of file optional.h.

◆ operator=() [1/2]

template<class T>
optional<T>& cartographer::common::optional< T >::operator= ( const T &  other_value)
inline

Definition at line 48 of file optional.h.

◆ operator=() [2/2]

template<class T>
optional<T>& cartographer::common::optional< T >::operator= ( const optional< T > &  other)
inline

Definition at line 53 of file optional.h.

◆ value()

template<class T>
const T& cartographer::common::optional< T >::value ( ) const
inline

Definition at line 43 of file optional.h.

Member Data Documentation

◆ value_

template<class T>
std::unique_ptr<T> cartographer::common::optional< T >::value_
private

Definition at line 63 of file optional.h.


The documentation for this class was generated from the following file:


cartographer
Author(s): The Cartographer Authors
autogenerated on Mon Feb 28 2022 22:00:59