Protect from ADL in Box construction and assignment
diff --git a/include/cxxbridge.h b/include/cxxbridge.h
index a0d9dbb..0bfe805 100644
--- a/include/cxxbridge.h
+++ b/include/cxxbridge.h
@@ -66,7 +66,7 @@
RustBox(RustBox &&other) noexcept : repr(other.repr) { other.repr = 0; }
RustBox(const T &val) {
this->uninit();
- new (this->deref_mut()) T(val);
+ ::new (this->deref_mut()) T(val);
}
RustBox &operator=(const RustBox &other) {
if (this != &other) {
@@ -74,7 +74,7 @@
**this = *other;
} else {
this->uninit();
- new (this->deref_mut()) T(*other);
+ ::new (this->deref_mut()) T(*other);
}
}
return *this;