You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In file included from /usr/include/c++/5/bits/hashtable.h:35:0,
from /usr/include/c++/5/unordered_map:47,
from /home/ftsarev/Downloads/cpp/model/Properties.hpp:10,
from /home/ftsarev/Downloads/cpp/model/Game.hpp:7,
from /home/ftsarev/Downloads/cpp/MyStrategy.hpp:6,
from /home/ftsarev/Downloads/cpp/MyStrategy.cpp:1:
/usr/include/c++/5/bits/hashtable_policy.h: In instantiation of ‘struct std::__detail::__is_noexcept_hash<WeaponType, std::hash<WeaponType> >’:
/usr/include/c++/5/type_traits:137:12: required from ‘struct std::__and_<std::__is_fast_hash<std::hash<WeaponType> >, std::__detail::__is_noexcept_hash<WeaponType, std::hash<WeaponType> > >’
/usr/include/c++/5/type_traits:148:38: required from ‘struct std::__not_<std::__and_<std::__is_fast_hash<std::hash<WeaponType> >, std::__detail::__is_noexcept_hash<WeaponType, std::hash<WeaponType> > > >’
/usr/include/c++/5/bits/unordered_map.h:100:66: required from ‘class std::unordered_map<WeaponType, WeaponParams>’
/home/ftsarev/Downloads/cpp/model/Properties.hpp:41:50: required from here
/usr/include/c++/5/bits/hashtable_policy.h:85:34: error: no match for call to ‘(const std::hash<WeaponType>) (const WeaponType&)’
noexcept(declval<const _Hash&>()(declval<const _Key&>()))>
^
In file included from /usr/include/c++/5/bits/move.h:57:0,
from /usr/include/c++/5/bits/stl_pair.h:59,
from /usr/include/c++/5/bits/stl_algobase.h:64,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/string:40,
from /home/ftsarev/Downloads/cpp/Stream.hpp:4,
from /home/ftsarev/Downloads/cpp/Debug.hpp:4,
from /home/ftsarev/Downloads/cpp/MyStrategy.hpp:4,
from /home/ftsarev/Downloads/cpp/MyStrategy.cpp:1:
/usr/include/c++/5/type_traits: In instantiation of ‘struct std::__not_<std::__and_<std::__is_fast_hash<std::hash<WeaponType> >, std::__detail::__is_noexcept_hash<WeaponType, std::hash<WeaponType> > > >’:
/usr/include/c++/5/bits/unordered_map.h:100:66: required from ‘class std::unordered_map<WeaponType, WeaponParams>’
/home/ftsarev/Downloads/cpp/model/Properties.hpp:41:50: required from here
/usr/include/c++/5/type_traits:148:38: error: ‘value’ is not a member of ‘std::__and_<std::__is_fast_hash<std::hash<WeaponType> >, std::__detail::__is_noexcept_hash<WeaponType, std::hash<WeaponType> > >’
: public integral_constant<bool, !_Pp::value>
Workaround is to define std::hash specialization for WeaponType
The text was updated successfully, but these errors were encountered:
Old gcc has only partial C++17 support. There is known issue with enum hashes:
https://stackoverflow.com/a/29618545/1762922
Workaround is to define std::hash specialization for WeaponType
The text was updated successfully, but these errors were encountered: