MCPcopy Create free account
hub / github.com/ceph/ceph / ref_cast

Function ref_cast

src/common/ref.h:13–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
detachMethod · 0.45

Tested by

no test coverage detected