ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::utility::optional< T > Class Template Reference

#include <Optional.h>

Inheritance diagram for cloudViewer::utility::optional< T >:
Collaboration diagram for cloudViewer::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, typename std::enable_if< 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 > ::value, bool >::type = false>
constexpr optional (U &&u)
 
template<typename U = T, typename std::enable_if< 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 > ::value, bool >::type = false>
constexpr optional (U &&u)
 
template<class... Args>
constexpr optional (in_place_t, Args &&... args)
 
template<class U , class... Args, typename std::enable_if< std::is_constructible< T, std::initializer_list< U >> ::value, bool >::type = false>
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
 
constexpr T const * operator-> () const
 
constexpr T * operator-> ()
 
constexpr T const & operator* () const &
 
constexpr T & operator* () &
 
constexpr T && operator* () &&
 
constexpr T const & value () const &
 
constexpr T & value () &
 
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
 

Detailed Description

template<class T>
class cloudViewer::utility::optional< T >

Definition at line 244 of file Optional.h.

Member Typedef Documentation

◆ value_type

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

Definition at line 299 of file Optional.h.

Constructor & Destructor Documentation

◆ optional() [1/8]

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

Definition at line 302 of file Optional.h.

◆ optional() [2/8]

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

Definition at line 303 of file Optional.h.

◆ optional() [3/8]

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

Definition at line 305 of file Optional.h.

◆ optional() [4/8]

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

Definition at line 312 of file Optional.h.

◆ optional() [5/8]

template<class T >
template<typename U = T, typename std::enable_if< 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 > ::value, bool >::type = false>
constexpr cloudViewer::utility::optional< T >::optional ( U &&  u)
inlineconstexpr

Definition at line 334 of file Optional.h.

◆ optional() [6/8]

template<class T >
template<typename U = T, typename std::enable_if< 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 > ::value, bool >::type = false>
constexpr cloudViewer::utility::optional< T >::optional ( U &&  u)
inlineexplicitconstexpr

Definition at line 344 of file Optional.h.

◆ optional() [7/8]

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

Definition at line 347 of file Optional.h.

◆ optional() [8/8]

template<class T >
template<class U , class... Args, typename std::enable_if< std::is_constructible< T, std::initializer_list< U >> ::value, bool >::type = false>
constexpr cloudViewer::utility::optional< T >::optional ( in_place_t  ,
std::initializer_list< U >  il,
Args &&...  args 
)
inlineexplicitconstexpr

Definition at line 354 of file Optional.h.

◆ ~optional()

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

Member Function Documentation

◆ emplace() [1/2]

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

◆ emplace() [2/2]

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

Definition at line 416 of file Optional.h.

◆ has_value()

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

Definition at line 440 of file Optional.h.

Referenced by cloudViewer::core::Tensor::All(), cloudViewer::core::Tensor::Any(), cloudViewer::core::BindTensorFullCreation(), cloudViewer::core::BoolToTensor(), cloudViewer::core::CastOptionalDtypeDevice(), cloudViewer::t::pipelines::kernel::ComputeFPFHFeature(), cloudViewer::t::pipelines::registration::ComputeFPFHFeature(), cloudViewer::core::Concatenate(), cloudViewer::core::DoubleToTensor(), cloudViewer::t::geometry::PointCloud::EstimateColorGradients(), cloudViewer::t::geometry::PointCloud::EstimateNormals(), cloudViewer::core::nns::NearestNeighborSearch::FixedRadiusIndex(), cloudViewer::core::TensorKey::SliceImpl::GetStart(), cloudViewer::core::TensorKey::SliceImpl::GetStep(), cloudViewer::core::TensorKey::SliceImpl::GetStop(), cloudViewer::core::nns::NearestNeighborSearch::HybridIndex(), cloudViewer::core::TensorKey::SliceImpl::InstantiateDimSize(), cloudViewer::core::IntToTensor(), cloudViewer::core::DynamicSizeVector::IsDynamic(), cloudViewer::t::pipelines::registration::LegacyComputeFPFHFeature(), cloudViewer::core::nns::pybind_core_nns(), cloudViewer::core::pybind_core_tensor(), cloudViewer::core::pybind_core_tensor_function(), cloudViewer::core::pybind_cuda_utils(), cloudViewer::visualization::pybind_visualization_utility_methods(), cloudViewer::pipelines::color_map::QueryImageIntensity(), cloudViewer::pipelines::registration::RegistrationRANSACBasedOnCorrespondence(), cloudViewer::t::geometry::OrientedBoundingBox::Rotate(), cloudViewer::t::geometry::AxisAlignedBoundingBox::Scale(), cloudViewer::t::geometry::OrientedBoundingBox::Scale(), cloudViewer::ml::contrib::Subsample(), cloudViewer::ml::contrib::SubsampleBatch(), cloudViewer::t::geometry::Image::To(), cloudViewer::core::DynamicSizeVector::ToString(), and cloudViewer::core::TensorKey::SliceImpl::ToString().

