Celeritas  0.5.0-86+4a8eea4
Classes | Functions
ObserverPtr.hh File Reference
#include <type_traits>
#include "corecel/Types.hh"
#include "corecel/math/Algorithms.hh"
This graph shows which files directly or indirectly include this file:

Classes

class  celeritas::ObserverPtr< T, M >
 Type-safe non-owning pointer. More...
 

Functions

template<class T >
CELER_FUNCTION celeritas::ObserverPtr (T *) -> ObserverPtr< T >
 
template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION void celeritas::swap (ObserverPtr< T, M > &lhs, ObserverPtr< T, M > &rhs) noexcept
 Swap two pointers.
 
template<class T >
ObserverPtr< T > celeritas::make_observer (T *ptr) noexcept
 Create an observer pointer from a pointer in the native memspace.
 
#define CELER_DEFINE_OBSPTR_CMP(TOKEN)
 
template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== (ObserverPtr< T1, M > const &lhs, ObserverPtr< T2, M > const &rhs) noexcept
 
template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= (ObserverPtr< T1, M > const &lhs, ObserverPtr< T2, M > const &rhs) noexcept
 
template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator< (ObserverPtr< T1, M > const &lhs, ObserverPtr< T2, M > const &rhs) noexcept
 
template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator> (ObserverPtr< T1, M > const &lhs, ObserverPtr< T2, M > const &rhs) noexcept
 
template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator<= (ObserverPtr< T1, M > const &lhs, ObserverPtr< T2, M > const &rhs) noexcept
 
template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator>= (ObserverPtr< T1, M > const &lhs, ObserverPtr< T2, M > const &rhs) noexcept
 
template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== (ObserverPtr< T, M > const &lhs, std::nullptr_t) noexcept
 
template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= (ObserverPtr< T, M > const &lhs, std::nullptr_t) noexcept
 
template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== (std::nullptr_t, ObserverPtr< T, M > const &rhs) noexcept
 
template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= (std::nullptr_t, ObserverPtr< T, M > const &rhs) noexcept
 

Macro Definition Documentation

◆ CELER_DEFINE_OBSPTR_CMP

#define CELER_DEFINE_OBSPTR_CMP (   TOKEN)
Value:
template<class T1, class T2, MemSpace M> \
CELER_CONSTEXPR_FUNCTION bool operator TOKEN( \
ObserverPtr<T1, M> const& lhs, ObserverPtr<T2, M> const& rhs) noexcept \
{ \
return lhs.get() TOKEN rhs.get(); \
}

Comparators

Function Documentation

◆ operator!=() [1/3]

template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= ( ObserverPtr< T, M > const &  lhs,
std::nullptr_t   
)
noexcept

Comparators

◆ operator!=() [2/3]

template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= ( ObserverPtr< T1, M > const &  lhs,
ObserverPtr< T2, M > const &  rhs 
)
noexcept

Comparators

◆ operator!=() [3/3]

template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator!= ( std::nullptr_t  ,
ObserverPtr< T, M > const &  rhs 
)
noexcept

Comparators

◆ operator<()

template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator< ( ObserverPtr< T1, M > const &  lhs,
ObserverPtr< T2, M > const &  rhs 
)
noexcept

Comparators

◆ operator<=()

template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator<= ( ObserverPtr< T1, M > const &  lhs,
ObserverPtr< T2, M > const &  rhs 
)
noexcept

Comparators

◆ operator==() [1/3]

template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== ( ObserverPtr< T, M > const &  lhs,
std::nullptr_t   
)
noexcept

Comparators

◆ operator==() [2/3]

template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== ( ObserverPtr< T1, M > const &  lhs,
ObserverPtr< T2, M > const &  rhs 
)
noexcept

Comparators

◆ operator==() [3/3]

template<class T , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator== ( std::nullptr_t  ,
ObserverPtr< T, M > const &  rhs 
)
noexcept

Comparators

◆ operator>()

template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator> ( ObserverPtr< T1, M > const &  lhs,
ObserverPtr< T2, M > const &  rhs 
)
noexcept

Comparators

◆ operator>=()

template<class T1 , class T2 , MemSpace M>
CELER_CONSTEXPR_FUNCTION bool celeritas::operator>= ( ObserverPtr< T1, M > const &  lhs,
ObserverPtr< T2, M > const &  rhs 
)
noexcept

Comparators