So I was trying to add to a class a function that compares two std::string's disregarding case from here: Case insensitive standard string comparison in C++.  
#include <iostream>
#include <string>
using namespace std;
class foo {
    public:
        bool icompare_pred(char a, char b) {
             return std::tolower(a) == std::tolower(b);
        }
        bool icompare( string a,  string  b){
            return  equal( a.begin(),  a.end(),  b.begin(),  icompare_pred);
        }
};  
int main() {
}
The code doesn't compile, even more: it sends me into the depths of STL with an error
[Error] must use '.*' or '->*' to call pointer-to-member function in '__binary_pred (...)', e.g. '(... ->* __binary_pred) (...)'
in this part
stl_algobase.h
 template<typename _IIter1, typename _IIter2, typename _BinaryPredicate>
inline bool
equal(_IIter1 __first1, _IIter1 __last1,
  _IIter2 __first2, _BinaryPredicate __binary_pred)
{
  // concept requirements
  __glibcxx_function_requires(_InputIteratorConcept<_IIter1>)
  __glibcxx_function_requires(_InputIteratorConcept<_IIter2>)
  __glibcxx_requires_valid_range(__first1, __last1);
  for (; __first1 != __last1; ++__first1, ++__first2)
if (!bool(__binary_pred(*__first1, *__first2)))
  return false;
  return true;
}
Well, what do I do? How do I fix this error?
 
     
     
     
     
    