| 11 | template<typename T> using cref_t = boost::intrusive_ptr<const T>; |
| 12 | template<class T, class U> |
| 13 | ref_t<T> ref_cast(const ref_t<U>& r) noexcept { |
| 14 | return static_cast<T*>(r.get()); |
| 15 | } |
| 16 | template<class T, class U> |
| 17 | ref_t<T> ref_cast(ref_t<U>&& r) noexcept { |
| 18 | return {static_cast<T*>(r.detach()), false}; |