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
no match for 'operator=' in 'stale_it = (& stale_set)->std::
Moderator: Oberlus
Re: no match for 'operator=' in 'stale_it = (& stale_set)->s
Changing this line fixes the build:
2152 stale_it = stale_set.erase(stale_it);
to
2152 stale_set.erase(stale_it);
but I have no idea if I break the logic. :-/
2152 stale_it = stale_set.erase(stale_it);
to
2152 stale_set.erase(stale_it);
but I have no idea if I break the logic. :-/
Re: no match for 'operator=' in 'stale_it = (& stale_set)->s
Ok, doesn't seem to work that way. I guess I'll have to wait for someone who knows what he's doing. .-)
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13603
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: no match for 'operator=' in 'stale_it = (& stale_set)->s
Apparently there was no overload of set::erase that returned an iterator in the standard until C++11 but MSVC 2010 has one anyway... Will attempt to fix.
Re: no match for 'operator=' in 'stale_it = (& stale_set)->s
Thanks!
I just build r5553 without issues.
I just build r5553 without issues.
Re: no match for 'operator=' in 'stale_it = (& stale_set)->s
Compile on OSX works too.