E
eiji.anonremail
Hi folks,
I have a compile problem on linux, and maybe someone has an idea:
#include <map>
#include <iostream>
class Test {
int i;
};
int main(int argc, char* argv[])
{
std::map<int, std:air<int,const Test*> > range_map;
range_map.insert(
std::make_pair(
0,
std::make_pair<int,const Test*>(0,new Test)
)
);
range_map.insert(
std::make_pair(
1,
std::make_pair<int,const Test*>(1,new Test)
)
);
std::map<int, std:air<int,const Test*> >::const_reverse_iterator
range_map_riter;
for(range_map_riter = range_map.rbegin(); range_map_riter !=
range_map.rend(); ++range_map_riter)
{
return 0;
}
On win32 this works, but on linux I get a compiler error like this:
main.cpp:31: error: no match for 'operator!=' in
'range_map_riter != std::map<_Key, _Tp, _Compare, _Alloc>::rend()
[with
_Key = int, _Tp = std:air<int, co
nst Test*>, _Compare = std::less<int>, _Alloc =
std::allocator<std:air<const int, std:air<int, const
Test*> > >]()'
Help is much appreciated.
eiji
I have a compile problem on linux, and maybe someone has an idea:
#include <map>
#include <iostream>
class Test {
int i;
};
int main(int argc, char* argv[])
{
std::map<int, std:air<int,const Test*> > range_map;
range_map.insert(
std::make_pair(
0,
std::make_pair<int,const Test*>(0,new Test)
)
);
range_map.insert(
std::make_pair(
1,
std::make_pair<int,const Test*>(1,new Test)
)
);
std::map<int, std:air<int,const Test*> >::const_reverse_iterator
range_map_riter;
for(range_map_riter = range_map.rbegin(); range_map_riter !=
range_map.rend(); ++range_map_riter)
{
}std::cout said:second.first) << std::endl;
return 0;
}
On win32 this works, but on linux I get a compiler error like this:
main.cpp:31: error: no match for 'operator!=' in
'range_map_riter != std::map<_Key, _Tp, _Compare, _Alloc>::rend()
[with
_Key = int, _Tp = std:air<int, co
nst Test*>, _Compare = std::less<int>, _Alloc =
std::allocator<std:air<const int, std:air<int, const
Test*> > >]()'
Help is much appreciated.
eiji