Open3D (C++ API)  0.17.0
Public Types | Public Member Functions
open3d::utility::optional< T > Class Template Reference

#include <Optional.h>

Inheritance diagram for open3d::utility::optional< T >:

Public Types

typedef T value_type
 

Public Member Functions

constexpr optional () noexcept
 
constexpr optional (nullopt_t) noexcept
 
 optional (const optional &rhs)
 
 optional (optional &&rhs) noexcept(std::is_nothrow_move_constructible< T >::value)
 
template<typename U = T, TR2_OPTIONAL_REQUIRES(std::is_constructible< T, U && >::value && !std::is_same< typename std::decay< U >::type, in_place_t >::value && !std::is_same< typename std::decay< U >::type, optional< T >>::value && std::is_convertible< U &&, T >) >
constexpr optional (U &&u)
 
template<typename U = T, TR2_OPTIONAL_REQUIRES(std::is_constructible< T, U && >::value && !std::is_same< typename std::decay< U >::type, in_place_t >::value && !std::is_same< typename std::decay< U >::type, optional< T >>::value && !std::is_convertible< U &&, T >) >
constexpr optional (U &&u)
 
template<class... Args>
constexpr optional (in_place_t, Args &&... args)
 
template<class U , class... Args, TR2_OPTIONAL_REQUIRES( std::is_constructible< T, std::initializer_list< U >>) >
constexpr optional (in_place_t, std::initializer_list< U > il, Args &&... args)
 
 ~optional ()=default
 
optionaloperator= (nullopt_t) noexcept
 
optionaloperator= (const optional &rhs)
 
optionaloperator= (optional &&rhs) noexcept(std::is_nothrow_move_assignable< T >::value &&std::is_nothrow_move_constructible< T >::value)
 
template<class U = T>
auto operator= (U &&v) -> typename std::enable_if< std::is_constructible< T, U >::value &&!std::is_same< typename std::decay< U >::type, optional< T >>::value &&(std::is_scalar< T >::value||std::is_same< typename std::decay< U >::type, T >::value) &&std::is_assignable< T &, U >::value, optional & >::type
 
template<class... Args>
void emplace (Args &&... args)
 
template<class U , class... Args>
void emplace (std::initializer_list< U > il, Args &&... args)
 
void swap (optional< T > &rhs) noexcept(std::is_nothrow_move_constructible< T >::value &&noexcept(std::swap(std::declval< T & >(), std::declval< T & >())))
 
constexpr operator bool () const noexcept
 
constexpr bool has_value () const noexcept
 
TR2_OPTIONAL_HOST_CONSTEXPR T const * operator-> () const
 
TR2_OPTIONAL_HOST_CONSTEXPR T * operator-> ()
 
TR2_OPTIONAL_HOST_CONSTEXPR T const & operator* () const &
 
TR2_OPTIONAL_HOST_CONSTEXPR T & operator* () &
 
TR2_OPTIONAL_HOST_CONSTEXPR T && operator* () &&
 
TR2_OPTIONAL_HOST_CONSTEXPR T const & value () const &
 
TR2_OPTIONAL_HOST_CONSTEXPR T & value () &
 
TR2_OPTIONAL_HOST_CONSTEXPR T && value () &&
 
template<class V >
constexpr T value_or (V &&v) const &
 
template<class V >
constexpr T value_or (V &&v) &&
 
void reset () noexcept
 

Member Typedef Documentation

◆ value_type

template<class T >
typedef T open3d::utility::optional< T >::value_type

Constructor & Destructor Documentation

◆ optional() [1/8]

template<class T >
constexpr open3d::utility::optional< T >::optional ( )
inlineconstexprnoexcept

◆ optional() [2/8]

template<class T >
constexpr open3d::utility::optional< T >::optional ( nullopt_t  )
inlineconstexprnoexcept

◆ optional() [3/8]

template<class T >
open3d::utility::optional< T >::optional ( const optional< T > &  rhs)
inline

◆ optional() [4/8]

template<class T >
open3d::utility::optional< T >::optional ( optional< T > &&  rhs)
inlinenoexcept

◆ optional() [5/8]