◆ operator bool()

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

Definition at line 439 of file Optional.h.

◆ operator*() [1/3]

template<class T >
constexpr T& cloudViewer::utility::optional< T >::operator* ( ) &
inlineconstexpr

Definition at line 455 of file Optional.h.

◆ operator*() [2/3]

template<class T >
constexpr T&& cloudViewer::utility::optional< T >::operator* ( ) &&
inlineconstexpr

Definition at line 460 of file Optional.h.

References cloudViewer::utility::constexpr_move().

◆ operator*() [3/3]

template<class T >
constexpr T const& cloudViewer::utility::optional< T >::operator* ( ) const &
inlineconstexpr

Definition at line 451 of file Optional.h.

References TR2_OPTIONAL_ASSERTED_EXPRESSION.

◆ operator->() [1/2]

template<class T >
constexpr T* cloudViewer::utility::optional< T >::operator-> ( )
inlineconstexpr

Definition at line 446 of file Optional.h.

◆ operator->() [2/2]

template<class T >
constexpr T const* cloudViewer::utility::optional< T >::operator-> ( ) const
inlineconstexpr

Definition at line 442 of file Optional.h.

References TR2_OPTIONAL_ASSERTED_EXPRESSION.

◆ operator=() [1/4]

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

Definition at line 368 of file Optional.h.

◆ operator=() [2/4]

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

Definition at line 363 of file Optional.h.

◆ operator=() [3/4]

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

Definition at line 378 of file Optional.h.

◆ operator=() [4/4]

template<class T >
template<class U = T>
auto cloudViewer::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

Definition at line 391 of file Optional.h.

◆ reset()

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

Definition at line 497 of file Optional.h.

◆ swap()

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

Definition at line 422 of file Optional.h.

References std::swap().

◆ value() [1/3]

template<class T >
constexpr T& cloudViewer::utility::optional< T >::value ( ) &
inlineconstexpr

Definition at line 472 of file Optional.h.

◆ value() [2/3]

template<class T >
constexpr T&& cloudViewer::utility::optional< T >::value ( ) &&
inlineconstexpr

Definition at line 479 of file Optional.h.

◆ value() [3/3]

template<class T >
constexpr T const& cloudViewer::utility::optional< T >::value ( ) const &
inlineconstexpr

Definition at line 465 of file Optional.h.

Referenced by cloudViewer::core::Tensor::All(), cloudViewer::core::Tensor::Any(), cloudViewer::core::BindTensorFullCreation(), cloudViewer::core::BoolToTensor(), cloudViewer::core::CastOptionalDtypeDevice(), cloudViewer::t::pipelines::kernel::ComputeFPFHFeature(), cloudViewer::t::pipelines::registration::ComputeFPFHFeature(), cloudViewer::core::Concatenate(), cloudViewer::core::DoubleToTensor(), cloudViewer::t::geometry::PointCloud::EstimateColorGradients(), cloudViewer::t::geometry::PointCloud::EstimateNormals(), cloudViewer::core::nns::NearestNeighborSearch::FixedRadiusIndex(), cloudViewer::core::TensorKey::SliceImpl::GetStart(), cloudViewer::core::TensorKey::SliceImpl::GetStep(), cloudViewer::core::TensorKey::SliceImpl::GetStop(), cloudViewer::core::nns::NearestNeighborSearch::HybridIndex(), cloudViewer::core::TensorKey::SliceImpl::InstantiateDimSize(), cloudViewer::core::IntToTensor(), cloudViewer::t::pipelines::registration::LegacyComputeFPFHFeature(), cloudViewer::core::nns::pybind_core_nns(), cloudViewer::core::pybind_core_tensor(), cloudViewer::visualization::pybind_visualization_utility_methods(), cloudViewer::pipelines::color_map::QueryImageIntensity(), cloudViewer::pipelines::registration::RegistrationRANSACBasedOnCorrespondence(), cloudViewer::t::geometry::OrientedBoundingBox::Rotate(), cloudViewer::t::geometry::AxisAlignedBoundingBox::Scale(), cloudViewer::t::geometry::OrientedBoundingBox::Scale(), cloudViewer::ml::contrib::Subsample(), cloudViewer::ml::contrib::SubsampleBatch(), cloudViewer::core::DynamicSizeVector::ToString(), and cloudViewer::core::TensorKey::SliceImpl::ToString().

◆ value_or() [1/2]

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

Definition at line 490 of file Optional.h.

References cloudViewer::utility::constexpr_move().

◆ value_or() [2/2]

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

Definition at line 485 of file Optional.h.

Referenced by cloudViewer::t::geometry::Image::To().


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