Compare commits

...
Author SHA1 Message Date
Yedidya Feldblum 7c02b997d8 let Pointer be nothrow-move-constructible (#47331)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/47331

Reviewed By: Gownta

Differential Revision: D65271354
2024-11-05 08:31:11 -08:00
2 changed files with 3 additions and 3 deletions
@@ -258,7 +258,7 @@ std::u16string Runtime::utf16(const String& str) {
return convertUTF8ToUTF16(utf8Str);
}
Pointer& Pointer::operator=(Pointer&& other) {
Pointer& Pointer::operator=(Pointer&& other) noexcept {
if (ptr_) {
ptr_->invalidate();
}
@@ -418,7 +418,7 @@ class JSI_EXPORT Runtime {
// Base class for pointer-storing types.
class JSI_EXPORT Pointer {
protected:
explicit Pointer(Pointer&& other) : ptr_(other.ptr_) {
explicit Pointer(Pointer&& other) noexcept : ptr_(other.ptr_) {
other.ptr_ = nullptr;
}
@@ -428,7 +428,7 @@ class JSI_EXPORT Pointer {
}
}
Pointer& operator=(Pointer&& other);
Pointer& operator=(Pointer&& other) noexcept;
friend class Runtime;
friend class Value;