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

Support stateful allocators #84

Merged
merged 1 commit into from
Dec 24, 2024
Merged

Support stateful allocators #84

merged 1 commit into from
Dec 24, 2024

Conversation

aleden
Copy link
Contributor

@aleden aleden commented Dec 5, 2024

If one uses boost::interprocess::allocator (or some other stateful allocator) compilation will fail in non-release mode (i.e. !defined(NDEBUG)) on two methods of dynamic_bitset (move constructor and move assignment operator). The problematic line is:

    // Required so that assert(m_check_invariants()); works.                                                                            
    assert((b.m_bits = buffer_type()).empty());                                     

Since construction of buffer_type requires an allocator argument. This patch simply passes get_allocator() to construct it.

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.55%. Comparing base (d4be7a4) to head (2e28eb2).
Report is 20 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #84      +/-   ##
===========================================
- Coverage    95.80%   95.55%   -0.26%     
===========================================
  Files            5        5              
  Lines          668      675       +7     
  Branches         0      210     +210     
===========================================
+ Hits           640      645       +5     
- Misses          28       29       +1     
- Partials         0        1       +1     
Files with missing lines Coverage Δ
include/boost/dynamic_bitset/dynamic_bitset.hpp 95.21% <100.00%> (-0.28%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd59d32...2e28eb2. Read the comment docs.

@jeking3 jeking3 merged commit 41d0897 into boostorg:develop Dec 24, 2024
40 of 41 checks passed
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