Commit b312db9
committed
fix(pine-cpp): explicitly delete RowFrame / ColumnFrame copy & move (#135 review)
Address bot-reviewer concern on the previous PR commits: switching mu_
from `std::shared_mutex` to `shared_ptr<std::shared_mutex>` removed
the implicit non-copyable/non-movable guarantee that the inline
shared_mutex member used to provide. Every other RowFrame member is
copyable, so post-migration RowFrame became implicitly
copy/move-constructible. A value copy would have aliased the mutex
(shared_ptr copy) while deep-copying items_ — two "independent"
frames sharing one lock for unrelated data, exactly the kind of
subtle hazard #103 was about preventing.
ColumnFrame stayed non-copyable through its `unique_ptr<ColumnStore>`,
producing the asymmetry the reviewer flagged.
Fix: explicitly delete copy/move ctors and assignments on both
RowFrame and ColumnFrame. RowFrame restores the lost invariant;
ColumnFrame pins the implicit one explicitly so the contract is
self-describing rather than depending on a future reader noticing
the unique_ptr member.
No call site copies or moves either Frame in the current tree; this
commit is purely about preventing future misuse. Test suite still
passes (213/213, 110k+ assertions) — no value-copy paths existed to
break.
Refs #103, #135.1 parent 6d90a2b commit b312db9
2 files changed
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
34 | 42 | | |
35 | 43 | | |
36 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
31 | 45 | | |
32 | 46 | | |
33 | 47 | | |
| |||
0 commit comments