Default initialize before swap in move constructor

Fix #9373, fix #9384, fix #9400, fix #9404
This commit is contained in:
topjohnwu
2025-10-02 04:03:08 -07:00
committed by John Wu
parent d6f17c42d5
commit 07cc85ccb1
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ clazz(clazz &&) = delete;
#define ALLOW_MOVE_ONLY(clazz) \
clazz(const clazz&) = delete; \
clazz(clazz &&o) { swap(o); } \
clazz(clazz &&o) : clazz() { swap(o); } \
clazz& operator=(clazz &&o) { swap(o); return *this; }
struct Utf8CStr;