The previous post cannot be compiled,
I think it has to be the following.

typedef bool (*PF)( const pair< string , J >& );
PF p = IsOdd<string>;
PF p1 = J::IsOdd;
h2.RemoveCopyIf( h1, p );
h2.RemoveCopyIf( h1, p1 );