gtsam  4.0.0
gtsam
gtsam::ValueWithDefault< T, defaultValue > Struct Template Reference

Detailed Description

template<typename T, T defaultValue>
struct gtsam::ValueWithDefault< T, defaultValue >

Helper struct that encapsulates a value with a default, this is just used as a member object so you don't have to specify defaults in the class constructor.

Public Member Functions

 ValueWithDefault ()
 Default constructor, initialize to default value supplied in template argument.
 
 ValueWithDefault (const T &_value)
 Initialize to the given value.
 
T & operator * ()
 Operator to access the value.
 
const T & operator * () const
 Operator to access the value.
 
 operator T () const
 Implicit conversion allows use in if statements for bool type, etc. More...
 

Public Attributes

value
 

Member Function Documentation

◆ operator T()

template<typename T, T defaultValue>
gtsam::ValueWithDefault< T, defaultValue >::operator T ( ) const
inline

Implicit conversion allows use in if statements for bool type, etc.


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