Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build issue with newer versions of gcc #50

Open
mmatsa opened this issue Jan 20, 2021 · 0 comments
Open

Fix build issue with newer versions of gcc #50

mmatsa opened this issue Jan 20, 2021 · 0 comments
Assignees
Labels
Milestone

Comments

@mmatsa
Copy link
Contributor

mmatsa commented Jan 20, 2021

Error as reported:

/usr/include/c++/10/bits/hashtable.h:192:21: error: static assertion failed: unordered container must have the same value_type as its allocator
  192 |       static_assert(is_same<typename _Alloc::value_type, _Value>{},
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/hashtable.h:308:21: error: static assertion failed: Cache the hash code or qualify your functors involved in hash code and bucket index computation with noexcept
  308 |       static_assert(noexcept(declval<const __hash_code_base_access&>()
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  309 |         ._M_bucket_index((const __node_type*)nullptr,
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  310 |            (std::size_t)0)),
      |            ~~~~~~~~~~~~~~~~

Fix to mapterm.h:

396c396
< 		typedef std::unordered_map<K*, V*, std::hash<K*>, std::equal_to<K*>, Allocator<std::pair<const K*, V*>>> tsmap;
---
> 		typedef std::unordered_map<K*, V*, std::hash<K*>, std::equal_to<K*>, Allocator<std::pair<K* const, V*>>> tsmap;
406c406
<         CMapTerm(Context& ctx, CMapTerm& parent): map(10, std::hash<K*>(), std::equal_to<K*>(), Allocator<std::pair<const K*, V*>>(ctx)), parent(make_optional<CMapTerm>(parent))
---
>         CMapTerm(Context& ctx, CMapTerm& parent): map(10, std::hash<K*>(), std::equal_to<K*>(), Allocator<std::pair<K* const, V*>>(ctx)), parent(make_optional<CMapTerm>(parent))
@mmatsa mmatsa added the bug label Jan 20, 2021
@mmatsa mmatsa added this to the 1.0 M2 milestone Jan 20, 2021
@mmatsa mmatsa mentioned this issue Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants