dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

depends: update 'src/immer' to arximboldi/immer@5875f773 as c0b716f2 #6377

Closed kwvg closed 2 weeks ago

kwvg commented 2 weeks ago

Additional Information

https://github.com/dashpay/dash/pull/6380 will be using std::ranges as a replacement for dash#4622 and currently, it will fail to compile due to the current version of immer (last updated two years ago in https://github.com/dashpay/dash/pull/4911) not meeting constraints (source) set by std::ranges (see below).

./evo/deterministicmns.h:243:16: error: no matching function for call to object of type 'const __count_if_fn'
        return ranges::count_if(mnMap, [](const auto& p) { return IsMNValid(*p.second); });
               ^~~~~~~~~~~~~~~~
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/ranges_algo.h:331:7: note: candidate template ignored: substitution failure [with _Range = const MnMap &, _Proj = identity, _Pred = (lambda at ./evo/deterministicmns.h:243:40)]: constraints not satisfied for alias template 'range_difference_t' [with _Range = const immer::map<uint256, std::shared_ptr<const CDeterministicMN>, CDeterministicMNList::ImmerHasher> &]
      operator()(_Range&& __r, _Pred __pred, _Proj __proj = {}) const
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/ranges_algo.h:316:7: note: candidate function template not viable: requires at least 3 arguments, but 2 were provided
      operator()(_Iter __first, _Sent __last,
      ^

This has been resolved by updating immer to the latest available release, v0.8.1.

Expected subtree hash without changes are a5ded361aec714bc74149909c5e1984c10ab132c4c539c63fe57362dccd95556 (see here for verification instructions).

Breaking Changes

None expected.

Checklist