proxygen
folly::Optional< Value >::StorageNonTriviallyDestructible Struct Reference

Public Member Functions

FOLLY_PUSH_WARNING FOLLY_MSVC_DISABLE_WARNING (4587) FOLLY_MSVC_DISABLE_WARNING(4588) StorageNonTriviallyDestructible()
 
 ~StorageNonTriviallyDestructible ()
 
FOLLY_POP_WARNING void clear ()
 

Public Attributes

union {
   char   emptyState
 
   Value   value
 
}; 
 
bool hasValue
 

Detailed Description

template<class Value>
struct folly::Optional< Value >::StorageNonTriviallyDestructible

Definition at line 399 of file Optional.h.

Constructor & Destructor Documentation

template<class Value>
folly::Optional< Value >::StorageNonTriviallyDestructible::~StorageNonTriviallyDestructible ( )
inline

Definition at line 413 of file Optional.h.

References FOLLY_POP_WARNING.

413  {
414  clear();
415  }

Member Function Documentation

template<class Value>
FOLLY_POP_WARNING void folly::Optional< Value >::StorageNonTriviallyDestructible::clear ( )
inline

Definition at line 418 of file Optional.h.

References value, and folly::value().

418  {
419  if (hasValue) {
420  hasValue = false;
421  value.~Value();
422  }
423  }
template<class Value>
FOLLY_PUSH_WARNING folly::Optional< Value >::StorageNonTriviallyDestructible::FOLLY_MSVC_DISABLE_WARNING ( 4587  )
inline

Definition at line 410 of file Optional.h.

Member Data Documentation

union { ... }
template<class Value>
char folly::Optional< Value >::StorageNonTriviallyDestructible::emptyState

Definition at line 401 of file Optional.h.

template<class Value>
bool folly::Optional< Value >::StorageNonTriviallyDestructible::hasValue

Definition at line 404 of file Optional.h.

template<class Value>
Value folly::Optional< Value >::StorageNonTriviallyDestructible::value

Definition at line 402 of file Optional.h.


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