Repository navigation
Add a tutorial for a small-buffer-optimized owning wide pointer - #465
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #465 +/- ##
=======================================
Coverage 93.54% 93.54%
=======================================
Files 11 11
Lines 836 836
Branches 41 41
=======================================
Hits 782 782
Misses 26 26
Partials 28 28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
e18f891 to
b22eac2
Compare
philipcraig
left a comment
There was a problem hiding this comment.
Requesting changes for two things: the inactive-union-member access at line 116 (and 110), and tests for the two assignment operators. The other notes are suggestions.
de2d175 to
e34c32f
Compare
1e6509b to
54f3685
Compare
|
I'm not worried about code coverage results for tutorial code. |
54f3685 to
cf702dd
Compare
|
@RyanJK5 once this tutorial PR looks ok, did you want to try adding SBO support to |
cf702dd to
6df5cc7
Compare
Happy to! |
42f8db5 to
bb531ae
Compare
philipcraig
left a comment
There was a problem hiding this comment.
Both earlier points are fixed. Two suggestions below.
bb531ae to
76fe976
Compare
Wide pointer SBO initial pass Fix object lifetime bugs in the SBO wide pointer tutorial Free indirect storage on destroy. Leave a moved-from buffer object in place for its owner to destroy, and destroy moved-from objects in swap before reusing their storage. Constrain the forwarding constructor and use the decayed type. Static assert that the type fits the buffer. Initialise CountOps::ops_ and copy it in the copy constructor. Address review of the SBO wide pointer tutorial Select storage with BufferStorage/IndirectStorage tag types so buffer requirements apply only to buffer storage, and make the constructors explicit. Use std::launder for buffer access and static_cast from void*. Make swap noexcept and drop redundant self-checks and defaulted members. Add missing includes and brief prose. Rename the target to wide_pointer_sbo_tutorial and drop unused Bazel dependencies. Raise coverage of the SBO wide pointer tutorial Add tests that copy an indirect pointer, copy and move an empty pointer, and check a copied buffer object is destroyed. Ignore tutorials in Codecov, as for the other test files. Reduce clang-tidy suppressions Consolidate and simplify tests Add missing include Use std::size_t Add tutorial for a SBO-optimized wide pointer Wide pointer narrowing Check storage kind and copy count in copy-assignment tests Start the buffer's lifetime in the buffer-storage constructor Disable clang-tidy for the SBO wide pointer tutorial Use placement new to activate the buffer and re-enable clang-tidy Simplify the SBO tutorial's moved-from comment Tidy the SBO tutorial and check the target of move-assignment Use std::construct_at to activate the buffer Give the SBO wide pointer's copy-assignment the strong guarantee
209e4e7 to
b71fe3c
Compare
No description provided.