BPHash
General object hashing library for C++
Classes | Macros | Functions
test_detect.cpp File Reference

Testing of compile-time detection of hashing ability. More...

#include "bphash/Hasher.hpp"
#include "bphash/types/All.hpp"
#include <iostream>
#include <string>
Include dependency graph for test_detect.cpp:

Go to the source code of this file.

Classes

class  HashMember
 
class  HashMember_BadSig0
 
class  HashMember_BadSig1
 
class  HashMember_BadSig2
 
class  HashMember_BadSig3
 
class  HashMember_BadSig4
 
class  HashMember_BadSig5
 
class  HashMember_BadSig6
 
class  HashFree
 
class  HashFree_BadSig0
 
class  HashFree_BadSig1
 
class  HashFree_BadSig2
 
class  HashFree_BadSig3
 
class  HashFree_BadSig4
 
class  HashFree_BadSig5
 
class  HashFreeTemplate< T >
 

Macros

#define IS_HASHABLE(type)    static_assert(is_hashable<type>::value, "Type " #type " is not hashable, but should be")
 
#define IS_NOT_HASHABLE(type)   static_assert(!is_hashable<type>::value, "Type " #type " is hashable, but shouldn't be")
 

Functions

static void hash_object (const HashFree &hf, Hasher &h)
 
template<typename T >
void hash_object (const HashFreeTemplate< T > &hft, Hasher &h)
 
int main (void)
 

Detailed Description

Testing of compile-time detection of hashing ability.

Definition in file test_detect.cpp.

Macro Definition Documentation

#define IS_HASHABLE (   type)    static_assert(is_hashable<type>::value, "Type " #type " is not hashable, but should be")

Definition at line 89 of file test_detect.cpp.

#define IS_NOT_HASHABLE (   type)    static_assert(!is_hashable<type>::value, "Type " #type " is hashable, but shouldn't be")

Definition at line 90 of file test_detect.cpp.

Function Documentation

static void hash_object ( const HashFree hf,
Hasher h 
)
static

Definition at line 47 of file test_detect.cpp.

template<typename T >
void hash_object ( const HashFreeTemplate< T > &  hft,
Hasher h 
)

Definition at line 83 of file test_detect.cpp.

int main ( void  )

Definition at line 92 of file test_detect.cpp.

Here is the call graph for this function: