xo-reflect: + Borrow::operator=()
This commit is contained in:
parent
c7b37d35bb
commit
c7a030aa37
1 changed files with 5 additions and 2 deletions
|
|
@ -297,8 +297,11 @@ namespace xo {
|
|||
return ptrdiff_t(x.get() - y.get());
|
||||
} /*compare*/
|
||||
|
||||
private:
|
||||
Borrow(T * x) : ptr_(x) {}
|
||||
template <typename S>
|
||||
Borrow<T> & operator=(const Borrow<S> & x) {
|
||||
ptr_ = x.get();
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
T * ptr_ = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue