no match for 'operator=' in 'stale_it = (& stale_set)->std::
Posted: Sun Dec 16, 2012 5:28 pm
Looks like commit https://github.com/freeorion/freeorion/ ... 68f5972e5a broke the build with gcc:
55
Rev 5547:
[ 0%] Building CXX object CMakeFiles/core_static.dir/universe/Universe.cpp.o
/root/freeorion/src/freeorion-build/universe/Universe.cpp: In function 'void {anonymous}::PropegateVisibilityToContainerObjects(const ObjectMap&, Universe::EmpireObjectVisibilityMap&)':
/root/freeorion/src/freeorion-build/universe/Universe.cpp:1759:19: warning: unused variable 'universe' [-Wunused-variable]
/root/freeorion/src/freeorion-build/universe/Universe.cpp: In member function 'void Universe::UpdateEmpireStaleObjectKnowledge()':
/root/freeorion/src/freeorion-build/universe/Universe.cpp:2152:52: error: no match for 'operator=' in 'stale_it = (& stale_set)->std::set<_Key, _Compare, _Alloc>::erase<int, std::less<int>, std::allocator<int> >(stale_it)'
/root/freeorion/src/freeorion-build/universe/Universe.cpp:2152:52: note: candidate is:
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/map:60:0,
from /usr/include/GG/Enum.h:35,
from /root/freeorion/src/freeorion-build/universe/Enums.h:5,
from /root/freeorion/src/freeorion-build/universe/Universe.h:5,
from /root/freeorion/src/freeorion-build/universe/Universe.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:227:12: note: std::_Rb_tree_const_iterator<int>& std::_Rb_tree_const_iterator<int>::operator=(const std::_Rb_tree_const_iterator<int>&)
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:227:12: note: no known conversion for argument 1 from 'void' to 'const std::_Rb_tree_const_iterator<int>&'
/root/freeorion/src/freeorion-build/universe/Universe.cpp: At global scope:
/root/freeorion/src/freeorion-build/universe/Universe.cpp:47:10: warning: '{anonymous}::temp_bool' defined but not used [-Wunused-variable]
make[2]: *** [CMakeFiles/core_static.dir/universe/Universe.cpp.o] Error 1
make[1]: *** [CMakeFiles/core_static.dir/all] Error 2
make: *** [all] Error 2
55
Rev 5547:
[ 0%] Building CXX object CMakeFiles/core_static.dir/universe/Universe.cpp.o
/root/freeorion/src/freeorion-build/universe/Universe.cpp: In function 'void {anonymous}::PropegateVisibilityToContainerObjects(const ObjectMap&, Universe::EmpireObjectVisibilityMap&)':
/root/freeorion/src/freeorion-build/universe/Universe.cpp:1759:19: warning: unused variable 'universe' [-Wunused-variable]
/root/freeorion/src/freeorion-build/universe/Universe.cpp: In member function 'void Universe::UpdateEmpireStaleObjectKnowledge()':
/root/freeorion/src/freeorion-build/universe/Universe.cpp:2152:52: error: no match for 'operator=' in 'stale_it = (& stale_set)->std::set<_Key, _Compare, _Alloc>::erase<int, std::less<int>, std::allocator<int> >(stale_it)'
/root/freeorion/src/freeorion-build/universe/Universe.cpp:2152:52: note: candidate is:
In file included from /usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/map:60:0,
from /usr/include/GG/Enum.h:35,
from /root/freeorion/src/freeorion-build/universe/Enums.h:5,
from /root/freeorion/src/freeorion-build/universe/Universe.h:5,
from /root/freeorion/src/freeorion-build/universe/Universe.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:227:12: note: std::_Rb_tree_const_iterator<int>& std::_Rb_tree_const_iterator<int>::operator=(const std::_Rb_tree_const_iterator<int>&)
/usr/lib/gcc/i686-pc-linux-gnu/4.7.2/../../../../include/c++/4.7.2/bits/stl_tree.h:227:12: note: no known conversion for argument 1 from 'void' to 'const std::_Rb_tree_const_iterator<int>&'
/root/freeorion/src/freeorion-build/universe/Universe.cpp: At global scope:
/root/freeorion/src/freeorion-build/universe/Universe.cpp:47:10: warning: '{anonymous}::temp_bool' defined but not used [-Wunused-variable]
make[2]: *** [CMakeFiles/core_static.dir/universe/Universe.cpp.o] Error 1
make[1]: *** [CMakeFiles/core_static.dir/all] Error 2
make: *** [all] Error 2