xo-refcnt: naked pointer -> Borrow ctor
This commit is contained in:
parent
8c3c3a7ac4
commit
c7b37d35bb
2 changed files with 5 additions and 2 deletions
|
|
@ -257,9 +257,12 @@ namespace xo {
|
|||
template<typename T>
|
||||
class Borrow {
|
||||
public:
|
||||
template<typename S>
|
||||
template <typename S>
|
||||
Borrow(rp<S> const & x) : ptr_(x.get()) {}
|
||||
|
||||
template <typename S>
|
||||
Borrow(S * x) : ptr_(x) {}
|
||||
|
||||
Borrow(Borrow const & x) = default;
|
||||
|
||||
/* convert from another borrow, if it has compatible pointer type */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue