boostorg / unordered

Boost.org unordered module
http://boost.org/libs/unordered
Boost Software License 1.0
63 stars 55 forks source link

feature/foa fast copy fix #176

Closed joaquintides closed 1 year ago

joaquintides commented 1 year ago

Restores boost::unordered_flat_[map|set]'s allocator awareness by restricting std::memcpy-based element copy to std::allocator and allocators without a suitable construct memfun.

pdimov commented 1 year ago

Why are the warning restore pragmas not in reverse order of the suppression ones?

codecov[bot] commented 1 year ago

Codecov Report

Merging #176 (200c0c6) into develop (6be2bf8) will increase coverage by 0.04%. The diff coverage is 99.23%.

:exclamation: Current head 200c0c6 differs from pull request most recent head 91eddba. Consider uploading reports for the commit 91eddba to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/boostorg/unordered/pull/176/graphs/tree.svg?width=650&height=150&src=pr&token=ZqRPZlJZ5N&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg)](https://codecov.io/gh/boostorg/unordered/pull/176?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) ```diff @@ Coverage Diff @@ ## develop #176 +/- ## =========================================== + Coverage 97.68% 97.73% +0.04% =========================================== Files 83 83 Lines 12073 12195 +122 =========================================== + Hits 11794 11919 +125 + Misses 279 276 -3 ``` | [Impacted Files](https://codecov.io/gh/boostorg/unordered/pull/176?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) | Coverage Δ | | |---|---|---| | [include/boost/unordered/detail/foa.hpp](https://codecov.io/gh/boostorg/unordered/pull/176/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-aW5jbHVkZS9ib29zdC91bm9yZGVyZWQvZGV0YWlsL2ZvYS5ocHA=) | `98.60% <ø> (-0.02%)` | :arrow_down: | | [test/objects/test.hpp](https://codecov.io/gh/boostorg/unordered/pull/176/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC9vYmplY3RzL3Rlc3QuaHBw) | `95.75% <50.00%> (+1.41%)` | :arrow_up: | | [test/unordered/copy\_tests.cpp](https://codecov.io/gh/boostorg/unordered/pull/176/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg#diff-dGVzdC91bm9yZGVyZWQvY29weV90ZXN0cy5jcHA=) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report at Codecov](https://codecov.io/gh/boostorg/unordered/pull/176?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/boostorg/unordered/pull/176?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Last update [6be2bf8...91eddba](https://codecov.io/gh/boostorg/unordered/pull/176?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=boostorg).
joaquintides commented 1 year ago

Why are the warning restore pragmas not in reverse order of the suppression ones?

I opted for having those pragmas be mutually exclusive (note the #elifs), hence restore order can't be reverse (some branches are true simultaneously).