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

#include <common.hpp>

Public Member Functions

 operator bool () const
 
T & operator* ()
 
T const & operator* () const
 
T * operator-> ()
 
T const * operator-> () const
 
 optional ()
 
 optional (nullopt_t)
 
 optional (T const &type)
 

Private Attributes

bool is_valid_
 
type_
 

Detailed Description

template<class T>
class Sophus::optional< T >

Lightweight optional implementation which requires T to have a default constructor.

TODO: Replace with std::optional once Sophus moves to c++17.

Definition at line 185 of file common.hpp.

Constructor & Destructor Documentation

◆ optional() [1/3]

template<class T >
Sophus::optional< T >::optional ( )
inline

Definition at line 187 of file common.hpp.

◆ optional() [2/3]

template<class T >
Sophus::optional< T >::optional ( nullopt_t  )
inline

Definition at line 189 of file common.hpp.

◆ optional() [3/3]

template<class T >
Sophus::optional< T >::optional ( T const &  type)
inline

Definition at line 191 of file common.hpp.

Member Function Documentation

◆ operator bool()

template<class T >
Sophus::optional< T >::operator bool ( ) const
inlineexplicit

Definition at line 193 of file common.hpp.

◆ operator*() [1/2]

template<class T >
T& Sophus::optional< T >::operator* ( )
inline

Definition at line 210 of file common.hpp.

◆ operator*() [2/2]

template<class T >
T const& Sophus::optional< T >::operator* ( ) const
inline

Definition at line 205 of file common.hpp.

◆ operator->() [1/2]

template<class T >
T* Sophus::optional< T >::operator-> ( )
inline

Definition at line 200 of file common.hpp.

◆ operator->() [2/2]

template<class T >
T const* Sophus::optional< T >::operator-> ( ) const
inline

Definition at line 195 of file common.hpp.

Member Data Documentation

◆ is_valid_

template<class T >
bool Sophus::optional< T >::is_valid_
private

Definition at line 217 of file common.hpp.

◆ type_

template<class T >
T Sophus::optional< T >::type_
private

Definition at line 216 of file common.hpp.


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


sophus
Author(s): Hauke Strasdat
autogenerated on Wed Mar 2 2022 01:01:48