Skip to content

Commit ce6d97d

Browse files
committed
runtime: use explicit name for placement new
The android build seems to find a conflict in the overload set for the placement new operator due to the custom new overload. Provide the indicator that we want the placement new allocator by using the explicitly namespaced spelling. Thanks to @buttaface for reporting the build failure.
1 parent bc769ef commit ce6d97d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stdlib/public/runtime/MetadataImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ struct NativeBox {
100100
}
101101

102102
static T *initializeWithCopy(T *dest, T *src) {
103-
return new (dest) T(*src);
103+
return ::new (dest) T(*src);
104104
}
105105

106106
static T *initializeWithTake(T *dest, T *src) {
107-
T *result = new (dest) T(std::move(*src));
107+
T *result = ::new (dest) T(std::move(*src));
108108
src->T::~T();
109109
return result;
110110
}

0 commit comments

Comments
 (0)