template<class T >
template<typename U = T, TR2_OPTIONAL_REQUIRES(std::is_constructible< T, U && >::value && !std::is_same< typename std::decay< U >::type, in_place_t >::value && !std::is_same< typename std::decay< U >::type, optional< T >>::value && std::is_convertible< U &&, T >) >
constexpr open3d::utility::optional< T >::optional ( U &&  u)
inlineconstexpr

◆ optional() [6/8]

template<class T >
template<typename U = T, TR2_OPTIONAL_REQUIRES(std::is_constructible< T, U && >::value && !std::is_same< typename std::decay< U >::type, in_place_t >::value && !std::is_same< typename std::decay< U >::type, optional< T >>::value && !std::is_convertible< U &&, T >) >
constexpr open3d::utility::optional< T >::optional ( U &&  u)
inlineexplicitconstexpr

◆ optional() [7/8]

template<class T >
template<class... Args>
constexpr open3d::utility::optional< T >::optional ( in_place_t  ,
Args &&...  args 
)
inlineexplicitconstexpr

◆ optional() [8/8]

template<class T >
template<class U , class... Args, TR2_OPTIONAL_REQUIRES( std::is_constructible< T, std::initializer_list< U >>) >
constexpr open3d::utility::optional< T >::optional ( in_place_t  ,
std::initializer_list< U >  il,
Args &&...  args 
)
inlineexplicitconstexpr

◆ ~optional()

template<class T >
open3d::utility::optional< T >::~optional ( )
default

Member Function Documentation

◆ emplace() [1/2]

template<class T >
template<class... Args>
void open3d::utility::optional< T >::emplace ( Args &&...  args)
inline

◆ emplace() [2/2]

template<class T >
template<class U , class... Args>
void open3d::utility::optional< T >::emplace ( std::initializer_list< U >  il,
Args &&...  args 
)
inline

◆ has_value()

template<class T >
constexpr bool open3d::utility::optional< T >::has_value ( ) const
inlineconstexprnoexcept

◆ operator bool()

template<class T >
constexpr open3d::utility::optional< T >::operator bool ( ) const
inlineexplicitconstexprnoexcept

◆ operator*() [1/3]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T& open3d::utility::optional< T >::operator* ( ) &
inline

◆ operator*() [2/3]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T&& open3d::utility::optional< T >::operator* ( ) &&
inline

◆ operator*() [3/3]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T const& open3d::utility::optional< T >::operator* ( ) const &
inline

◆ operator->() [1/2]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T* open3d::utility::optional< T >::operator-> ( )
inline

◆ operator->() [2/2]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T const* open3d::utility::optional< T >::operator-> ( ) const
inline

◆ operator=() [1/4]

template<class T >
optional& open3d::utility::optional< T >::operator= ( const optional< T > &  rhs)
inline

◆ operator=() [2/4]

template<class T >
optional& open3d::utility::optional< T >::operator= ( nullopt_t  )
inlinenoexcept

◆ operator=() [3/4]

template<class T >
optional& open3d::utility::optional< T >::operator= ( optional< T > &&  rhs)
inlinenoexcept

◆ operator=() [4/4]

template<class T >
template<class U = T>
auto open3d::utility::optional< T >::operator= ( U &&  v) -> typename std::enable_if< std::is_constructible<T, U>::value && !std::is_same<typename std::decay<U>::type, optional<T>>::value && (std::is_scalar<T>::value || std::is_same<typename std::decay<U>::type, T>::value) && std::is_assignable<T&, U>::value, optional&>::type
inline

◆ reset()

template<class T >
void open3d::utility::optional< T >::reset ( )
inlinenoexcept

◆ swap()

template<class T >
void open3d::utility::optional< T >::swap ( optional< T > &  rhs)
inlinenoexcept

◆ value() [1/3]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T& open3d::utility::optional< T >::value ( ) &
inline

◆ value() [2/3]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T&& open3d::utility::optional< T >::value ( ) &&
inline

◆ value() [3/3]

template<class T >
TR2_OPTIONAL_HOST_CONSTEXPR T const& open3d::utility::optional< T >::value ( ) const &
inline

◆ value_or() [1/2]

template<class T >
template<class V >
constexpr T open3d::utility::optional< T >::value_or ( V &&  v) &&
inlineconstexpr

◆ value_or() [2/2]

template<class T >
template<class V >
constexpr T open3d::utility::optional< T >::value_or ( V &&  v) const &
inlineconstexpr

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