}
// Move ctors.
- RefCountedPtr(RefCountedPtr&& other) noexcept {
+ RefCountedPtr(RefCountedPtr&& other) {
value_ = other.value_;
other.value_ = nullptr;
}
template <typename Y>
- RefCountedPtr(RefCountedPtr<Y>&& other) noexcept {
+ RefCountedPtr(RefCountedPtr<Y>&& other) {
value_ = static_cast<T*>(other.value_);
other.value_ = nullptr;
}
// Move assignment.
- RefCountedPtr& operator=(RefCountedPtr&& other) noexcept {
+ RefCountedPtr& operator=(RefCountedPtr&& other) {
reset(other.value_);
other.value_ = nullptr;
return *this;
}
template <typename Y>
- RefCountedPtr& operator=(RefCountedPtr<Y>&& other) noexcept {
+ RefCountedPtr& operator=(RefCountedPtr<Y>&& other) {
reset(other.value_);
other.value_ = nullptr;
return *this;
}
// Move ctors.
- WeakRefCountedPtr(WeakRefCountedPtr&& other) noexcept {
+ WeakRefCountedPtr(WeakRefCountedPtr&& other) {
value_ = other.value_;
other.value_ = nullptr;
}
template <typename Y>
- WeakRefCountedPtr(WeakRefCountedPtr<Y>&& other) noexcept {
+ WeakRefCountedPtr(WeakRefCountedPtr<Y>&& other) {
value_ = static_cast<T*>(other.value_);
other.value_ = nullptr;
}
// Move assignment.
- WeakRefCountedPtr& operator=(WeakRefCountedPtr&& other) noexcept {
+ WeakRefCountedPtr& operator=(WeakRefCountedPtr&& other) {
reset(other.value_);
other.value_ = nullptr;
return *this;
}
template <typename Y>
- WeakRefCountedPtr& operator=(WeakRefCountedPtr<Y>&& other) noexcept {
+ WeakRefCountedPtr& operator=(WeakRefCountedPtr<Y>&& other) {
reset(other.value_);
other.value_ = nullptr;
return *this;