kokkos-execution 0.0.1
Loading...
Searching...
No Matches
Kokkos::Execution::Impl::OptionalRef< T > Struct Template Reference

A non-owning, nullable reference to a T. More...

#include <optional_ref.hpp>

Public Member Functions

 OptionalRef ()=default
constexpr OptionalRef (T &value) noexcept
constexpr OptionalRef (T &&)=delete
constexpr bool has_value () const noexcept
constexpr T & get () const noexcept

Public Attributes

T * m_ptr = nullptr

Detailed Description

template<typename T>
struct Kokkos::Execution::Impl::OptionalRef< T >

A non-owning, nullable reference to a T.

Warning
The caller is responsible for ensuring the referenced object outlives the m_ptr handle.

Definition at line 14 of file optional_ref.hpp.

Constructor & Destructor Documentation

◆ OptionalRef() [1/3]

template<typename T>
Kokkos::Execution::Impl::OptionalRef< T >::OptionalRef ( )
default

◆ OptionalRef() [2/3]

template<typename T>
Kokkos::Execution::Impl::OptionalRef< T >::OptionalRef ( T & value)
inlineexplicitconstexprnoexcept

Definition at line 19 of file optional_ref.hpp.

◆ OptionalRef() [3/3]

template<typename T>
Kokkos::Execution::Impl::OptionalRef< T >::OptionalRef ( T && )
explicitconstexprdelete

Member Function Documentation

◆ get()

template<typename T>
T & Kokkos::Execution::Impl::OptionalRef< T >::get ( ) const
inlinenodiscardconstexprnoexcept

Definition at line 31 of file optional_ref.hpp.

◆ has_value()

template<typename T>
bool Kokkos::Execution::Impl::OptionalRef< T >::has_value ( ) const
inlinenodiscardconstexprnoexcept

Definition at line 26 of file optional_ref.hpp.

Member Data Documentation

◆ m_ptr

template<typename T>
T* Kokkos::Execution::Impl::OptionalRef< T >::m_ptr = nullptr

Definition at line 15 of file optional_ref.hpp.


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