some optimizations and rule transformations
use std::weak_ptr::owner_before instead of weak_ptr::expired() and weak_ptr::lock() for better performance
The new implementation is equivalent to a pointer comparison: https://godbolt.org/z/1ozjz55Go
use std::weak_ptr::owner_before instead of weak_ptr::expired() and weak_ptr::lock() for better performance
The new implementation is equivalent to a pointer comparison: https://godbolt.org/z/1ozjz55Go