52 #ifndef __PCL_Optional_h
53 #define __PCL_Optional_h
58 #include <pcl/Diagnostics.h>
124 if (
bool( m_defined = x.m_defined ) )
134 if (
bool( m_defined = x.m_defined ) )
135 m_value = std::move( x.m_value );
158 operator const T&()
const
172 const T& operator ()()
const
200 const T& OrElse(
const T& value )
const
202 return m_defined ? m_value : value;
210 const T& OrElseThrow(
const Exception& exception )
const
221 const T& OrElseThrow(
const String& message )
const
225 throw Error( message );
238 return m_defined ? (x.m_defined ? m_value == x.m_value :
false) : !x.m_defined;
247 return m_defined && m_value == value;
258 return m_defined && (!x.m_defined || m_value < x.m_value);
267 return m_defined && m_value < value;
273 bool m_defined =
false;
A simple exception with an associated error message.
Root base class for all PCL exception classes.
An object that can be in a defined or undefined state.
Optional(const Optional &)=default
bool operator==(const Array< T, A > &x1, const Array< T, A > &x2) noexcept
bool operator<(const Array< T, A > &x1, const Array< T, A > &x2) noexcept