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

Convert bitfield tests to use pointers for atomic values #269

Closed

Conversation

kannibalox
Copy link
Contributor

@kannibalox kannibalox commented Dec 6, 2024

This fixes compilation of the tests, which otherwise fails with:

torrent/utils/test_signal_bitfield.cc:128:43: error: could not convert ‘std::bind(_Func&&, _BoundArgs&& ...) [with _Func = bool (*)(atomic<unsigned int>&, unsigned int); _BoundArgs = {unsigned int&, int}; typename _Bind_helper<__is_socketlike<_Func>::value, _Func, _BoundArgs ...>::type = _Bind_helper<false, bool (*)(atomic<unsigned int>&, unsigned int), unsigned int&, int>::type; __is_socketlike<_Func> = __is_socketlike<bool (*)(atomic<unsigned int>&, unsigned int), bool (*)(atomic<unsigned int>&, unsigned int)>; typename decay<_Tp>::type = bool (*)(atomic<unsigned int>&, unsigned int)](marked_bitfield, (i % 20))’ from ‘std::_Bind_helper<false, bool (*)(std::atomic<unsigned int>&, unsigned int), unsigned int&, int>::type’ to ‘std::function<bool()>’
  128 |     CPPUNIT_ASSERT(wait_for_true(std::bind(&check_index, marked_bitfield, i % 20)));
      |                                  ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                           |
      |                                           std::_Bind_helper<false, bool (*)(std::atomic<unsigned int>&, unsigned int), unsigned int&, int>::type

@rakshasa
Copy link
Owner

rakshasa commented Dec 7, 2024

Not needed anymore.

@rakshasa rakshasa closed this Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants