Lumiera  0.pre.03
»edityourfreedom«
functor-util.hpp File Reference

Go to the source code of this file.

Description

Collection of small helpers and utilities related to function objects.

Todo:

combine with meta/function-closure.hpp and reorganise

2017 find out to what extent we still need that (looks obsolete)

See also
GuiSubsysDescriptor::start (guifacade.cpp)
MementoTie
functor-util-test.cpp

Definition in file functor-util.hpp.

#include "lib/hash-value.h"
#include <functional>
#include <boost/functional/hash.hpp>

Functions

template<typename SIG >
lib::HashVal hash_value (function< SIG > const &fun)
 inject into std::tr1 to be picked up by ADL: More...
 
template<typename SIG >
bool rawComparison (function< SIG > const &f1, function< SIG > const &f2)
 temporary workaround: tr1/functional should define public comparison operators for functor objects, but in the implementation provided by boost 1.34 it doesn't. More...
 
template<typename SIG1 , typename SIG2 >
bool rawComparison (function< SIG1 > const &, function< SIG2 > const &)
 catch-all for the comparison: functors with different base type are always "different" More...
 
bool rawComparison (void *f1, void *f2)
 variant with unchecked access More...
 
template<typename SIG >
HashVal rawHashValue (function< SIG > const &fun)
 workaround to calculate a hash value for a given function object. More...
 

Namespaces

 util
 

Function Documentation

◆ hash_value()

lib::HashVal std::hash_value ( function< SIG > const &  fun)
inline

inject into std::tr1 to be picked up by ADL:

Returns
hash value of given functor
Note
use with caution. Hash is calculated relying on undocumented boost internals.

Definition at line 183 of file functor-util.hpp.

References util::rawHashValue().

+ Here is the call graph for this function: