[ create a new paste ] login | about

Link: http://codepad.org/IprafuVf    [ raw code | output | fork ]

C++, pasted on Apr 12:
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;
}


Output:
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.


Create a new paste based on this one


Comments: