Files
Omkar Bhor c4708c7bd7 Fix double destructor call in buffered_channel and unbuffered_channel iterators
Commit 37b5f770 (#209) added an explicit destructor call in operator++() for
channel iterators. Later, commit e4406238 (#258) added the same destructor
call inside increment_() which operator++() calls. This results in the
destructor running twice on every iterator increment, causing undefined
behavior (double-free) for non-trivially-destructible types.

This bug affects all users of range-for loops over buffered_channel and
unbuffered_channel with types like std::string, shared_ptr, etc.

Fix by removing the redundant destructor call in operator++() since
increment_() already handles it correctly.

Regression test uses a type with an atomic destruction counter to verify
objects are destroyed exactly once.
2026-05-27 19:20:34 +05:30
..