X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Falgorithm.h;fp=source%2Fcore%2Falgorithm.h;h=d295d00ab844c02e943f8795904ee8f35367dfd4;hp=51c2369d623b58790f4ca556018d0162cb96a185;hb=01844ee2ba101c25655dd5eacf62ca9365f26f21;hpb=b5c1bea5084768c7382c376383032c1a6ea16803 diff --git a/source/core/algorithm.h b/source/core/algorithm.h index 51c2369..d295d00 100644 --- a/source/core/algorithm.h +++ b/source/core/algorithm.h @@ -2,6 +2,7 @@ #define MSP_CORE_ALGORITHM_H_ #include +#include namespace Msp { @@ -124,16 +125,17 @@ inline typename Container::const_iterator find_member(const Container &cont, con return find_if(cont, MemberMatch(value, mp)); } -template +template> struct MemberCompare { T C::*mem_ptr; + P pred; MemberCompare(T C::*p): mem_ptr(p) { } - bool operator()(const C &obj, const T &v) { return obj.*mem_ptr