Most people here lacking mind reading abilities, so text of that error would be helpful.
If comp is a function, then your declarationis invalid. Second template parameter should be type, not the function name.
You need to either use Functors as Peter87 suggested, or use function wrapper:
1 2 3 4 5 6 7 8 9 10 11
#include <functional>
bool compare(int x, int y)
{
return x > y;
}
int main()
{
std::set<int, std::function<bool(int, int)>> x(compare);
}
Edit: tecknically you can use function pointers too: set<string, bool (*)(string, string)>