Fix td_api C++11 compatibility.
GitOrigin-RevId: de46b13b26aa268770e99cf2b83ecf86b9ba5385
This commit is contained in:
parent
a9c36dbd57
commit
7a59b3d2b3
@ -115,10 +115,10 @@ class unique_ptr {
|
|||||||
}
|
}
|
||||||
explicit unique_ptr(T *ptr) noexcept : ptr_(ptr) {
|
explicit unique_ptr(T *ptr) noexcept : ptr_(ptr) {
|
||||||
}
|
}
|
||||||
template <class S, class = std::enable_if_t<std::is_base_of<T, S>::value>>
|
template <class S, class = typename std::enable_if<std::is_base_of<T, S>::value>::type>
|
||||||
unique_ptr(unique_ptr<S> &&other) noexcept : ptr_(static_cast<S *>(other.release())) {
|
unique_ptr(unique_ptr<S> &&other) noexcept : ptr_(static_cast<S *>(other.release())) {
|
||||||
}
|
}
|
||||||
template <class S, class = std::enable_if_t<std::is_base_of<T, S>::value>>
|
template <class S, class = typename std::enable_if<std::is_base_of<T, S>::value>::type>
|
||||||
unique_ptr &operator=(unique_ptr<S> &&other) noexcept {
|
unique_ptr &operator=(unique_ptr<S> &&other) noexcept {
|
||||||
reset(static_cast<T *>(other.release()));
|
reset(static_cast<T *>(other.release()));
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user