proxygen
folly::detail::DynamicHasher Struct Reference

#include <dynamic-inl.h>

Public Types

using is_transparent = void
 

Public Member Functions

size_t operator() (dynamic const &d) const
 
template<typename T >
std::enable_if_t< std::is_convertible< T, StringPiece >::value, size_t > operator() (T const &val) const
 

Detailed Description

Definition at line 29 of file dynamic-inl.h.

Member Typedef Documentation

Definition at line 30 of file dynamic-inl.h.

Member Function Documentation

size_t folly::detail::DynamicHasher::operator() ( dynamic const &  d) const
inline

Definition at line 32 of file dynamic-inl.h.

References folly::dynamic::hash(), and value.

Referenced by folly::detail::DynamicKeyEqual::operator()().

32  {
33  return d.hash();
34  }
template<typename T >
std::enable_if_t<std::is_convertible<T, StringPiece>::value, size_t> folly::detail::DynamicHasher::operator() ( T const &  val) const
inline

Definition at line 38 of file dynamic-inl.h.

References val.

38  {
39  // keep consistent with dynamic::hash() for strings
40  return Hash()(static_cast<StringPiece>(val));
41  }
double val
Definition: String.cpp:273
Range< const char * > StringPiece

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