1 2 3 4 5 6 7 8 9 10 11 12 13
#include <set> bool lex_compare(const int& a, const int& b) { return a < b; } int main() { std::set<int, lex_compare> s; s.insert(1); return 0; }
1 2 3
In function 'int main()': Line 10: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Key, class _Compare, class _Allocator> class __gnu_debug_def::set' compilation terminated due to -Wfatal-errors.