proxygen
folly::poly::INullablePointer::Interface< Base > Struct Template Reference

#include <Nullable.h>

Inherits Base.

Public Member Functions

 Interface ()=default
 
 Interface (std::nullptr_t)
 
PolySelf< Base > & operator= (std::nullptr_t)
 

Friends

bool operator== (std::nullptr_t, PolySelf< Base > const &self) noexcept
 
bool operator== (PolySelf< Base > const &self, std::nullptr_t) noexcept
 
bool operator!= (std::nullptr_t, PolySelf< Base > const &self) noexcept
 
bool operator!= (PolySelf< Base > const &self, std::nullptr_t) noexcept
 

Detailed Description

template<class Base>
struct folly::poly::INullablePointer::Interface< Base >

Definition at line 31 of file Nullable.h.

Constructor & Destructor Documentation

template<class Base >
folly::poly::INullablePointer::Interface< Base >::Interface ( )
default
template<class Base >
folly::poly::INullablePointer::Interface< Base >::Interface ( std::nullptr_t  )
inline

Definition at line 35 of file Nullable.h.

References folly::value().

35  : Base{} {
36  static_assert(
37  std::is_default_constructible<PolySelf<Base>>::value,
38  "Cannot initialize a non-default constructible Poly with nullptr");
39  }
AtomicCounter< T, DeterministicAtomic > Base
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)

Member Function Documentation

template<class Base >
PolySelf<Base>& folly::poly::INullablePointer::Interface< Base >::operator= ( std::nullptr_t  )
inline

Definition at line 41 of file Nullable.h.

References folly::value().

41  {
42  static_assert(
43  std::is_default_constructible<PolySelf<Base>>::value,
44  "Cannot initialize a non-default constructible Poly with nullptr");
45  auto& self = static_cast<PolySelf<Base>&>(*this);
46  self = PolySelf<Base>();
47  return self;
48  }
uint64_t value(const typename LockFreeRingBuffer< T, Atom >::Cursor &rbcursor)

Friends And Related Function Documentation

template<class Base >
bool operator!= ( std::nullptr_t  ,
PolySelf< Base > const &  self 
)
friend

Definition at line 60 of file Nullable.h.

62  {
63  return !poly_empty(self);
64  }
bool poly_empty(detail::PolyRoot< I > const &that) noexcept
Definition: Poly.h:383
template<class Base >
bool operator!= ( PolySelf< Base > const &  self,
std::nullptr_t   
)
friend

Definition at line 65 of file Nullable.h.

67  {
68  return !poly_empty(self);
69  }
bool poly_empty(detail::PolyRoot< I > const &that) noexcept
Definition: Poly.h:383
template<class Base >
bool operator== ( std::nullptr_t  ,
PolySelf< Base > const &  self 
)
friend

Definition at line 50 of file Nullable.h.

52  {
53  return poly_empty(self);
54  }
bool poly_empty(detail::PolyRoot< I > const &that) noexcept
Definition: Poly.h:383
template<class Base >
bool operator== ( PolySelf< Base > const &  self,
std::nullptr_t   
)
friend

Definition at line 55 of file Nullable.h.

57  {
58  return poly_empty(self);
59  }
bool poly_empty(detail::PolyRoot< I > const &that) noexcept
Definition: Poly.h:383

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