compiler error PGI

Hi,

I have a part of my code which can be compiled using GCC, but when I use “pgCC” to compile it, I get error. My code is:

map<Coord,int> pointToIndex;
vector cells=m->getSurfaceCells();
for(vector::iterator it=cells.begin();it!=cells.end();it++) {
for(int j=0;j<4;j++) {
Coord point=(*it)[j];
pointToIndex[point]=0;
}
}


and the error is:


pgCC -DHAVE_CONFIG_H -I. -I. -I… -I…/include -I/opt/scali/include -tp athlonxp -c -o

“/lap/pgi-compiler/6.0-5/linux86/6.0/include/CC/stl/_function_base.h”, line 76: error:
no operator “<” matches these operands
operand types are: const Coord < const Coord
bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
^
detected during:
instantiation of “bool std::less<_Tp>::operator()(const _Tp &,
const _Tp &) const [with _Tp=Coord]” at line 490 of
“/lap/pgi-compiler/6.0-5/linux86/6.0/include/CC/stl/_tree
.h”
instantiation of “std::_Rb_tree<_Key, _Value, _KeyOfValue,
_Compare, _Alloc>::_Link_type std::_Rb_tree<_Key,
_Value, _KeyOfValue, _Compare,
_Alloc>::_M_lower_bound(const std::_Rb_tree<_Key,
_Value, _KeyOfValue, _Compare, _Alloc>::key_type &)
const [with _Key=std::map<Coord, int, std::less,
std::allocator<std::pair<const Coord, int>>>::key_type,
_Value=std::map<Coord, int, std::less,
std::allocator<std::pair<const Coord,
int>>>::value_type,
_KeyOfValue=std::_Select1st<std::map<Coord, int,
std::less, std::allocator<std::pair<const Coord,
int>>>::value_type>, _Compare=std::map<Coord, int,
std::less, std::allocator<std::pair<const Coord,
int>>>::key_compare,
_Alloc=std::allocator<std::pair<const Coord, int>>]” at
line 513 of
“/lap/pgi-compiler/6.0-5/linux86/6.0/include/CC/stl/_tree
.h”



I don’t know how to fix the problem and why this happens. Can anybody help?

Regards,
Danesh