fix: Wrong return type of copy_fn and missing typedef in destruct_range#708
fix: Wrong return type of copy_fn and missing typedef in destruct_range#708marco-langer wants to merge 1 commit intoboostorg:developfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #708 +/- ##
===========================================
- Coverage 81.10% 81.10% -0.01%
===========================================
Files 117 117
Lines 5171 5170 -1
===========================================
- Hits 4194 4193 -1
Misses 977 977 |
| BOOST_FORCEINLINE I operator()(I first, I last, O dst) const { return std::copy(first,last,dst); } | ||
| BOOST_FORCEINLINE O operator()(I first, I last, O dst) const { return std::copy(first,last,dst); } |
There was a problem hiding this comment.
Hmm, amazing it remained unrevealed for long time.
How did you find it out?
There was a problem hiding this comment.
Hmm, amazing it remained unrevealed for long time.
I was also surprised after realizing this bug has been there for at least 15 years. I guess the reason is copy_fn is not used in many places and as long as the output iterator is implicitly convertible to the input iterator (as it is the case for pointers which only differ in their const-qualifier), everything is fine.
How did you find it out?
Just me, the algorithm header and a cup of coffee.
I wanted to think a second time about these core library changes before rushing them as a last minute change into the next release.
|
|
I agree with your points @marco-langer |
Description
This PR fixes some minor issues in algorithm.hpp:
Tasklist