Skip to content

Commit bc769ef

Browse files
authored
Merge pull request swiftlang#42350 from compnerd/placement
Runtime: correct invalid C++ workaround
2 parents f0f8911 + 312f258 commit bc769ef

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

include/swift/Runtime/Atomic.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,6 @@ struct aligned_alloc<Alignment_, true> {
9595
free(ptr);
9696
#endif
9797
}
98-
99-
#if defined(_WIN32)
100-
// FIXME: why is this even needed? This is not permitted as per the C++
101-
// standrd new.delete.placement (§17.6.3.4).
102-
[[nodiscard]] void *operator new(std::size_t size, void *where) noexcept {
103-
return ::operator new(size, where);
104-
}
105-
#endif
10698
};
10799

108100
/// The default implementation for swift::atomic<T>, which just wraps

stdlib/public/runtime/MetadataImpl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
#include "EnumImpl.h"
5252

5353
#include <cstring>
54+
#include <new>
5455
#include <type_traits>
5556

5657
namespace swift {

0 commit comments

Comments
 (0)