In file included from c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/algorithm:63:0,
from foo.cpp:1:
c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/stl_algo.h: In function '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = Edge*, _Tp = Edge]':
c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/stl_algo.h:2253:70: instantiated from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = Edge*]'
c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/stl_algo.h:2284:54: instantiated from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = Edge*, _Size = int]'
c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/stl_algo.h:5330:4: instantiated from 'void std::sort(_RAIter, _RAIter) [with _RAIter = Edge*]'
foo.cpp:114:23: instantiated from here
c:\mingw32\bin\../lib/gcc/mingw32/4.6.1/include/c++/bits/stl_algo.h:2215:4: error: passing 'const Edge' as 'this' argument of 'bool Edge::operator<(Edge)' discards qualifiers [-fpermissive]