summaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/memory/exact_ref_counted_cast.h
Commit message (Collapse)AuthorAgeFilesLines
* Add ExactRefCountedCast and TRef::Containsbabenko2026-06-241-0/+36
Some handy helpers. `ExactRefCountedCast<T>(p)`: exact-type downcast for `New<T>()`-allocated objects. `New<T>(`) builds a final `TRefCountedWrapper<T>`, so this casts to the wrapper and upcasts back to `T*`; being final, the `dynamic_cast` lowers to a single `type_info` compare (~2ns vs ~20ns for the is-a path). `TRef::Contains(other)`: true iff other's range lies within this range. commit_hash:138e8719b8ecbd953437b81380e54f736db029ef