[ create a new paste ] login | about

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

C++, pasted on Jan 12:
1
2
3
4
5
6
7
8
9
10
11
12
#include <cstdlib>
#include <set>

int main()
{
#ifdef __GNUC__
  std::set<int, std::less<int> > s1;
  std::set<int, std::greater<int> > s2;
  std::set<int, std::less<int> >::iterator it = s2.begin();
#endif
  return EXIT_SUCCESS;
}


Output:
1
2
3
In function 'int main()':
Line 9: error: conversion from '__gnu_debug::_Safe_iterator<std::_Rb_tree_const_iterator<int>, __gnu_debug_def::set<int, std::greater<int>, std::allocator<int> > >' to non-scalar type '__gnu_debug::_Safe_iterator<std::_Rb_tree_const_iterator<int>, __gnu_debug_def::set<int, std::less<int>, std::allocator<int> > >' requested
compilation terminated due to -Wfatal-errors.


Create a new paste based on this one


Comments: