In file included from /usr/include/c++/4.6/algorithm:63:0,
from D.cpp:2:
/usr/include/c++/4.6/bits/stl_algo.h: In function '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = Fence*, _Tp = Fence]':
/usr/include/c++/4.6/bits/stl_algo.h:2253:70: instantiated from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = Fence*]'
/usr/include/c++/4.6/bits/stl_algo.h:2284:54: instantiated from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = Fence*, _Size = long int]'
/usr/include/c++/4.6/bits/stl_algo.h:5407:4: instantiated from 'void std::sort(_RAIter, _RAIter) [with _RAIter = Fence*]'
D.cpp:30:17: instantiated from here
/usr/include/c++/4.6/bits/stl_algo.h:2215:4: error: passing 'const Fence' as 'this' argument of 'bool Fence::operator<(Fence)' discards qualifiers [-fpermissive]
D.cpp: In function 'int main()':
D.cpp:20:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
D.cpp:25:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]