proxygen
folly::f14::GenericHasher< T > Class Template Reference

#include <F14TestUtil.h>

Public Types

using HasherFunc = folly::Function< std::size_t(T const &)>
 

Public Member Functions

 GenericHasher ()=delete
 
template<typename H >
 GenericHasher (H &&hasher)
 
std::size_t operator() (T const &val) const
 

Private Attributes

std::shared_ptr< HasherFunchasher_
 

Detailed Description

template<typename T>
class folly::f14::GenericHasher< T >

Definition at line 562 of file F14TestUtil.h.

Member Typedef Documentation

template<typename T >
using folly::f14::GenericHasher< T >::HasherFunc = folly::Function<std::size_t(T const&)>

Definition at line 564 of file F14TestUtil.h.

Constructor & Destructor Documentation

template<typename T >
folly::f14::GenericHasher< T >::GenericHasher ( )
delete
template<typename T >
template<typename H >
folly::f14::GenericHasher< T >::GenericHasher ( H &&  hasher)
inline

Definition at line 569 of file F14TestUtil.h.

570  : hasher_{std::make_shared<HasherFunc>(std::forward<H>(hasher))} {}
std::shared_ptr< HasherFunc > hasher_
Definition: F14TestUtil.h:577

Member Function Documentation

template<typename T >
std::size_t folly::f14::GenericHasher< T >::operator() ( T const &  val) const
inline

Definition at line 572 of file F14TestUtil.h.

References val.

572  {
573  return (*hasher_)(val);
574  }
std::shared_ptr< HasherFunc > hasher_
Definition: F14TestUtil.h:577
double val
Definition: String.cpp:273

Member Data Documentation

template<typename T >
std::shared_ptr<HasherFunc> folly::f14::GenericHasher< T >::hasher_
private

Definition at line 577 of file F14TestUtil.h.


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