can't compile min_element in c++
- by Vincenzo
This is my code:
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
class A {
struct CompareMe {
bool operator() (const string*& s1, const string*& s2) const { return true; }
};
void f() {
CompareMe comp;
vector<string*> v;
min_element(v.begin(), v.end(), comp);
}…