◆ operator==() [7/9]

template<class T , class U >
__thrust_exec_check_disable__ __host__ __device__ constexpr bool thrust::operator== ( const optional< T > &  lhs,
const optional< U > &  rhs 


Compares two optional objects

If both optionals contain a value, they are compared with Ts relational operators. Otherwise lhs and rhs are equal only if they are both empty, and lhs is less than rhs only if rhs is empty and lhs is not.

References thrust::optional< T >::has_value().