proxygen
hash< folly::Optional< T > > Struct Template Reference

#include <Optional.h>

Public Member Functions

size_t operator() (folly::Optional< T > const &obj) const
 

Detailed Description

template<class T>
struct hash< folly::Optional< T > >

Definition at line 606 of file Optional.h.

Member Function Documentation

template<class T >
size_t hash< folly::Optional< T > >::operator() ( folly::Optional< T > const &  obj) const
inline

Definition at line 607 of file Optional.h.

References testing::Args(), FOLLY_NAMESPACE_STD_END, h, folly::Optional< Value >::hasValue(), folly::gen::move, folly::pushmi::__adl::noexcept(), promise_, type, and testing::Value().

607  {
608  if (!obj.hasValue()) {
609  return 0;
610  }
611  return hash<typename remove_const<T>::type>()(*obj);
612  }
PskType type
FOLLY_CPP14_CONSTEXPR bool hasValue() const noexcept
Definition: Optional.h:300

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